direct-io.hg

changeset 12207:f3fbe9549f5f

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>
author Ian Campbell <ian.campbell@xensource.com>
date Thu Nov 02 11:56:26 2006 +0000 (2006-11-02)
parents 2f34c6bcfe45
children 36d020268c6c
files linux-2.6-xen-sparse/drivers/xen/core/reboot.c unmodified_drivers/linux-2.6/util/Makefile
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/reboot.c	Thu Nov 02 11:56:26 2006 +0000
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/reboot.c	Thu Nov 02 11:56:26 2006 +0000
     1.3 @@ -30,7 +30,7 @@ static DECLARE_WORK(shutdown_work, __shu
     1.4  #ifdef CONFIG_XEN
     1.5  int __xen_suspend(void);
     1.6  #else
     1.7 -#define __xen_suspend() 0
     1.8 +#define __xen_suspend() (void)0
     1.9  #endif
    1.10  
    1.11  static int shutdown_process(void *__unused)
    1.12 @@ -44,7 +44,7 @@ static int shutdown_process(void *__unus
    1.13  
    1.14  	if ((shutting_down == SHUTDOWN_POWEROFF) ||
    1.15  	    (shutting_down == SHUTDOWN_HALT)) {
    1.16 -		if (call_usermodehelper_keys("/sbin/poweroff", poweroff_argv, envp, NULL, 0) < 0) {
    1.17 +		if (call_usermodehelper("/sbin/poweroff", poweroff_argv, envp, 0) < 0) {
    1.18  #ifdef CONFIG_XEN
    1.19  			sys_reboot(LINUX_REBOOT_MAGIC1,
    1.20  				   LINUX_REBOOT_MAGIC2,
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/unmodified_drivers/linux-2.6/util/Makefile	Thu Nov 02 11:56:26 2006 +0000
     2.3 @@ -0,0 +1,3 @@
     2.4 +ifneq ($(KERNELRELEASE),)
     2.5 +include $(src)/Kbuild
     2.6 +endif