drop disas and bios patches refresh patches qemu: vhost-scsi does not exist, drop unsupported vhost options qemu: disable VDUSE by default qemu: slirp and vnc-png option gone Note: libpng still needed if vnc enabled. Link: https://github.com/openwrt/packages/pull/18623 Signed-off-by: Vladimir Ermakov <vooon341@gmail.com> (squash commits) Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
45 lines
1.8 KiB
Diff
45 lines
1.8 KiB
Diff
From 80ec6872aceb18c68b1cf5b6f8acd6ad667cbd4f Mon Sep 17 00:00:00 2001
|
|
From: Yousong Zhou <yszhou4tech@gmail.com>
|
|
Date: Thu, 17 Dec 2020 15:55:55 +0800
|
|
Subject: [PATCH] qga: invoke separate applets for guest-shutdown modes
|
|
|
|
/sbin/shutdown is not available on OpenWrt by default
|
|
|
|
Origin: "main/qemu: fix shutdown from guest agent"
|
|
https://gitlab.alpinelinux.org/alpine/aports/commit/76b81b486480fd9c3294cd420bcf2df01c27790d
|
|
---
|
|
qga/commands-posix.c | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
--- a/qga/commands-posix.c
|
|
+++ b/qga/commands-posix.c
|
|
@@ -74,6 +74,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;
|
|
+ const char *fallback_cmd = NULL;
|
|
Error *local_err = NULL;
|
|
pid_t pid;
|
|
int status;
|
|
@@ -95,10 +96,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 = powerdown_flag;
|
|
+ fallback_cmd = "/sbin/poweroff";
|
|
} else if (strcmp(mode, "halt") == 0) {
|
|
shutdown_flag = halt_flag;
|
|
+ fallback_cmd = "/sbin/halt";
|
|
} else if (strcmp(mode, "reboot") == 0) {
|
|
shutdown_flag = reboot_flag;
|
|
+ fallback_cmd = "/sbin/reboot";
|
|
} else {
|
|
error_setg(errp,
|
|
"mode is invalid (valid values are: halt|powerdown|reboot");
|
|
@@ -123,6 +127,7 @@ void qmp_guest_shutdown(bool has_mode, c
|
|
execl("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
|
|
"hypervisor initiated shutdown", (char *)NULL);
|
|
#endif
|
|
+ execl(fallback_cmd, fallback_cmd, (char*)NULL);
|
|
_exit(EXIT_FAILURE);
|
|
} else if (pid < 0) {
|
|
error_setg_errno(errp, errno, "failed to create child process");
|