X-Git-Url: https://git.proxmox.com/?p=ceph.git;a=blobdiff_plain;f=ceph%2Fsrc%2Fcommon%2Fconfig.cc;h=3cbb27e3484c043788d3412786c7a48b9908cea8;hp=ea372bfb38649e8843bd32801f472bf0a4bdc279;hb=3efd99882e8c73385040d3f5c48fd014e4247be7;hpb=1a629971a9bcaaae99e5539a3a43f800a297f267 diff --git a/ceph/src/common/config.cc b/ceph/src/common/config.cc index ea372bfb3..3cbb27e34 100644 --- a/ceph/src/common/config.cc +++ b/ceph/src/common/config.cc @@ -492,7 +492,10 @@ int md_config_t::parse_argv(std::vector& args) set_val_or_die("client_mountpoint", val.c_str()); } else { - parse_option(args, i, NULL); + int r = parse_option(args, i, NULL); + if (r < 0) { + return r; + } } } @@ -536,8 +539,16 @@ int md_config_t::parse_option(std::vector& args, std::string as_option("--"); as_option += "debug_"; as_option += subsys.get_name(o); - if (ceph_argparse_witharg(args, i, &val, + ostringstream err; + if (ceph_argparse_witharg(args, i, &val, err, as_option.c_str(), (char*)NULL)) { + if (err.tellp()) { + if (oss) { + *oss << err.str(); + } + ret = -EINVAL; + break; + } int log, gather; int r = sscanf(val.c_str(), "%d/%d", &log, &gather); if (r >= 1) {