From: Kefu Chai Date: Wed, 11 Mar 2020 14:41:29 +0000 (+0800) Subject: admin/build-doc: use "ceph" for prefix of functions defined by libcephfs X-Git-Tag: v15.2.9~122^2~44^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=71985c968ef5cf32b2bf16935d8a445a1b1e9948;p=ceph.git admin/build-doc: use "ceph" for prefix of functions defined by libcephfs if some python module tries to `import cephfs`, it should not fail. Signed-off-by: Kefu Chai (cherry picked from commit b9e282f0e3eed2cacf1aac0853dc6607053607a3) --- diff --git a/admin/build-doc b/admin/build-doc index 930e2768ee3..289a2a68871 100755 --- a/admin/build-doc +++ b/admin/build-doc @@ -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