]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
admin/build-doc: use "ceph" for prefix of functions defined by libcephfs 33888/head
authorKefu Chai <kchai@redhat.com>
Wed, 11 Mar 2020 14:41:29 +0000 (22:41 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 11 Mar 2020 14:43:08 +0000 (22:43 +0800)
if some python module tries to `import cephfs`, it should not fail.

Signed-off-by: Kefu Chai <kchai@redhat.com>
admin/build-doc

index 930e2768ee31d47abfab2992a4385a67ebeeed75..289a2a68871143c710ad31cb7a22444cf3344a7a 100755 (executable)
@@ -93,7 +93,12 @@ for bind in rados rbd cephfs rgw; do
     if [ ! -e $lib_fn ]; then
        lib_fn=$vdir/lib/python*/*-packages/${bind}.so
     fi
-    nm $lib_fn | grep -E "U (lib)?${bind}" | \
+    if [ ${bind} = "cephfs" ]; then
+        func_prefix="ceph"
+    else
+        func_prefix="(lib)?${bind}"
+    fi
+    nm $lib_fn | grep -E "U ${func_prefix}" | \
         awk '{ print "void "$2"(void) {}" }' | \
         gcc -shared -o $vdir/lib/lib${bind}.so.1 -xc -
     if [ ${bind} != rados ]; then