diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2011-12-05 07:05:50 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-12-05 08:53:19 -0500 |
commit | e70825fc51e149366ab5659bd36beb73aad187a0 (patch) | |
tree | bc4ee5126ce15ab552c33c300b94449392d71eed /arch/x86/tools | |
parent | bfbe9015de5c78d1808cd09526b9166b2e6aa440 (diff) |
x86/tools: Fix insn_sanity message outputs
Fix x86 instruction decoder test to dump all error messages
to stderr and others to stdout.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: yrl.pp-manager.tt@hitachi.com
Link: http://lkml.kernel.org/r/20111205120550.15475.70149.stgit@cloud
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/tools')
-rw-r--r-- | arch/x86/tools/insn_sanity.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/tools/insn_sanity.c b/arch/x86/tools/insn_sanity.c index 20256037ac7d..b6720d6b38cb 100644 --- a/arch/x86/tools/insn_sanity.c +++ b/arch/x86/tools/insn_sanity.c | |||
@@ -102,7 +102,7 @@ static void dump_stream(FILE *fp, const char *msg, unsigned long nr_iter, | |||
102 | 102 | ||
103 | fprintf(fp, "%s:\n", msg); | 103 | fprintf(fp, "%s:\n", msg); |
104 | 104 | ||
105 | dump_insn(stderr, insn); | 105 | dump_insn(fp, insn); |
106 | 106 | ||
107 | fprintf(fp, "You can reproduce this with below command(s);\n"); | 107 | fprintf(fp, "You can reproduce this with below command(s);\n"); |
108 | 108 | ||
@@ -260,7 +260,7 @@ int main(int argc, char **argv) | |||
260 | if (insn.next_byte <= insn.kaddr || | 260 | if (insn.next_byte <= insn.kaddr || |
261 | insn.kaddr + MAX_INSN_SIZE < insn.next_byte) { | 261 | insn.kaddr + MAX_INSN_SIZE < insn.next_byte) { |
262 | /* Access out-of-range memory */ | 262 | /* Access out-of-range memory */ |
263 | dump_stream(stdout, "Error: Found an access violation", i, insn_buf, &insn); | 263 | dump_stream(stderr, "Error: Found an access violation", i, insn_buf, &insn); |
264 | errors++; | 264 | errors++; |
265 | } else if (verbose && !insn_complete(&insn)) | 265 | } else if (verbose && !insn_complete(&insn)) |
266 | dump_stream(stdout, "Info: Found an undecodable input", i, insn_buf, &insn); | 266 | dump_stream(stdout, "Info: Found an undecodable input", i, insn_buf, &insn); |