Skip to content

Commit

Permalink
radosgw-admin: check params for object rewrite
Browse files Browse the repository at this point in the history
Signed-off-by: Yehuda Sadeh <[email protected]>
(cherry picked from commit 28c716b)
  • Loading branch information
yehudasa committed Apr 11, 2014
1 parent 43d837d commit f12bccc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/erasure-code/jerasure/gf-complete
Submodule gf-complete updated 1 files
+3 −3 src/gf_w128.c
2 changes: 1 addition & 1 deletion src/erasure-code/jerasure/jerasure
Submodule jerasure updated 1 files
+1 −1 src/jerasure.c
10 changes: 9 additions & 1 deletion src/rgw/rgw_admin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1817,6 +1817,14 @@ int main(int argc, char **argv)
}

if (opt_cmd == OPT_OBJECT_REWRITE) {
if (bucket_name.empty()) {
cerr << "ERROR: bucket not specified" << std::endl;
return EINVAL;
}
if (object.empty()) {
cerr << "ERROR: object not specified" << std::endl;
return EINVAL;
}
int ret = init_bucket(bucket_name, bucket);
if (ret < 0) {
cerr << "ERROR: could not init bucket: " << cpp_strerror(-ret) << std::endl;
Expand All @@ -1828,7 +1836,7 @@ int main(int argc, char **argv)

if (ret < 0) {
cerr << "ERROR: object remove returned: " << cpp_strerror(-ret) << std::endl;
return 1;
return -ret;
}
}

Expand Down

0 comments on commit f12bccc

Please sign in to comment.