From b665165938d89c8e1f83f970d3722f507ce87acd Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 31 Oct 2023 12:10:55 +0100 Subject: [PATCH] qga: Improve guest-exec-status error message MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When the PID passed to guest-exec-status does not exist, we report "Invalid parameter 'pid'" Improve this to "PID 1234 does not exist" Signed-off-by: Markus Armbruster Message-ID: <20231031111059.3407803-4-armbru@redhat.com> Reviewed-by: Konstantin Kostiuk Reviewed-by: Philippe Mathieu-Daudé --- qga/commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands.c b/qga/commands.c index ce172edd2d0..88c1c99fe51 100644 --- a/qga/commands.c +++ b/qga/commands.c @@ -154,7 +154,7 @@ GuestExecStatus *qmp_guest_exec_status(int64_t pid, Error **errp) gei = guest_exec_info_find(pid); if (gei == NULL) { - error_setg(errp, QERR_INVALID_PARAMETER, "pid"); + error_setg(errp, "PID " PRId64 " does not exist"); return NULL; } -- 2.39.5