about summary refs log tree commit diff
path: root/pkgs/applications/virtualization/qemu/fix-qemu-ga.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/virtualization/qemu/fix-qemu-ga.patch')
-rw-r--r--pkgs/applications/virtualization/qemu/fix-qemu-ga.patch36
1 files changed, 18 insertions, 18 deletions
diff --git a/pkgs/applications/virtualization/qemu/fix-qemu-ga.patch b/pkgs/applications/virtualization/qemu/fix-qemu-ga.patch
index 0b2dd0ee5ece..94dec6916800 100644
--- a/pkgs/applications/virtualization/qemu/fix-qemu-ga.patch
+++ b/pkgs/applications/virtualization/qemu/fix-qemu-ga.patch
@@ -1,16 +1,17 @@
-diff -Naur a/qga/commands-posix.c b/qga/commands-posix.c
---- a/qga/commands-posix.c
-+++ b/qga/commands-posix.c
-@@ -109,6 +109,8 @@
-         reopen_fd_to_null(1);
-         reopen_fd_to_null(2);
- 
-+        execle("/run/current-system/sw/bin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
-+               "hypervisor initiated shutdown", (char*)NULL, environ);
-         execle("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
-                "hypervisor initiated shutdown", (char*)NULL, environ);
-         _exit(EXIT_FAILURE);
-@@ -157,11 +159,13 @@
+diff --git i/qga/commands-posix.c w/qga/commands-posix.c
+index 954efed01b..39c4b916ce 100644
+--- i/qga/commands-posix.c
++++ w/qga/commands-posix.c
+@@ -123,6 +123,8 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
+         execl("/sbin/shutdown", "shutdown", shutdown_flag, "-g0", "-y",
+               "hypervisor initiated shutdown", (char *)NULL);
+ #else
++        execl("/run/current-system/sw/bin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
++               "hypervisor initiated shutdown", (char *)NULL);
+         execl("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
+                "hypervisor initiated shutdown", (char *)NULL);
+ #endif
+@@ -158,11 +160,13 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
      pid_t pid;
      Error *local_err = NULL;
      struct timeval tv;
@@ -25,12 +26,11 @@ diff -Naur a/qga/commands-posix.c b/qga/commands-posix.c
      }
  
      if (!hwclock_available) {
-@@ -207,6 +211,8 @@
+@@ -208,6 +212,7 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
  
          /* Use '/sbin/hwclock -w' to set RTC from the system time,
           * or '/sbin/hwclock -s' to set the system time from RTC. */
-+        execle(hwclock_path_nix, "hwclock", has_time ? "-w" : "-s",
-+               NULL, environ);
-         execle(hwclock_path, "hwclock", has_time ? "-w" : "-s",
-                NULL, environ);
++        execl(hwclock_path_nix, "hwclock", has_time ? "-w" : "-s", NULL);
+         execl(hwclock_path, "hwclock", has_time ? "-w" : "-s", NULL);
          _exit(EXIT_FAILURE);
+     } else if (pid < 0) {