From: Adam C. Emerson Date: Thu, 23 Aug 2018 15:26:30 +0000 (-0400) Subject: rbd_fuse: Use ceph_assert for asserts. X-Git-Tag: v14.0.1~475^2~5 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=5db100542003a43ca7eadc49b88b214763cd93f5;p=ceph.git rbd_fuse: Use ceph_assert for asserts. Signed-off-by: Adam C. Emerson --- diff --git a/src/rbd_fuse/CMakeLists.txt b/src/rbd_fuse/CMakeLists.txt index efeda706cc8a5..618992b776a1d 100644 --- a/src/rbd_fuse/CMakeLists.txt +++ b/src/rbd_fuse/CMakeLists.txt @@ -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) diff --git a/src/rbd_fuse/rbd-fuse.cc b/src/rbd_fuse/rbd-fuse.cc index 68a33e4bbccc0..a303724d68949 100644 --- a/src/rbd_fuse/rbd-fuse.cc +++ b/src/rbd_fuse/rbd-fuse.cc @@ -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) {