1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-07 05:30:38 +02:00
Files
guix/gnu/packages/patches/qemu-fix-agent-paths.patch
Maxim Cournoyer 5b1f7552e2 gnu: qemu: Update to 10.2.0.
* gnu/packages/virtualization.scm (qemu): Update to 10.2.0.
* gnu/packages/patches/qemu-fix-agent-paths.patch: Update patch.
* gnu/packages/patches/qemu-fix-test-virtio-version.patch: Adjust for file
name change.

Relates-to: #2447
Change-Id: I26034baf660af802cf4a4646d3b303f949bb1f3f
2026-01-27 11:16:12 +09:00

39 lines
1.4 KiB
Diff

diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 837be51c40..d0d4d99b5e 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -216,9 +216,9 @@ out:
return retcode;
}
-#define POWEROFF_CMD_PATH "/sbin/poweroff"
-#define HALT_CMD_PATH "/sbin/halt"
-#define REBOOT_CMD_PATH "/sbin/reboot"
+#define POWEROFF_CMD_PATH "/run/current-system/profile/sbin/shutdown"
+#define HALT_CMD_PATH "/run/current-system/profile/sbin/halt"
+#define REBOOT_CMD_PATH "/run/current-system/profile/sbin/reboot"
void qmp_guest_shutdown(const char *mode, Error **errp)
{
@@ -295,7 +295,7 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
int ret;
Error *local_err = NULL;
struct timeval tv;
- const char *argv[] = {"/sbin/hwclock", has_time ? "-w" : "-s", NULL};
+ const char *argv[] = {"/run/current-system/profile/sbin/hwclock", has_time ? "-w" : "-s", NULL};
/* If user has passed a time, validate and set it. */
if (has_time) {
@@ -328,6 +328,11 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
* hardware clock (RTC). */
ga_run_command(argv, NULL, "set hardware clock to system time",
&local_err);
+ if (local_err) {
+ argv[0] = "/sbin/hwclock";
+ ga_run_command(argv, NULL, "set hardware clock to system time",
+ &local_err);
+ }
if (local_err) {
error_propagate(errp, local_err);
return;