]> git.proxmox.com Git - mirror_qemu.git/commitdiff
bsd-user: Include host-os.h from main
authorWarner Losh <imp@FreeBSD.org>
Fri, 27 Aug 2021 17:28:16 +0000 (11:28 -0600)
committerWarner Losh <imp@bsdimp.com>
Fri, 10 Sep 2021 20:13:06 +0000 (14:13 -0600)
Include host-os.h from main.c to pick up the default OS to emulate.  Set
that default in main().

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
bsd-user/freebsd/host-os.h
bsd-user/main.c
bsd-user/netbsd/host-os.h
bsd-user/openbsd/host-os.h

index bd3f2892dbb8b381ea56f58aaa0ac350e5d1ef27..dfb8344b7b6f0f0dfa4ed2e481079f6bc90e7e35 100644 (file)
@@ -20,4 +20,6 @@
 #ifndef _HOST_OS_H_
 #define _HOST_OS_H_
 
+#define HOST_DEFAULT_BSD_TYPE target_freebsd
+
 #endif /*!_HOST_OS_H_ */
index e06cc7b414e071f730135b74bbaca4945b494aec..607fdd838078168025a858a4b3ead2a3d3a08b9a 100644 (file)
@@ -41,6 +41,8 @@
 #include "exec/log.h"
 #include "trace/control.h"
 
+#include "host-os.h"
+
 int singlestep;
 unsigned long mmap_min_addr;
 uintptr_t guest_base;
@@ -352,7 +354,7 @@ int main(int argc, char **argv)
     const char *gdbstub = NULL;
     char **target_environ, **wrk;
     envlist_t *envlist = NULL;
-    bsd_type = target_openbsd;
+    bsd_type = HOST_DEFAULT_BSD_TYPE;
 
     if (argc <= 1) {
         usage();
index d4bbc7d58ff886639629786e6ad98fbb1cf3a302..c0be51a7ef49586663dfd7935951b9690935fc2a 100644 (file)
@@ -20,4 +20,6 @@
 #ifndef _HOST_OS_H_
 #define _HOST_OS_H_
 
+#define HOST_DEFAULT_BSD_TYPE target_netbsd
+
 #endif /*!_HOST_OS_H_ */
index ae23bfef64a8e8df6d3a584b8ed47719ea370107..eb8fdf1567929af6f76bf097b00b1c237a891a06 100644 (file)
@@ -20,4 +20,6 @@
 #ifndef _HOST_OS_H_
 #define _HOST_OS_H_
 
+#define HOST_DEFAULT_BSD_TYPE target_openbsd
+
 #endif /*!_HOST_OS_H_ */