[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] PV-on-HVM: Tweak reboot.c to be compatible with older kernels.



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
# Node ID f3fbe9549f5f146ace8b93dbe16043bf4d71938e
# Parent  2f34c6bcfe456604cf1d9b04269988d659c2211c
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@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/core/reboot.c |    4 ++--
 unmodified_drivers/linux-2.6/util/Makefile     |    3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff -r 2f34c6bcfe45 -r f3fbe9549f5f 
linux-2.6-xen-sparse/drivers/xen/core/reboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/reboot.c    Thu Nov 02 11:56:26 
2006 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/core/reboot.c    Thu Nov 02 11:56:26 
2006 +0000
@@ -30,7 +30,7 @@ static DECLARE_WORK(shutdown_work, __shu
 #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 *__unus
 
        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 -r 2f34c6bcfe45 -r f3fbe9549f5f unmodified_drivers/linux-2.6/util/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/unmodified_drivers/linux-2.6/util/Makefile        Thu Nov 02 11:56:26 
2006 +0000
@@ -0,0 +1,3 @@
+ifneq ($(KERNELRELEASE),)
+include $(src)/Kbuild
+endif

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.