From: Nick Erdmann Date: Wed, 12 Sep 2018 13:56:41 +0000 (+0200) Subject: rgw/radosgw-admin: allow negative values for --max-size X-Git-Tag: v13.2.5~121^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5d9a52da7aae9af6600226c345f919b157524852;p=ceph.git rgw/radosgw-admin: allow negative values for --max-size Fix regression in e664488e. Signed-off-by: Nick Erdmann (cherry picked from commit 0ef92541d34cc897cec97854b358e7e702e44dcb) --- diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 64768ee49f53..9098e20ddc83 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -2898,7 +2898,7 @@ int main(int argc, const char **argv) return EINVAL; } } else if (ceph_argparse_witharg(args, i, &val, "--max-size", (char*)NULL)) { - max_size = strict_iecstrtoll(val.c_str(), &err); + max_size = strict_iec_cast(val.c_str(), &err); if (!err.empty()) { cerr << "ERROR: failed to parse max size: " << err << std::endl; return EINVAL;