Skip to content

storage-daemon: include current command line option in the errors

Paolo Bonzini qemu-devel 2 versions – Applied

Status from this message: Applied to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 5 repliesApplied
  2. v11 patch 3 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2storage-daemon: report unexpected arguments on the flystorage-daemon/qemu-storage-daemon.c+4 -53 replies
2/2storage-daemon: include current command line option in the errorsstorage-daemon/qemu-storage-daemon.c+17 -21 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchEric Blake
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] storage-daemon: include current command line option in the errors

Use the location management facilities that the emulator uses, so that the current command line option appears in the error message.

Before:

  $ storage-daemon/qemu-storage-daemon --nbd key..=
  qemu-storage-daemon: Invalid parameter 'key..'

After:

  $ storage-daemon/qemu-storage-daemon --nbd key..=
  qemu-storage-daemon: --nbd key..=: Invalid parameter 'key..'

The first patch tweaks the command line parsing so that argv is not reordered by getopt_long and optind is only advanced by one option+argument on every call to getopt_long. This is required by loc_set_cmdline.

Paolo Bonzini (2):
storage-daemon: report unexpected arguments on the fly
storage-daemon: include current command line option in the errors

 storage-daemon/qemu-storage-daemon.c | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)
Signature · 1 line
2.26.2