summaryrefslogtreecommitdiffstats
path: root/src/ceph_fuse.cc
diff options
context:
space:
mode:
authorXiubo Li <xiubli@redhat.com>2020-05-11 05:53:35 +0200
committerXiubo Li <xiubli@redhat.com>2020-07-08 09:59:15 +0200
commit093aba80fbea5d977bf0c585261cd40996b80ef5 (patch)
tree591475b750854ccc4e545fa62c0f128b18597115 /src/ceph_fuse.cc
parentceph-fuse: add splice read/write support to reduce the memory copy (diff)
downloadceph-093aba80fbea5d977bf0c585261cd40996b80ef5.tar.xz
ceph-093aba80fbea5d977bf0c585261cd40996b80ef5.zip
ceph-fuse: show fuse helper options for libfuse >= 3.0
Since libfuse 3.0 the fuse_parse_cmdline have remove the showing of usage, we must call the helper ourself. Signed-off-by: Xiubo Li <xiubli@redhat.com>
Diffstat (limited to 'src/ceph_fuse.cc')
-rw-r--r--src/ceph_fuse.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ceph_fuse.cc b/src/ceph_fuse.cc
index 26bdfbbe9fc..1529ec2322e 100644
--- a/src/ceph_fuse.cc
+++ b/src/ceph_fuse.cc
@@ -58,7 +58,15 @@ static void fuse_usage()
struct fuse_args args = FUSE_ARGS_INIT(2, (char**)argv);
#if FUSE_VERSION >= FUSE_MAKE_VERSION(3, 0)
struct fuse_cmdline_opts opts = {};
- if (fuse_parse_cmdline(&args, &opts) == -1) {
+ if (fuse_parse_cmdline(&args, &opts) != -1) {
+ if (opts.show_help) {
+ cout << "usage: " << argv[0] << " [options] <mountpoint>\n\n";
+ cout << "FUSE options:\n";
+ fuse_cmdline_help();
+ fuse_lowlevel_help();
+ cout << "\n";
+ }
+ } else {
#else
if (fuse_parse_cmdline(&args, nullptr, nullptr, nullptr) == -1) {
#endif