storage-daemon: include current command line option in the errors
commit501a4b3681c90bbcf610fbbd6335c26af30668d7
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 1 Mar 2021 15:28:44 +0000 (1 10:28 -0500)
committerKevin Wolf <kwolf@redhat.com>
Mon, 8 Mar 2021 13:55:18 +0000 (8 14:55 +0100)
treeb4862e6a07064a9a2938964978123aa34fe4ca92
parenta5ef35052e66721e9f943b2b9a91176536b4d896
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..'

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210301152844.291799-3-pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
storage-daemon/qemu-storage-daemon.c