From 6643e6a35d046173fa75e3f557f96b2f1a6772b6 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Thu, 4 Dec 2008 22:45:36 +0100 Subject: BUGFIX: Corrected wrong --help|help command behaviour --- eurephiadm/eurephiadm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'eurephiadm/eurephiadm.c') diff --git a/eurephiadm/eurephiadm.c b/eurephiadm/eurephiadm.c index b6c54c6..7375b21 100644 --- a/eurephiadm/eurephiadm.c +++ b/eurephiadm/eurephiadm.c @@ -57,9 +57,10 @@ int cmd_Help(eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, int a int i; char *prg = NULL; - // Print the modules help screen if it is given - if( argc > 1 ) { - char *help = (strlen_nullsafe(argv[2]) > 0 ? argv[2] : argv[1]); + // Print the modules help screen if module name is given + if( ((argc == 2) && (strcmp(argv[0], "help") == 0)) + || ((argc == 3) && (*argv[1] == '-')) ) { + char *help = (argc == 2 ? argv[1] : argv[2]); for( i = 0; cmdline_functions[i].command != NULL; i++ ) { func = (eurephiadm_functions *)&cmdline_functions[i]; -- cgit