summaryrefslogtreecommitdiffstats
path: root/eurephiadm
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2008-12-04 22:45:36 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2008-12-04 22:45:36 +0100
commit6643e6a35d046173fa75e3f557f96b2f1a6772b6 (patch)
tree50dd2999eec9b46528f6da7017f27da56c8995a7 /eurephiadm
parent93fa60b63d55a12a0a160370d613d7b3e27e9eeb (diff)
downloadeurephia-6643e6a35d046173fa75e3f557f96b2f1a6772b6.tar.gz
eurephia-6643e6a35d046173fa75e3f557f96b2f1a6772b6.tar.xz
eurephia-6643e6a35d046173fa75e3f557f96b2f1a6772b6.zip
BUGFIX: Corrected wrong --help|help command behaviour
Diffstat (limited to 'eurephiadm')
-rw-r--r--eurephiadm/eurephiadm.c7
1 files changed, 4 insertions, 3 deletions
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];