|
|
c687bc |
From 457ba062cc1026a88a70ab3cb9a52acd62c5a2a8 Mon Sep 17 00:00:00 2001
|
|
|
c687bc |
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
|
|
|
c687bc |
Date: Thu, 24 Dec 2020 12:53:02 -0500
|
|
|
c687bc |
Subject: [PATCH 2/5] qga: rename Error ** parameter to more common errp
|
|
|
c687bc |
MIME-Version: 1.0
|
|
|
c687bc |
Content-Type: text/plain; charset=UTF-8
|
|
|
c687bc |
Content-Transfer-Encoding: 8bit
|
|
|
c687bc |
|
|
|
c687bc |
RH-Author: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
c687bc |
Message-id: <20201224125304.62697-2-marcandre.lureau@redhat.com>
|
|
|
c687bc |
Patchwork-id: 100498
|
|
|
c687bc |
O-Subject: [RHEL-8.4.0 qemu-kvm PATCH 1/3] qga: rename Error ** parameter to more common errp
|
|
|
c687bc |
Bugzilla: 1910326
|
|
|
c687bc |
RH-Acked-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
c687bc |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
c687bc |
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
c687bc |
|
|
|
c687bc |
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
|
|
c687bc |
|
|
|
c687bc |
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
|
|
c687bc |
Message-Id: <20191205174635.18758-13-vsementsov@virtuozzo.com>
|
|
|
c687bc |
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
c687bc |
Reviewed-by: Markus Armbruster <armbru@redhat.com>
|
|
|
c687bc |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
|
c687bc |
|
|
|
c687bc |
(cherry picked from commit b90abbac0b95f68a7ebac5545ab77b98f598a9c7)
|
|
|
c687bc |
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
c687bc |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
c687bc |
---
|
|
|
c687bc |
qga/commands-posix.c | 2 +-
|
|
|
c687bc |
qga/commands-win32.c | 2 +-
|
|
|
c687bc |
qga/commands.c | 12 ++++++------
|
|
|
c687bc |
3 files changed, 8 insertions(+), 8 deletions(-)
|
|
|
c687bc |
|
|
|
c687bc |
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
|
|
|
c687bc |
index c02373cdf7d..29353e90c8f 100644
|
|
|
c687bc |
--- a/qga/commands-posix.c
|
|
|
c687bc |
+++ b/qga/commands-posix.c
|
|
|
c687bc |
@@ -3134,7 +3134,7 @@ static double ga_get_login_time(struct utmpx *user_info)
|
|
|
c687bc |
return seconds + useconds;
|
|
|
c687bc |
}
|
|
|
c687bc |
|
|
|
c687bc |
-GuestUserList *qmp_guest_get_users(Error **err)
|
|
|
c687bc |
+GuestUserList *qmp_guest_get_users(Error **errp)
|
|
|
c687bc |
{
|
|
|
c687bc |
GHashTable *cache = NULL;
|
|
|
c687bc |
GuestUserList *head = NULL, *cur_item = NULL;
|
|
|
c687bc |
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
|
|
|
c687bc |
index a07725e874b..618ccdfadaa 100644
|
|
|
c687bc |
--- a/qga/commands-win32.c
|
|
|
c687bc |
+++ b/qga/commands-win32.c
|
|
|
c687bc |
@@ -2047,7 +2047,7 @@ typedef struct _GA_WTSINFOA {
|
|
|
c687bc |
|
|
|
c687bc |
} GA_WTSINFOA;
|
|
|
c687bc |
|
|
|
c687bc |
-GuestUserList *qmp_guest_get_users(Error **err)
|
|
|
c687bc |
+GuestUserList *qmp_guest_get_users(Error **errp)
|
|
|
c687bc |
{
|
|
|
c687bc |
#define QGA_NANOSECONDS 10000000
|
|
|
c687bc |
|
|
|
c687bc |
diff --git a/qga/commands.c b/qga/commands.c
|
|
|
c687bc |
index 0c7d1385c23..43c323ceada 100644
|
|
|
c687bc |
--- a/qga/commands.c
|
|
|
c687bc |
+++ b/qga/commands.c
|
|
|
c687bc |
@@ -143,7 +143,7 @@ static GuestExecInfo *guest_exec_info_find(int64_t pid_numeric)
|
|
|
c687bc |
return NULL;
|
|
|
c687bc |
}
|
|
|
c687bc |
|
|
|
c687bc |
-GuestExecStatus *qmp_guest_exec_status(int64_t pid, Error **err)
|
|
|
c687bc |
+GuestExecStatus *qmp_guest_exec_status(int64_t pid, Error **errp)
|
|
|
c687bc |
{
|
|
|
c687bc |
GuestExecInfo *gei;
|
|
|
c687bc |
GuestExecStatus *ges;
|
|
|
c687bc |
@@ -152,7 +152,7 @@ GuestExecStatus *qmp_guest_exec_status(int64_t pid, Error **err)
|
|
|
c687bc |
|
|
|
c687bc |
gei = guest_exec_info_find(pid);
|
|
|
c687bc |
if (gei == NULL) {
|
|
|
c687bc |
- error_setg(err, QERR_INVALID_PARAMETER, "pid");
|
|
|
c687bc |
+ error_setg(errp, QERR_INVALID_PARAMETER, "pid");
|
|
|
c687bc |
return NULL;
|
|
|
c687bc |
}
|
|
|
c687bc |
|
|
|
c687bc |
@@ -385,7 +385,7 @@ GuestExec *qmp_guest_exec(const char *path,
|
|
|
c687bc |
bool has_env, strList *env,
|
|
|
c687bc |
bool has_input_data, const char *input_data,
|
|
|
c687bc |
bool has_capture_output, bool capture_output,
|
|
|
c687bc |
- Error **err)
|
|
|
c687bc |
+ Error **errp)
|
|
|
c687bc |
{
|
|
|
c687bc |
GPid pid;
|
|
|
c687bc |
GuestExec *ge = NULL;
|
|
|
c687bc |
@@ -405,7 +405,7 @@ GuestExec *qmp_guest_exec(const char *path,
|
|
|
c687bc |
arglist.next = has_arg ? arg : NULL;
|
|
|
c687bc |
|
|
|
c687bc |
if (has_input_data) {
|
|
|
c687bc |
- input = qbase64_decode(input_data, -1, &ninput, err);
|
|
|
c687bc |
+ input = qbase64_decode(input_data, -1, &ninput, errp);
|
|
|
c687bc |
if (!input) {
|
|
|
c687bc |
return NULL;
|
|
|
c687bc |
}
|
|
|
c687bc |
@@ -424,7 +424,7 @@ GuestExec *qmp_guest_exec(const char *path,
|
|
|
c687bc |
guest_exec_task_setup, NULL, &pid, has_input_data ? &in_fd : NULL,
|
|
|
c687bc |
has_output ? &out_fd : NULL, has_output ? &err_fd : NULL, &gerr);
|
|
|
c687bc |
if (!ret) {
|
|
|
c687bc |
- error_setg(err, QERR_QGA_COMMAND_FAILED, gerr->message);
|
|
|
c687bc |
+ error_setg(errp, QERR_QGA_COMMAND_FAILED, gerr->message);
|
|
|
c687bc |
g_error_free(gerr);
|
|
|
c687bc |
goto done;
|
|
|
c687bc |
}
|
|
|
c687bc |
@@ -499,7 +499,7 @@ int ga_parse_whence(GuestFileWhence *whence, Error **errp)
|
|
|
c687bc |
return -1;
|
|
|
c687bc |
}
|
|
|
c687bc |
|
|
|
c687bc |
-GuestHostName *qmp_guest_get_host_name(Error **err)
|
|
|
c687bc |
+GuestHostName *qmp_guest_get_host_name(Error **errp)
|
|
|
c687bc |
{
|
|
|
c687bc |
GuestHostName *result = NULL;
|
|
|
c687bc |
gchar const *hostname = g_get_host_name();
|
|
|
c687bc |
--
|
|
|
c687bc |
2.27.0
|
|
|
c687bc |
|