From 4bf21c7f748bee42b6f4692f8c37a11d1033b2d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 2 Mar 2023 19:05:41 +0400 Subject: monitor: restrict command getfd to POSIX hosts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Markus Armbruster --- qapi/misc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qapi') diff --git a/qapi/misc.json b/qapi/misc.json index 5ef6286..6ddd16e 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -273,7 +273,7 @@ # <- { "return": {} } # ## -{ 'command': 'getfd', 'data': {'fdname': 'str'} } +{ 'command': 'getfd', 'data': {'fdname': 'str'}, 'if': 'CONFIG_POSIX' } ## # @get-win32-socket: -- cgit v1.1