stubs: Add arch_type
authorKevin Wolf <kwolf@redhat.com>
Mon, 24 Feb 2020 14:29:50 +0000 (15:29 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 6 Mar 2020 16:15:38 +0000 (17:15 +0100)
blockdev.c uses the arch_type constant, so before we can use the file in
tools (i.e. outside of the system emulator), we need to add a stub for
it. A new QEMU_ARCH_NONE is introduced for this case.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200224143008.13362-3-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
include/sysemu/arch_init.h
stubs/Makefile.objs
stubs/arch_type.c [new file with mode: 0644]

index 62c6fe4cf12d7f019021dab56dba34f71630b835..01392dc945f13be46ea50dd1d790dc6f47a9bb1a 100644 (file)
@@ -24,6 +24,8 @@ enum {
     QEMU_ARCH_NIOS2 = (1 << 17),
     QEMU_ARCH_HPPA = (1 << 18),
     QEMU_ARCH_RISCV = (1 << 19),
+
+    QEMU_ARCH_NONE = (1 << 31),
 };
 
 extern const uint32_t arch_type;
index 7afbe5fb61d31dd2c84859d77fa52a2c6db3a5cc..24062ce7d9e4b4ed99ce7895b1e3e0c4da0cf12e 100644 (file)
@@ -1,3 +1,4 @@
+stub-obj-y += arch_type.o
 stub-obj-y += bdrv-next-monitor-owned.o
 stub-obj-y += blk-commit-all.o
 stub-obj-y += blockdev-close-all-bdrv-states.o
diff --git a/stubs/arch_type.c b/stubs/arch_type.c
new file mode 100644 (file)
index 0000000..fc5423b
--- /dev/null
@@ -0,0 +1,4 @@
+#include "qemu/osdep.h"
+#include "sysemu/arch_init.h"
+
+const uint32_t arch_type = QEMU_ARCH_NONE;