]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph_argparse: add _daemon versions of argparse calls
authorDan Mick <dan.mick@inktank.com>
Mon, 8 Apr 2013 20:49:22 +0000 (13:49 -0700)
committerDan Mick <dan.mick@inktank.com>
Tue, 9 Apr 2013 00:49:15 +0000 (17:49 -0700)
commitc76bbc2e6df16d283cac3613628a44937e38bed8
tree70560259ec9f13fb33c196f6f57d6a1bae28b0d1
parentd7b7acefc8e106f2563771a721944c57e10d54fb
ceph_argparse: add _daemon versions of argparse calls

mon needs to call argparse for a couple of -- options, and the
argparse_witharg routines were attempting to cerr/exit on missing
arguments.  This is appropriate for the CLI usage, but not the daemon
usage.  Add a 'cli' flag that can be set false for the daemon usage
(and cause the parsing routine to return false instead of exit).

The daemon's parsing code due for a rewrite soon.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
src/common/ceph_argparse.cc
src/common/ceph_argparse.h