aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@xensource.com>2006-11-02 11:56:26 +0000
committerIan Campbell <ian.campbell@xensource.com>2006-11-02 11:56:26 +0000
commit4101fafcc01b226bb48576d48ea36cc505d2c288 (patch)
tree754fdc0170fbf7d8d470651adbcbfeac14193b42
parentd8656aaa3e9c089e3fb49a8bcd5ecccc1d6ce1eb (diff)
downloadxen-4101fafcc01b226bb48576d48ea36cc505d2c288.tar.gz
xen-4101fafcc01b226bb48576d48ea36cc505d2c288.tar.bz2
xen-4101fafcc01b226bb48576d48ea36cc505d2c288.zip
PV-on-HVM: Tweak reboot.c to be compatible with older kernels.
call_usermodehelper_keys() was not available until 2.6.13 but since we pass session_keyring as NULL we may as well use call_usermodehelper() anyway. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
-rw-r--r--linux-2.6-xen-sparse/drivers/xen/core/reboot.c4
-rw-r--r--unmodified_drivers/linux-2.6/util/Makefile3
2 files changed, 5 insertions, 2 deletions
diff --git a/linux-2.6-xen-sparse/drivers/xen/core/reboot.c b/linux-2.6-xen-sparse/drivers/xen/core/reboot.c
index 1f19985c61..af3fe3a15c 100644
--- a/linux-2.6-xen-sparse/drivers/xen/core/reboot.c
+++ b/linux-2.6-xen-sparse/drivers/xen/core/reboot.c
@@ -30,7 +30,7 @@ static DECLARE_WORK(shutdown_work, __shutdown_handler, NULL);
#ifdef CONFIG_XEN
int __xen_suspend(void);
#else
-#define __xen_suspend() 0
+#define __xen_suspend() (void)0
#endif
static int shutdown_process(void *__unused)
@@ -44,7 +44,7 @@ static int shutdown_process(void *__unused)
if ((shutting_down == SHUTDOWN_POWEROFF) ||
(shutting_down == SHUTDOWN_HALT)) {
- if (call_usermodehelper_keys("/sbin/poweroff", poweroff_argv, envp, NULL, 0) < 0) {
+ if (call_usermodehelper("/sbin/poweroff", poweroff_argv, envp, 0) < 0) {
#ifdef CONFIG_XEN
sys_reboot(LINUX_REBOOT_MAGIC1,
LINUX_REBOOT_MAGIC2,
diff --git a/unmodified_drivers/linux-2.6/util/Makefile b/unmodified_drivers/linux-2.6/util/Makefile
new file mode 100644
index 0000000000..64e7acd194
--- /dev/null
+++ b/unmodified_drivers/linux-2.6/util/Makefile
@@ -0,0 +1,3 @@
+ifneq ($(KERNELRELEASE),)
+include $(src)/Kbuild
+endif