Skip to content

Commit

Permalink
qga: Improve guest-exec-status error message
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Markus Armbruster committed Nov 17, 2023
1 parent 7200fb2 commit b665165
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qga/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b665165

Please sign in to comment.