diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-03-02 19:05:41 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-03-13 15:46:09 +0400 |
commit | 4bf21c7f748bee42b6f4692f8c37a11d1033b2d1 (patch) | |
tree | 2020afbc1d980f53767c061e01e23ee98e722c83 /hmp-commands.hx | |
parent | f02b2c19174e3b5e0823e55cfb50d1b3153a485e (diff) |
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>
Diffstat (limited to 'hmp-commands.hx')
-rw-r--r-- | hmp-commands.hx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hmp-commands.hx b/hmp-commands.hx index b87c250e23..bb85ee1d26 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1486,6 +1486,7 @@ SRST Inject an MCE on the given CPU (x86 only). ERST +#ifdef CONFIG_POSIX { .name = "getfd", .args_type = "fdname:s", @@ -1501,6 +1502,7 @@ SRST mechanism on unix sockets, it is stored using the name *fdname* for later use by other monitor commands. ERST +#endif { .name = "closefd", |