]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
tools/xen-cpuid: Support dash as a bitmap separator
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 10 Mar 2023 18:14:13 +0000 (18:14 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 13 Mar 2023 11:26:26 +0000 (11:26 +0000)
Xapi chose to render its featureset bitmaps with dashes rather than colons as
a separator.  Have xen-cpuid support both forms, for convenience.

Fix a trivial style issue in the vicinity while here.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
tools/misc/xen-cpuid.c

index 868054ab96a617d9957fd4a3131256d0a59ea165..361102d8cfb1ed2d53f63fcaffee955fe3c8f9bd 100644 (file)
@@ -607,9 +607,10 @@ int main(int argc, char **argv)
                 if ( i == nr_features )
                     break;
 
-                if ( *ptr == ':' )
+                if ( *ptr == ':' || *ptr == '-' )
                 {
-                    ptr++; continue;
+                    ptr++;
+                    continue;
                 }
                 break;
             }