Messages in this thread Patch in this message |  | | | From | Nigel Cunningham <> | | Subject | [Suspend2][ 15/16] [Suspend2] __init routines | | Date | Tue, 27 Jun 2006 08:34:06 +1000 |
| |
Support for resume2=, noresume2 and retry_resume command line options.
Signed-off-by: Nigel Cunningham <nigel@suspend2.net>
kernel/power/suspend.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c index 85307c6..78c77d6 100644 --- a/kernel/power/suspend.c +++ b/kernel/power/suspend.c @@ -1024,3 +1024,43 @@ void suspend2_try_suspend(void) suspend_finish_anything(0); } +/* -- Commandline Parameter Handling --- + * + * Resume setup: obtain the storage device. + */ +static int __init resume2_setup(char *str) +{ + if (!*str) + return 0; + + strncpy(resume2_file, str, 255); + return 0; +} + +/* + * Allow the user to set the debug parameter from lilo, prior to resuming. + */ +/* + * Allow the user to specify that we should ignore any image found and + * invalidate the image if necesssary. This is equivalent to running + * the task queue and a sync and then turning off the power. The same + * precautions should be taken: fsck if you're not journalled. + */ +static int __init noresume2_setup(char *str) +{ + set_suspend_state(SUSPEND_NORESUME_SPECIFIED); + return 0; +} + +static int __init suspend_retry_resume_setup(char *str) +{ + set_suspend_state(SUSPEND_RETRY_RESUME); + return 0; +} + +__setup("noresume2", noresume2_setup); +__setup("resume2=", resume2_setup); +__setup("suspend_retry_resume", suspend_retry_resume_setup); + +late_initcall(core_load); +EXPORT_SYMBOL(suspend_state); -- Nigel Cunningham nigel at suspend2 dot net - 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/
|  |