]> git.proxmox.com Git - mirror_qemu.git/commit
monitor: restrict command getfd to POSIX hosts
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 2 Mar 2023 15:05:41 +0000 (19:05 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 13 Mar 2023 11:46:09 +0000 (15:46 +0400)
commit4bf21c7f748bee42b6f4692f8c37a11d1033b2d1
tree2020afbc1d980f53767c061e01e23ee98e722c83
parentf02b2c19174e3b5e0823e55cfb50d1b3153a485e
monitor: restrict command getfd to POSIX hosts

Currently, the function will simply fail if ancillary fds are not
provided, for ex on unsupported platforms.

This changes the failure from:

    {"error": {"class": "GenericError", "desc": "No file descriptor
    supplied via SCM_RIGHTS"}}

to:

    {"error": {"class": "CommandNotFound", "desc": "The command getfd
    has not been found"}}

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
hmp-commands.hx
monitor/fds.c
monitor/hmp-cmds.c
qapi/misc.json