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

Tobias Oetiker tobi at oetiker.ch
Wed Mar 24 18:20:14 CET 2010


Hi Sebastian,

thanks ...

applied to 1.4 and trunk

Today Sebastian Harl wrote:

> ---
>  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) */
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the rrd-developers mailing list