Fix resume from initrd
Subsystems (2)
Move device name resolution code around so that it is not called from resume-from-initrd. name_to_dev_t may be unavailable at that point.
Signed-off-by Pavel Machek <[email protected]>
---
commit b532d863c3fd0a6ee5def139cd1131a80b8c4a36 tree a781a55ce6af3b70a6e9232c548ebb8bda6e5011 parent 325107c7d4a5a28dee6eecce1ee8fa01753414c7 author <pavel@amd.(none)> Sun, 03 Jul 2005 23:53:24 +0200 committer <pavel@amd.(none)> Sun, 03 Jul 2005 23:53:24 +0200
kernel/power/disk.c | 10 ++++++++++ kernel/power/swsusp.c | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-)
kernel/power/disk.c +10 -0
@@ -236,6 +236,16 @@ static int software_resume(void) {int error; +if (!swsusp_resume_device) { +if (!strlen (resume_file)) +return -ENOENT ; + swsusp_resume_device =name_to_dev_t (resume_file); +pr_debug ("swsusp: Resume From Partition %s\n" , resume_file); + }else { +pr_debug ("swsusp: Resume From Partition %d:%d\n" , +MAJOR (swsusp_resume_device),MINOR (swsusp_resume_device)); + } +if (noresume) {/** * FIXME: If noresume is specified, we need to find the partition
kernel/power/swsusp.c +0 -10
@@ -1495,16 +1495,6 @@ int swsusp_check(void) {int error; -if (!swsusp_resume_device) { -if (!strlen (resume_file)) -return -ENOENT ; - swsusp_resume_device =name_to_dev_t (resume_file); -pr_debug ("swsusp: Resume From Partition %s\n" , resume_file); - }else { -pr_debug ("swsusp: Resume From Partition %d:%d\n" , -MAJOR (swsusp_resume_device),MINOR (swsusp_resume_device)); - } - resume_bdev =open_by_devnum (swsusp_resume_device,FMODE_READ );if (!IS_ERR (resume_bdev)) {set_blocksize (resume_bdev,PAGE_SIZE );
Signature · 1 line
teflon -- maybe it is a trademark, but it should not be.