]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/ceph_radosacl: print out return code of "acl set"
authorKefu Chai <kchai@redhat.com>
Wed, 23 Nov 2016 05:21:44 +0000 (13:21 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 23 Nov 2016 06:52:17 +0000 (14:52 +0800)
this silences the warning of

Value stored to 'r' is never read.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/tools/radosacl.cc

index 89989f21418e6f4a75dcc30f0fef65b6fe9c3f1c..1eddef915ca2b6ae5020e46a834639c728bc97b1 100644 (file)
@@ -155,7 +155,8 @@ int main(int argc, const char **argv)
   cout << "id=" << id.id << std::endl;
 
   r = io_ctx.exec(oid, "acl", "get", bl, bl2);
-  cout << "exec returned " << r << " len=" << bl2.length() << std::endl;
+  cout << "exec(acl get) returned " << r
+       << " len=" << bl2.length() << std::endl;
   ObjectACLs oa;
   if (r >= 0) {
     bufferlist::iterator iter = bl2.begin();
@@ -166,6 +167,8 @@ int main(int argc, const char **argv)
   bl.clear();
   oa.encode(bl);
   r = io_ctx.exec(oid, "acl", "set", bl, bl2);
+  cout << "exec(acl set) returned " << r
+       << " len=" << bl2.length() << std::endl;
 
   const unsigned char *md5 = (const unsigned char *)bl2.c_str();
   char md5_str[bl2.length()*2 + 1];