qemu: add path to bin utilites
This commit is contained in:
committed by
Tuomas Tynkkynen
parent
6e3d0efdc4
commit
e2c98528e9
@@ -71,8 +71,10 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
outputs = [ "out" "ga" ];
|
outputs = [ "out" "ga" ];
|
||||||
|
|
||||||
patches = [ ./no-etc-install.patch ]
|
patches = [
|
||||||
++ optional nixosTestRunner ./force-uid0-on-9p.patch
|
./no-etc-install.patch
|
||||||
|
./fix-qemu-ga.patch
|
||||||
|
] ++ optional nixosTestRunner ./force-uid0-on-9p.patch
|
||||||
++ optional pulseSupport ./fix-hda-recording.patch
|
++ optional pulseSupport ./fix-hda-recording.patch
|
||||||
++ optionals stdenv.hostPlatform.isMusl [
|
++ optionals stdenv.hostPlatform.isMusl [
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
|
||||||
|
index 0dc219d..9d020d3 100644
|
||||||
|
--- a/qga/commands-posix.c
|
||||||
|
+++ b/qga/commands-posix.c
|
||||||
|
@@ -102,6 +102,8 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
|
||||||
|
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);
|
||||||
|
@@ -189,6 +191,8 @@ 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("/run/current-system/sw/bin/hwclock", "hwclock", has_time ? "-w" : "-s",
|
||||||
|
+ NULL, environ);
|
||||||
|
execle("/sbin/hwclock", "hwclock", has_time ? "-w" : "-s",
|
||||||
|
NULL, environ);
|
||||||
|
_exit(EXIT_FAILURE);
|
||||||
Reference in New Issue
Block a user