]> git.proxmox.com Git - qemu.git/commitdiff
Use machine_init() to register virtfs config options.
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 25 Aug 2010 10:19:49 +0000 (12:19 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 21 Sep 2010 16:35:30 +0000 (18:35 +0200)
fsdev/qemu-fsdev.c
vl.c

index ad69b0ea4edba16a3a65986e70e29bef8b2e3ad8..280b8f57b9dce28063d745b8ab9e5c15ce88577e 100644 (file)
@@ -16,6 +16,7 @@
 #include "qemu-queue.h"
 #include "osdep.h"
 #include "qemu-common.h"
+#include "qemu-config.h"
 
 static QTAILQ_HEAD(FsTypeEntry_head, FsTypeListEntry) fstype_entries =
     QTAILQ_HEAD_INITIALIZER(fstype_entries);
@@ -75,3 +76,11 @@ FsTypeEntry *get_fsdev_fsentry(char *id)
     }
     return NULL;
 }
+
+static void fsdev_register_config(void)
+{
+    qemu_add_opts(&qemu_fsdev_opts);
+    qemu_add_opts(&qemu_virtfs_opts);
+}
+machine_init(fsdev_register_config);
+
diff --git a/vl.c b/vl.c
index f434193d293ad4b3508028c829e9ed1a2212ed6a..2edc8533d94f7c1b555d10edaa1f2e5a4fada219 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -1863,11 +1863,6 @@ int main(int argc, char **argv, char **envp)
     tb_size = 0;
     autostart= 1;
 
-#ifdef CONFIG_VIRTFS
-    qemu_add_opts(&qemu_fsdev_opts);
-    qemu_add_opts(&qemu_virtfs_opts);
-#endif
-
     /* first pass of option parsing */
     optind = 1;
     while (optind < argc) {