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: v12.2.11~74^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8934ecaceaa378d880488d51a7b35af2bec6abd1;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 311596b8820a..019a1e8cb501 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -2780,7 +2780,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;