computing-offload/generic_vdpa/qemu/qga-Improve-guest-exec-status-error-message.patch
jiangdongxu 79c4324644 add generic_vdpa basecode
Change-Id: I2d302dda68298877c65c99147f5bf22186a59aac
2024-09-19 17:19:46 +08:00

43 lines
1.2 KiB
Diff

From f28bc5e3a6418d8477e84b52e06dcab5db7cbf15 Mon Sep 17 00:00:00 2001
From: boringandboring <wangjinlei_yewu@cmss.chinamobile.com>
Date: Mon, 27 Nov 2023 15:52:06 +0800
Subject: [PATCH] qga: Improve guest-exec-status error message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
cherry picked from b665165938d89c8e1f83f970d3722f507ce87acd
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 <armbru@redhat.com>
Message-ID: <20231031111059.3407803-4-armbru@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
qga/commands.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qga/commands.c b/qga/commands.c
index 05f89725be..9fe73786fc 100644
--- a/qga/commands.c
+++ b/qga/commands.c
@@ -156,7 +156,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.27.0