unable to parse option: ''
Is difficult to figure out. It is much better if shown in the context in
which it was found:
ceph-conf --help ''
unable to parse option: ''
args: '--help' ''
Signed-off-by: Loic Dachary <loic@dachary.org>
argv_to_vec(argc, argv, args);
env_to_vec(args);
+ vector<const char*> orig_args = args;
global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_DAEMON,
CINIT_FLAG_NO_DAEMON_ACTIONS);
lookup_key = *i++;
} else {
cerr << "unable to parse option: '" << *i << "'" << std::endl;
+ cerr << "args:";
+ for (std::vector<const char *>::iterator ci = orig_args.begin(); ci != orig_args.end(); ++ci) {
+ cerr << " '" << *ci << "'";
+ }
+ cerr << std::endl;
usage();
exit(1);
}