[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] tools/xen-cpuid: avoid producing bogus output
commit 2c9e748729b97795d1b0292e7f6422e3bc327ce0 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Wed Oct 2 13:38:02 2019 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Wed Oct 2 13:38:02 2019 +0200 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> Acked-by: Wei Liu <wl@xxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Release-acked-by: Juergen Gross <jgross@xxxxxxxx> --- tools/misc/xen-cpuid.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/misc/xen-cpuid.c b/tools/misc/xen-cpuid.c index f51facffb6..866c556a0f 100644 --- 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); } } -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |