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

[Xen-devel] [PATCH 2/2] tools/xen-cpuid: avoid producing bogus output



I was (mistakenly, as - looking at the code - it's clearly not intended
to work) passing the tool "Raw" and "Host" as command line arguments.
Avoid printing just "Raw       " with not even a newline at the end in
such a case. Instead report what wasn't understood by the parsing logic.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/tools/misc/xen-cpuid.c
+++ b/tools/misc/xen-cpuid.c
@@ -530,6 +530,15 @@ int main(int argc, char **argv)
                 break;
             }
 
+            if ( !i )
+            {
+                fprintf(stderr, "'%s' unrecognized - skipping\n", ptr);
+                continue;
+            }
+
+            if ( *ptr )
+                fprintf(stderr, "'%s' unrecognized - ignoring\n", ptr);
+
             decode_featureset(fs, i, "Raw", true);
         }
     }


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.