[PATCH 2/3] qemu: ignore -nodefconfig and -nodefaults in qemuParseCommandLineString

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



the qemu driver always adds these options to the qemu commandlines,
but the commandline parser didn't recognize them, so sending a
libvirt-generated qemu commandline to its own argvtoxml would always
result in a warning message and a qemu namespace added to the
xml. Since the options don't add any functionality to the domain, they
should just be ignored (similar to -S).
---
 src/qemu/qemu_command.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index e6acced..8ea5f2e 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -11513,7 +11513,9 @@ qemuParseCommandLine(virCapsPtr qemuCaps,
                                _("cannot parse nvram's address '%s'"), val);
                 goto error;
             }
-        } else if (STREQ(arg, "-S")) {
+        } else if (STREQ(arg, "-S") ||
+                   STREQ(arg, "-nodefaults") ||
+                   STREQ(arg, "-nodefconfig")) {
             /* ignore, always added by libvirt */
         } else {
             char *tmp = NULL;
-- 
1.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]