aboutsummaryrefslogtreecommitdiffstats
path: root/community/qemu/guest-agent-shutdown.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/qemu/guest-agent-shutdown.patch')
-rw-r--r--community/qemu/guest-agent-shutdown.patch14
1 files changed, 6 insertions, 8 deletions
diff --git a/community/qemu/guest-agent-shutdown.patch b/community/qemu/guest-agent-shutdown.patch
index 742f281447..ddf3fdf008 100644
--- a/community/qemu/guest-agent-shutdown.patch
+++ b/community/qemu/guest-agent-shutdown.patch
@@ -1,8 +1,6 @@
-diff --git a/qga/commands-posix.c b/qga/commands-posix.c
-index 1877976..7915aab 100644
---- a/qga/commands-posix.c
-+++ b/qga/commands-posix.c
-@@ -82,6 +82,7 @@ static void ga_wait_child(pid_t pid, int *status, Error **errp)
+--- a/qga/commands-posix.c 2021-04-30 14:07:31.202337082 +0000
++++ b/qga/commands-posix.c 2021-04-30 14:10:05.253272361 +0000
+@@ -84,6 +84,7 @@ static void ga_wait_child(pid_t pid, int
void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
{
const char *shutdown_flag;
@@ -10,7 +8,7 @@ index 1877976..7915aab 100644
Error *local_err = NULL;
pid_t pid;
int status;
-@@ -89,10 +90,13 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
+@@ -91,10 +92,13 @@ void qmp_guest_shutdown(bool has_mode, c
slog("guest-shutdown called, mode: %s", mode);
if (!has_mode || strcmp(mode, "powerdown") == 0) {
shutdown_flag = "-P";
@@ -24,10 +22,10 @@ index 1877976..7915aab 100644
} else {
error_setg(errp,
"mode is invalid (valid values are: halt|powerdown|reboot");
-@@ -109,6 +113,7 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
+@@ -111,6 +115,7 @@ void qmp_guest_shutdown(bool has_mode, c
execle("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
- "hypervisor initiated shutdown", (char*)NULL, environ);
+ "hypervisor initiated shutdown", (char *)NULL, environ);
+ execle(fallback_cmd, fallback_cmd, (char*)NULL, environ);
_exit(EXIT_FAILURE);
} else if (pid < 0) {