From 6b87ff130721b149d4f16cf5bbd8b7bdb4a02694 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@292 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_tool.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/program/src/rrd_tool.c b/program/src/rrd_tool.c index 6aa53cc5..9ea38ce9 100644 --- a/program/src/rrd_tool.c +++ b/program/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.30.2