cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

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

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