[PATCH 2/4] tools: virt-host-validate: fix CPU flag detection

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

 



Let's fix CPU flag detection on s390, where the flags line begins with
a lower-case 'features'.

Signed-off-by: Bjoern Walk <bwalk@xxxxxxxxxxxxxxxxxx>
---
 tools/virt-host-validate-common.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/virt-host-validate-common.c b/tools/virt-host-validate-common.c
index c476c95..3c19249 100644
--- a/tools/virt-host-validate-common.c
+++ b/tools/virt-host-validate-common.c
@@ -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,
-- 
2.6.6

--
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]