diff options
author | Jon Robertson <jonrober@stanford.edu> | 2012-03-12 18:51:49 -0400 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2012-05-08 15:58:17 -0700 |
commit | 0eb1a4532014ce51e593e740c2d2bc72d797c5c7 (patch) | |
tree | 7cd8ca7c171f312c42a5c7dd2d73921519e6f748 /util | |
parent | bbcbb932a3a251724674792598725e53deb7b1af (diff) |
Add help interface to remctl commands
Added a 'summary=<arg>' option in the remctl config files. A user who
runs a simple 'help' command against the server will have returned the
results of running each command he has access to with whatever argument
has been specified as the summary command. This both lets him get an
idea of all commands he has access to, and provides basic help for those
commands.
Added a 'help=<arg>' option in the remctl config files. A user who runs
'help <command>' will have the command program run with whatever
argument is specified in that option. This creates a standard way to
get further help for any commands the user can run on the server.
Further, running 'help <command> <subcommand>' will pass along the
subcommand requested, so that the program can give more specific help
if it's so written.
Change-Id: I5202e4973bfb62f6374135e0010798e9372737dc
Reviewed-on: https://gerrit.stanford.edu/267
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Diffstat (limited to 'util')
-rw-r--r-- | util/protocol.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/protocol.h b/util/protocol.h index 41b6dd9..6d64228 100644 --- a/util/protocol.h +++ b/util/protocol.h @@ -45,7 +45,8 @@ enum error_codes { ERROR_ACCESS = 6, /* Access denied. */ ERROR_TOOMANY_ARGS = 7, /* Argument count exceeds server limit. */ ERROR_TOOMUCH_DATA = 8, /* Argument size exceeds server limit. */ - ERROR_UNEXPECTED_MESSAGE = 9 /* Message type not valid now. */ + ERROR_UNEXPECTED_MESSAGE = 9, /* Message type not valid now. */ + ERROR_NO_HELP = 10 /* No help defined for this command. */ }; #endif /* UTIL_PROTOCOL_H */ |