[rrd-developers] [PATCH] rrdcached: Exit with status != 0, if an invalid command line option was used.

Sebastian Harl sh at tokkee.org
Wed Mar 24 09:04:29 CET 2010


---
 program/src/rrd_daemon.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/program/src/rrd_daemon.c b/program/src/rrd_daemon.c
index 65ba8e4..128f3c4 100644
--- a/program/src/rrd_daemon.c
+++ b/program/src/rrd_daemon.c
@@ -3115,7 +3115,10 @@ static int read_options (int argc, char **argv) /* {{{ */
             "please refer\n"
             "to the rrdcached(1) manual page.\n",
             VERSION);
-        status = -1;
+        if (option == 'h')
+          status = -1;
+        else
+          status = 1;
         break;
     } /* switch (option) */
   } /* while (getopt) */
-- 
1.6.5.rc2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.oetiker.ch/pipermail/rrd-developers/attachments/20100324/102e6d25/attachment-0001.pgp 


More information about the rrd-developers mailing list