thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-qga-rename-Error-parameter-to-more-common-errp.patch

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