]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd_fuse: Use ceph_assert for asserts.
authorAdam C. Emerson <aemerson@redhat.com>
Thu, 23 Aug 2018 15:26:30 +0000 (11:26 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Mon, 27 Aug 2018 14:27:22 +0000 (10:27 -0400)
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rbd_fuse/CMakeLists.txt
src/rbd_fuse/rbd-fuse.cc

index efeda706cc8a5beac236bcdc1ddc662e09d0cad6..618992b776a1d876708f4c166cd98d45efb1def2 100644 (file)
@@ -1,5 +1,5 @@
 add_executable(rbd-fuse
   rbd-fuse.cc)
 target_link_libraries(rbd-fuse
-  librbd librados ${FUSE_LIBRARIES})
+  ceph-common librbd librados ${FUSE_LIBRARIES})
 install(TARGETS rbd-fuse DESTINATION bin)
index 68a33e4bbccc0092985507a08ce4205027e58cde..a303724d689490da2ccf9a86d9798d8f74d80e03 100644 (file)
@@ -29,6 +29,8 @@
 #include "include/compat.h"
 #include "include/rbd/librbd.h"
 
+#include "include/assert.h"
+
 static int gotrados = 0;
 char *pool_name;
 char *mount_image_name;
@@ -111,7 +113,7 @@ enumerate_images(struct rbd_image_data *data)
 
        ret = rbd_list(ioctx, ibuf, &ibuf_len);
        if (ret == -ERANGE) {
-               assert(ibuf_len > 0);
+               ceph_assert(ibuf_len > 0);
                ibuf = (char*) malloc(ibuf_len);
                if (!ibuf) {
                        simple_err("Failed to get ibuf", -ENOMEM);
@@ -128,7 +130,7 @@ enumerate_images(struct rbd_image_data *data)
                free(ibuf);
                return;
        }
-       assert(ret == (int)ibuf_len);
+       ceph_assert(ret == (int)ibuf_len);
 
        fprintf(stderr, "pool %s: ", pool_name);
        for (ip = ibuf; ip < &ibuf[ibuf_len]; ip += strlen(ip) + 1)  {