The --show-args dumps the arguments passed on the command line.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
{
CephInitParameters iparams(module_type);
std::string val;
+
+ vector<const char *> orig_args = args;
+
for (std::vector<const char*>::iterator i = args.begin(); i != args.end(); ) {
if (strcmp(*i, "--") == 0) {
/* Normally we would use ceph_argparse_double_dash. However, in this
_exit(1);
}
}
+ else if (ceph_argparse_flag(args, i, "--show_args", (char*)NULL)) {
+ cout << "args: ";
+ for (std::vector<const char *>::iterator ci = orig_args.begin(); ci != orig_args.end(); ++ci) {
+ if (ci != orig_args.begin())
+ cout << " ";
+ cout << *ci;
+ }
+ cout << std::endl;
+ }
else {
// ignore
++i;