]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rbd: print uint64_t in a platform neutral way
authorKefu Chai <kchai@redhat.com>
Sat, 29 Apr 2017 18:02:55 +0000 (02:02 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 1 May 2017 07:45:42 +0000 (15:45 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/cls/rbd/cls_rbd.cc

index 5dc53a08126e5418cc1fec7361e71b9881803cf9..206028c83ec63abaa3144588e62d91171c022a59 100644 (file)
@@ -1610,7 +1610,7 @@ int snapshot_add(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
 
     total_read += vals.size();
     if (total_read >= snap_limit) {
-      CLS_ERR("Attempt to create snapshot over limit of %lu", snap_limit);
+      CLS_ERR("Attempt to create snapshot over limit of %" PRIu64, snap_limit);
       return -EDQUOT;
     }
 
@@ -2752,7 +2752,7 @@ int snapshot_get_limit(cls_method_context_t hctx, bufferlist *in,
     return r;
   }
 
-  CLS_LOG(20, "read snapshot limit %lu", snap_limit);
+  CLS_LOG(20, "read snapshot limit %" PRIu64, snap_limit);
   ::encode(snap_limit, *out);
 
   return 0;
@@ -2776,7 +2776,7 @@ int snapshot_set_limit(cls_method_context_t hctx, bufferlist *in,
     CLS_LOG(20, "remove snapshot limit\n");
     rc = cls_cxx_map_remove_key(hctx, "snap_limit");
   } else {
-    CLS_LOG(20, "set snapshot limit to %lu\n", new_limit);
+    CLS_LOG(20, "set snapshot limit to %" PRIu64 "\n", new_limit);
     ::encode(new_limit, bl);
     rc = cls_cxx_map_set_val(hctx, "snap_limit", &bl);
   }