[Spice-devel] [PATCH spice-server 1/2] reds_stat: Print errors on standard error, not standard output
Frediano Ziglio
fziglio at redhat.com
Sat Dec 22 16:45:50 UTC 2018
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
tools/reds_stat.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/reds_stat.c b/tools/reds_stat.c
index 10016fdb..3110afb4 100644
--- a/tools/reds_stat.c
+++ b/tools/reds_stat.c
@@ -101,7 +101,7 @@ int main(int argc, char **argv)
}
if (argc > 2 || !kvm_pid) {
- printf("usage: reds_stat [qemu_pid] (e.g. `pgrep qemu`)\n");
+ fprintf(stderr, "usage: reds_stat [qemu_pid] (e.g. `pgrep qemu`)\n");
return -1;
}
shm_name_len = strlen(SPICE_STAT_SHM_NAME) + 64;
@@ -128,11 +128,11 @@ int main(int argc, char **argv)
goto error;
}
if (reds_stat->magic != SPICE_STAT_MAGIC) {
- printf("bad magic %u\n", reds_stat->magic);
+ fprintf(stderr, "bad magic %u\n", reds_stat->magic);
goto error;
}
if (reds_stat->version != SPICE_STAT_VERSION) {
- printf("bad version %u\n", reds_stat->version);
+ fprintf(stderr, "bad version %u\n", reds_stat->version);
goto error;
}
while (1) {
--
2.17.2
More information about the Spice-devel
mailing list