From: Bjoern Walk Date: Tue, 3 May 2016 06:10:52 +0000 (+0200) Subject: tools: virt-host-validate: fix CPU flag detection X-Git-Tag: v1.3.5-rc1~384 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6391012852c1eb18e7639b6a03d9b5e0deabf469;p=thirdparty%2Flibvirt.git tools: virt-host-validate: fix CPU flag detection Let's fix CPU flag detection on s390, where the flags line begins with a lower-case 'features'. Signed-off-by: Bjoern Walk --- diff --git a/tools/virt-host-validate-common.c b/tools/virt-host-validate-common.c index c476c951ac..3c19249722 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,