cmd: Add support for params with optional values
authorSimon Wilkinson <sxw@your-file-system.com>
Tue, 19 Apr 2011 18:37:37 +0000 (19:37 +0100)
committerDerrick Brashear <shadow@dementia.org>
Wed, 27 Apr 2011 19:08:03 +0000 (12:08 -0700)
commitd0d8b391b0c634f44cb019fd73fddf6ee523cfaa
tree86168e8bd7a628f2977dcee61a073fd3ddd53f71
parentf8570d2b64e72d20c31c29878de0e737cf59dec3
cmd: Add support for params with optional values

Add the CMD_SINGLE_OR_FLAG option which permits a parameter to
either have a single value, or no value at all. If it has no value,
then it behaves in the same way as the current 'flag' implementation.

Change-Id: I49cf313f1d3b9c369f87b1ff66bfcc038b8aa08a
Reviewed-on: http://gerrit.openafs.org/4545
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/cmd/cmd.c
src/cmd/cmd.p.h
tests/cmd/command-t.c