From: Philippe Mathieu-Daudé Date: Mon, 16 Aug 2021 18:04:42 +0000 (+0200) Subject: qemu-storage-daemon: Only display FUSE help when FUSE is built-in X-Git-Tag: v6.2.0-rc0~69^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d1bbd965bd96028b0f5a8e3dc01b37f1f8ae4456;p=thirdparty%2Fqemu.git qemu-storage-daemon: Only display FUSE help when FUSE is built-in When configuring QEMU with --disable-fuse, the qemu-storage-daemon still reports FUSE command line options in its help: $ qemu-storage-daemon -h Usage: qemu-storage-daemon [options] QEMU storage daemon --export [type=]fuse,id=,node-name=,mountpoint= [,growable=on|off][,writable=on|off] export the specified block node over FUSE Remove this help message when FUSE is disabled, to avoid: $ qemu-storage-daemon --export fuse qemu-storage-daemon: --export fuse: Invalid parameter 'fuse' Reported-by: Qing Wang Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210816180442.2000642-1-philmd@redhat.com> Reviewed-by: Eric Blake Reviewed-by: Hanna Reitz Signed-off-by: Kevin Wolf --- diff --git a/storage-daemon/qemu-storage-daemon.c b/storage-daemon/qemu-storage-daemon.c index fc8b1506297..10a1a33761d 100644 --- a/storage-daemon/qemu-storage-daemon.c +++ b/storage-daemon/qemu-storage-daemon.c @@ -98,10 +98,12 @@ static void help(void) " export the specified block node over NBD\n" " (requires --nbd-server)\n" "\n" +#ifdef CONFIG_FUSE " --export [type=]fuse,id=,node-name=,mountpoint=\n" " [,growable=on|off][,writable=on|off]\n" " export the specified block node over FUSE\n" "\n" +#endif /* CONFIG_FUSE */ " --monitor [chardev=]name[,mode=control][,pretty[=on|off]]\n" " configure a QMP monitor\n" "\n"