aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/hibernate.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2010-09-28 17:31:22 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2010-10-16 19:57:48 -0400
commitd0941ead3fdd31aafff992d211bcefdbff1eaedb (patch)
tree3afd75a241739a7b3188a8e8ead167c10aeaac46 /kernel/power/hibernate.c
parent15bcb91d7e607d8a2e060f01f7784a7454668da4 (diff)
PM / Hibernate: Make some boot messages look less scary
The hibernate resume code checks if there is an image to resume from on every boot and, if the kernel is built with CONFIG_PM_DEBUG set and the image is not present, it prints some scary messages suggesting there was a boot error of some sort. Apparently, some users are confused by them, so make them look less scary and adjust the other hibernate resume debug messages to match them. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'kernel/power/hibernate.c')
-rw-r--r--kernel/power/hibernate.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index 6c9c9dc48c75..657272e91d0a 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -708,7 +708,7 @@ static int software_resume(void)
708 goto Unlock; 708 goto Unlock;
709 } 709 }
710 710
711 pr_debug("PM: Checking image partition %s\n", resume_file); 711 pr_debug("PM: Checking hibernation image partition %s\n", resume_file);
712 712
713 /* Check if the device is there */ 713 /* Check if the device is there */
714 swsusp_resume_device = name_to_dev_t(resume_file); 714 swsusp_resume_device = name_to_dev_t(resume_file);
@@ -733,10 +733,10 @@ static int software_resume(void)
733 } 733 }
734 734
735 Check_image: 735 Check_image:
736 pr_debug("PM: Resume from partition %d:%d\n", 736 pr_debug("PM: Hibernation image partition %d:%d present\n",
737 MAJOR(swsusp_resume_device), MINOR(swsusp_resume_device)); 737 MAJOR(swsusp_resume_device), MINOR(swsusp_resume_device));
738 738
739 pr_debug("PM: Checking hibernation image.\n"); 739 pr_debug("PM: Looking for hibernation image.\n");
740 error = swsusp_check(); 740 error = swsusp_check();
741 if (error) 741 if (error)
742 goto Unlock; 742 goto Unlock;
@@ -768,14 +768,14 @@ static int software_resume(void)
768 goto Done; 768 goto Done;
769 } 769 }
770 770
771 pr_debug("PM: Reading hibernation image.\n"); 771 pr_debug("PM: Loading hibernation image.\n");
772 772
773 error = swsusp_read(&flags); 773 error = swsusp_read(&flags);
774 swsusp_close(FMODE_READ); 774 swsusp_close(FMODE_READ);
775 if (!error) 775 if (!error)
776 hibernation_restore(flags & SF_PLATFORM_MODE); 776 hibernation_restore(flags & SF_PLATFORM_MODE);
777 777
778 printk(KERN_ERR "PM: Restore failed, recovering.\n"); 778 printk(KERN_ERR "PM: Failed to load hibernation image, recovering.\n");
779 swsusp_free(); 779 swsusp_free();
780 thaw_processes(); 780 thaw_processes();
781 Done: 781 Done:
@@ -788,7 +788,7 @@ static int software_resume(void)
788 /* For success case, the suspend path will release the lock */ 788 /* For success case, the suspend path will release the lock */
789 Unlock: 789 Unlock:
790 mutex_unlock(&pm_mutex); 790 mutex_unlock(&pm_mutex);
791 pr_debug("PM: Resume from disk failed.\n"); 791 pr_debug("PM: Hibernation image not present or could not be loaded.\n");
792 return error; 792 return error;
793close_finish: 793close_finish:
794 swsusp_close(FMODE_READ); 794 swsusp_close(FMODE_READ);