From: oetiker Date: Thu, 21 Oct 2004 19:21:24 +0000 (+0000) Subject: fix return codes in the error case -- Haroon Rafique X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=af9f7764a2c25d8b1507911d5acabdcc5ab18aa1;p=rrdtool.git 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 --- 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); }