lkml.org 
[lkml]   [2004]   [Nov]   [24]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 24 Nov 2004 13:07:50 +0000
FromChristoph Hellwig <>
SubjectRe: Suspend 2 merge: 7/51: Reboot handler hook.
> -#ifdef CONFIG_SOFTWARE_SUSPEND
> +#ifdef CONFIG_SOFTWARE_SUSPEND2
>  	case LINUX_REBOOT_CMD_SW_SUSPEND:
>  		{
> -			int ret = software_suspend();
> +			int ret = -EINVAL;
> +			if (!(test_suspend_state(SUSPEND_DISABLED))) {
> +				suspend_try_suspend();
> +				ret = 0;
> +			}
>  			unlock_kernel();

total crap.  Thbis patch breaks the existing swsusp and turns a clean
interface into a horrible one.  Just implement am

int software_suspend(void)
{
	if (test_suspend_state(SUSPEND_DISABLED))
		return -EINVAL;
	suspend_try_suspend();
	return 0;
}
in your code.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [from the cache]
©2003-2008