From 25f86ea14100db8f73a4b9edce39885ed2b39e34 Mon Sep 17 00:00:00 2001 From: subrata_modak Date: Mon, 23 Feb 2009 10:43:35 +0000 Subject: pan: Forward error messages to stderr: Unsure if I understand the code in the right manner, but other error messages are also forwarded to stderr instead of stdout. Signed-off-by: Juergen Beisert . --- pan/pan.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pan') diff --git a/pan/pan.c b/pan/pan.c index 9661442ea..3c2ae4d52 100644 --- a/pan/pan.c +++ b/pan/pan.c @@ -49,7 +49,7 @@ * - added option to create a command file with all failed tests. * */ -/* $Id: pan.c,v 1.31 2009/02/23 10:42:15 subrata_modak Exp $ */ +/* $Id: pan.c,v 1.32 2009/02/23 10:43:35 subrata_modak Exp $ */ #include #include @@ -237,9 +237,9 @@ main(int argc, char **argv) break; case 't': /* run_time to run */ ret = sscanf(optarg, "%d%c", &run_time, &modifier); - if (ret == 0) { printf("Need proper time input: ####x where" + if (ret == 0) { fprintf(stderr, "Need proper time input: ####x where" "x is one of s,m,h,d\n"); break; } - else if (ret == 1) { printf("Only got a time value of %d " + else if (ret == 1) { fprintf(stderr, "Only got a time value of %d " "modifiers need to come immediately after #" " assuming %c\n", run_time, modifier); } else @@ -251,7 +251,7 @@ main(int argc, char **argv) case 'h': run_time = run_time * 60 * 60; break; case 'd': run_time = run_time * 60 * 60 * 24; break; default: - printf("Invalid time modifier, try: s|h|m|d\n"); exit(-1); + fprintf(stderr, "Invalid time modifier, try: s|h|m|d\n"); exit(-1); } if (!quiet_mode) printf("PAN will run for %d seconds\n", run_time); -- cgit v1.2.3