Skip to contentSkip to conversation

qemu-storage-daemon: Only display FUSE help when FUSE is built-in

PATCH Applied Philippe Mathieu-Daudé 4 participants 5 messages Aug 16, 2021 – Sep 16, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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=<id>,node-name=<node-name>,mountpoint=<file>
             [,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'
---
 storage-daemon/qemu-storage-daemon.c | 2 ++
 1 file changed, 2 insertions(+)
storage-daemon/qemu-storage-daemon.c +2 -0
index fc8b1506297..10a1a33761d 100644
@@ -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=<id>,node-name=<node-name>,mountpoint=<file>\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"
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Philippe Mathieu-Daudé

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=<id>,node-name=<node-name>,mountpoint=<file>
             [,growable=on|off][,writable=on|off]
                           export the specified block node over FUSE

Remove this help message when FUSE is disabled, to avoid:

Quoted 8 lines
  $ qemu-storage-daemon --export fuse
  qemu-storage-daemon: --export fuse: Invalid parameter 'fuse'
---
 storage-daemon/qemu-storage-daemon.c | 2 ++
 1 file changed, 2 insertions(+)
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
Reviewed-by on v1 1/1
#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 13 lines · Philippe Mathieu-Daudé

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=<id>,node-name=<node-name>,mountpoint=<file>
              [,growable=on|off][,writable=on|off]
                            export the specified block node over FUSE

Remove this help message when FUSE is disabled, to avoid:

Quoted 8 lines
   $ qemu-storage-daemon --export fuse
   qemu-storage-daemon: --export fuse: Invalid parameter 'fuse'
---
  storage-daemon/qemu-storage-daemon.c | 2 ++
  1 file changed, 2 insertions(+)
#3 lore raw
In reply to Philippe Mathieu-Daudé

ping & Cc'ing qemu-trivial@ (reviewed twice) ...

Quoted 40 lines · Philippe Mathieu-Daudé

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=<id>,node-name=<node-name>,mountpoint=<file>
             [,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'
---
 storage-daemon/qemu-storage-daemon.c | 2 ++
 1 file changed, 2 insertions(+)
storage-daemon/qemu-storage-daemon.c +2 -0
index fc8b1506297..10a1a33761d 100644
@@ -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=<id>,node-name=<node-name>,mountpoint=<file>\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"
Applied
#4 lore raw

Am 15.09.2021 um 23:36 hat Philippe Mathieu-Daudé geschrieben:

Quoted 21 lines

ping & Cc'ing qemu-trivial@ (reviewed twice) ...

Quoted 18 lines · Philippe Mathieu-Daudé

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=<id>,node-name=<node-name>,mountpoint=<file>
             [,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'

Thanks, applied to the block branch.

Kevin