Skip to content

Commit

Permalink
add help options
Browse files Browse the repository at this point in the history
  • Loading branch information
bbonev committed Jul 5, 2020
1 parent 2714ea3 commit 1dcf3c4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions eoipcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ typedef enum {
C_ADD,
C_SET,
C_VER,
C_HELP,
P_LOCAL,
P_REMOTE,
P_TUNNELID,
Expand All @@ -172,6 +173,9 @@ static s_cmd cmds[] = {
{ .cmd = "version", .cid = C_VER, },
{ .cmd = "--version", .cid = C_VER, },
{ .cmd = "-v", .cid = C_VER, },
{ .cmd = "help", .cid = C_HELP, },
{ .cmd = "--help", .cid = C_HELP, },
{ .cmd = "-h", .cid = C_HELP, },
{ .cmd = NULL, .cid = 0, },
};

Expand Down Expand Up @@ -237,6 +241,7 @@ int main(int argc,char **argv) {
switch (c) {
dafeutl:
default:
case C_HELP:
usage(argv[0]);
return 0;
case C_VER:
Expand Down

0 comments on commit 1dcf3c4

Please sign in to comment.