PV-on-HVM: Tweak reboot.c to be compatible with older kernels.
authorIan Campbell <ian.campbell@xensource.com>
Thu, 2 Nov 2006 11:56:26 +0000 (11:56 +0000)
committerIan Campbell <ian.campbell@xensource.com>
Thu, 2 Nov 2006 11:56:26 +0000 (11:56 +0000)
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>
linux-2.6-xen-sparse/drivers/xen/core/reboot.c
unmodified_drivers/linux-2.6/util/Makefile [new file with mode: 0644]

index 1f19985c6133ce91159259368e8f84bfe4ef492b..af3fe3a15c5a7caa6705c24f83ef04ff7233eaa2 100644 (file)
@@ -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 (file)
index 0000000..64e7acd
--- /dev/null
@@ -0,0 +1,3 @@
+ifneq ($(KERNELRELEASE),)
+include $(src)/Kbuild
+endif