From: whitearchey <whitearchey@gmail.com>
To: qemu-trivial@nongnu.org
Subject: [Qemu-trivial] [PATCH] qga: Fix shutdown command of guest agent to work with SysV
Date: Wed, 06 Nov 2013 10:54:04 +0900 [thread overview]
Message-ID: <op.w53t8fe2cb68cn@whitewind-arch> (raw)
For now guest agent uses following command to shutdown system:
shutdown -P +0 "blabla"
but this syntax works only with shutdown command from systemd or upstart,
because SysV shutdown requires -h switch.
Following patch changes the command so it works with systemd, upstart and SysV
Signed-off-by: Michael Avdienko <whitearchey@gmail.com>
---
qga/commands-posix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index f453132..10682f5 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -99,7 +99,7 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **err)
reopen_fd_to_null(1);
reopen_fd_to_null(2);
- execle("/sbin/shutdown", "shutdown", shutdown_flag, "+0",
+ execle("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
"hypervisor initiated shutdown", (char*)NULL, environ);
_exit(EXIT_FAILURE);
} else if (pid < 0) {
--
1.8.4.2
next reply other threads:[~2013-11-06 4:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-06 1:54 whitearchey [this message]
2013-11-06 9:20 ` [Qemu-trivial] [PATCH] qga: Fix shutdown command of guest agent to work with SysV Michael Tokarev
2013-11-06 9:20 ` [Qemu-devel] " Michael Tokarev
2013-11-07 2:45 ` [Qemu-trivial] " whitearchey
2013-11-07 2:45 ` [Qemu-devel] " whitearchey
2013-11-12 9:01 ` [Qemu-trivial] " whitearchey
2013-11-12 9:01 ` [Qemu-devel] " whitearchey
2013-11-13 12:02 ` [Qemu-trivial] " Michael Tokarev
2013-11-13 12:02 ` [Qemu-devel] " Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=op.w53t8fe2cb68cn@whitewind-arch \
--to=whitearchey@gmail.com \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.