]> xenbits.xensource.com Git - libvirt.git/commitdiff
xenconfig: fix boot device parsing
authorWei Liu <wei.liu2@citrix.com>
Sun, 14 Dec 2014 14:58:17 +0000 (14:58 +0000)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 15 Dec 2014 13:42:02 +0000 (08:42 -0500)
The original code always checked *boot which was in effect boot[0]. It
should use boot[i].

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
src/xenconfig/xen_common.c

index 33ac127efead061111aa360643fc007893b3b09e..25bdf26cc05a36d49dadf73441cf35b6dcbcf0b5 100644 (file)
@@ -1071,7 +1071,7 @@ xenParseOS(virConfPtr conf, virDomainDefPtr def)
             return -1;
 
         for (i = 0; i < VIR_DOMAIN_BOOT_LAST && boot[i]; i++) {
-            switch (*boot) {
+            switch (boot[i]) {
             case 'a':
                 def->os.bootDevs[i] = VIR_DOMAIN_BOOT_FLOPPY;
                 break;