# Commit 4a55779402404ea75aa4e83cd612ac0563e9e1bc
# Date 2023-03-13 11:26:26 +0000
# Author Andrew Cooper <andrew.cooper3@citrix.com>
# Committer Andrew Cooper <andrew.cooper3@citrix.com>
tools/xen-cpuid: Support dash as a bitmap separator

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>

--- a/tools/misc/xen-cpuid.c
+++ b/tools/misc/xen-cpuid.c
@@ -558,9 +558,10 @@ int main(int argc, char **argv)
                 if ( i == nr_features )
                     break;
 
-                if ( *ptr == ':' )
+                if ( *ptr == ':' || *ptr == '-' )
                 {
-                    ptr++; continue;
+                    ptr++;
+                    continue;
                 }
                 break;
             }
