Skip to content

Commit

Permalink
Minor bugfix pointed out by David Vincelli: When an invalid command i…
Browse files Browse the repository at this point in the history
…s given to wdctl, the error message showed "Invalid command: wdctl" instead of the actual command supplied
  • Loading branch information
Mina Naguib committed May 24, 2005
1 parent 4998db4 commit 00fcf00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# $Header$

2005-05-24 Mina Naguib <[email protected]>
* wdctl.c: Minor bugfix pointed out by David Vincelli: When an invalid
command is given to wdctl, the error message showed "Invalid command:
wdctl" instead of the actual command supplied

2005-05-23 Philippe April <[email protected]>
* Released 1.1.2_pre1

Expand Down
5 changes: 2 additions & 3 deletions src/wdctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,8 @@ parse_commandline(int argc, char **argv)
}
config.param = strdup(*(argv + optind + 1));
}

if (config.command == WDCTL_UNDEF) {
fprintf(stderr, "wdctl: Error: Invalid command \"%s\"\n", *argv);
else {
fprintf(stderr, "wdctl: Error: Invalid command \"%s\"\n", *(argv + optind));
usage();
exit(1);
}
Expand Down

0 comments on commit 00fcf00

Please sign in to comment.