]>
Commit | Line | Data |
---|---|---|
08d74d22 | 1 | diff -ur linux-2.6.0-test1.orig/Documentation/kernel-parameters.txt linux-2.6.0-test1/Documentation/kernel-parameters.txt |
2 | --- linux-2.6.0-test1.orig/Documentation/kernel-parameters.txt 2003-07-14 05:39:36.000000000 +0200 | |
3 | +++ linux-2.6.0-test1/Documentation/kernel-parameters.txt 2003-08-01 01:19:46.000000000 +0200 | |
4 | @@ -816,6 +816,8 @@ | |
5 | ||
6 | resume= [SWSUSP] Specify the partition device for software suspension | |
7 | ||
8 | + resume_initrd [SWSUSP] Run initrd before resuming from software suspension | |
9 | + | |
10 | riscom8= [HW,SERIAL] | |
11 | Format: <io_board1>[,<io_board2>[,...<io_boardN>]] | |
12 | ||
13 | diff -ur linux-2.6.0-test1.orig/init/do_mounts.c linux-2.6.0-test1/init/do_mounts.c | |
14 | --- linux-2.6.0-test1.orig/init/do_mounts.c 2003-07-14 05:32:44.000000000 +0200 | |
15 | +++ linux-2.6.0-test1/init/do_mounts.c 2003-08-01 01:21:44.000000000 +0200 | |
16 | @@ -49,6 +49,15 @@ | |
17 | __setup("ro", readonly); | |
18 | __setup("rw", readwrite); | |
19 | ||
20 | +static int resume_initrd = 0; | |
21 | +static int __init set_resume_initrd(char *str) | |
22 | +{ | |
23 | + resume_initrd = 1; | |
24 | + return 1; | |
25 | +} | |
26 | + | |
27 | +__setup("resume_initrd", set_resume_initrd); | |
28 | + | |
29 | static dev_t __init try_name(char *name, int part) | |
30 | { | |
31 | char path[64]; | |
32 | @@ -365,12 +374,21 @@ | |
33 | ||
34 | is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; | |
35 | ||
36 | - /* This has to be before mounting root, because even readonly mount of reiserfs would replay | |
37 | - log corrupting stuff */ | |
38 | - software_resume(); | |
39 | + /* software_resume() has to be before mounting root, because even | |
40 | + readonly mount of reiserfs would replay log corrupting stuff. | |
41 | + However, users may still want to run initrd first. */ | |
42 | + if (resume_initrd) { | |
43 | + if (initrd_load()) { | |
44 | + software_resume(); | |
45 | + goto out; | |
46 | + } | |
47 | + } | |
48 | + else { | |
49 | + software_resume(); | |
50 | ||
51 | - if (initrd_load()) | |
52 | - goto out; | |
53 | + if (initrd_load()) | |
54 | + goto out; | |
55 | + } | |
56 | ||
57 | if (is_floppy && rd_doload && rd_load_disk(0)) | |
58 | ROOT_DEV = Root_RAM0; | |
59 |