]> xenbits.xensource.com Git - libvirt.git/commitdiff
tools: virt-host-validate: fix CPU flag detection
authorBjoern Walk <bwalk@linux.vnet.ibm.com>
Tue, 3 May 2016 06:10:52 +0000 (08:10 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 4 May 2016 14:30:30 +0000 (16:30 +0200)
Let's fix CPU flag detection on s390, where the flags line begins with
a lower-case 'features'.

Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
tools/virt-host-validate-common.c

index c476c951ac401cf4c002e398c77487d1559ba723..3c19249722c0df42f92f34316affe23877860083 100644 (file)
@@ -212,10 +212,11 @@ virBitmapPtr virHostValidateGetCPUFlags(void)
         if (!fgets(line, sizeof(line), fp))
             break;
 
-        /* The line we're interested in is marked either as "flags" or
-         * as "Features" depending on the architecture, so check both
-         * prefixes */
-        if (!STRPREFIX(line, "flags") && !STRPREFIX(line, "Features"))
+        /* The line we're interested in is marked differently depending
+         * on the architecture, so check possible prefixes */
+        if (!STRPREFIX(line, "flags") &&
+            !STRPREFIX(line, "Features") &&
+            !STRPREFIX(line, "features"))
             continue;
 
         /* fgets() includes the trailing newline in the output buffer,