libxenlight: fix hvm flag when no hvmloader
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 30 Nov 2009 10:41:28 +0000 (10:41 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 30 Nov 2009 10:41:28 +0000 (10:41 +0000)
Signed-off-by: Tomasz Wroblewski <tomasz.wroblewski@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
tools/libxl/xl.c

index 96ed50ffe4990a260be875c12f8ca08726ae55ac..88771c6f6be1a8433911fce1bb2db941dc24175a 100644 (file)
@@ -263,12 +263,10 @@ static void parse_config_file(const char *filename,
 
     init_create_info(c_info);
 
-    if (config_lookup_string (&config, "builder", &buf) == CONFIG_TRUE) {
-        if (!strncmp(buf, "hvm", strlen(buf)))
-            c_info->hvm = 1;
-        else
-            c_info->hvm = 0;
-    }
+    c_info->hvm = 0;
+    if ((config_lookup_string (&config, "builder", &buf) == CONFIG_TRUE) &&
+        !strncmp(buf, "hvm", strlen(buf)))
+        c_info->hvm = 1;
 
     /* hap is missing */
     if (config_lookup_string (&config, "name", &buf) == CONFIG_TRUE)