From af9f7764a2c25d8b1507911d5acabdcc5ab18aa1 Mon Sep 17 00:00:00 2001 From: oetiker Date: Thu, 21 Oct 2004 19:21:24 +0000 Subject: [PATCH] fix return codes in the error case -- Haroon Rafique git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@292 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_tool.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/rrd_tool.c b/src/rrd_tool.c index 6aa53cc..9ea38ce 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -96,7 +96,8 @@ void PrintUsage(char *cmd) "\t\t[-h|--height pixels] [-o|--logarithmic]\n" "\t\t[-u|--upper-limit value] [-z|--lazy]\n" "\t\t[-l|--lower-limit value] [-r|--rigid]\n" - "\t\t[-g|--no-legend]\n"; + "\t\t[-g|--no-legend]\n" + "\t\t[-F|--force-rules-legend]\n"; char help_graph2[] = "\t\t[-j|--only-graph]\n" "\t\t[--font FONTTAG:size:font]\n" @@ -384,8 +385,11 @@ int main(int argc, char *argv[]) PrintUsage(argv[2]); exit(0); } - else - HandleInputLine(argc, argv, stderr); + else { + if(HandleInputLine(argc, argv, stderr)) { + return 1; + } + } return 0; } @@ -642,6 +646,7 @@ int HandleInputLine(int argc, char **argv, FILE* out) if (rrd_test_error()) { fprintf(out, "ERROR: %s\n",rrd_get_error()); rrd_clear_error(); + return 1; } return(0); } -- 2.11.0