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>

+8 -8
+6 -6
kernel/power/hibernate.c
··· 708 goto Unlock; 709 } 710 711 - pr_debug("PM: Checking image partition %s\n", resume_file); 712 713 /* Check if the device is there */ 714 swsusp_resume_device = name_to_dev_t(resume_file); ··· 733 } 734 735 Check_image: 736 - pr_debug("PM: Resume from partition %d:%d\n", 737 MAJOR(swsusp_resume_device), MINOR(swsusp_resume_device)); 738 739 - pr_debug("PM: Checking hibernation image.\n"); 740 error = swsusp_check(); 741 if (error) 742 goto Unlock; ··· 768 goto Done; 769 } 770 771 - pr_debug("PM: Reading hibernation image.\n"); 772 773 error = swsusp_read(&flags); 774 swsusp_close(FMODE_READ); 775 if (!error) 776 hibernation_restore(flags & SF_PLATFORM_MODE); 777 778 - printk(KERN_ERR "PM: Restore failed, recovering.\n"); 779 swsusp_free(); 780 thaw_processes(); 781 Done: ··· 788 /* For success case, the suspend path will release the lock */ 789 Unlock: 790 mutex_unlock(&pm_mutex); 791 - pr_debug("PM: Resume from disk failed.\n"); 792 return error; 793 close_finish: 794 swsusp_close(FMODE_READ);
··· 708 goto Unlock; 709 } 710 711 + pr_debug("PM: Checking hibernation image partition %s\n", resume_file); 712 713 /* Check if the device is there */ 714 swsusp_resume_device = name_to_dev_t(resume_file); ··· 733 } 734 735 Check_image: 736 + pr_debug("PM: Hibernation image partition %d:%d present\n", 737 MAJOR(swsusp_resume_device), MINOR(swsusp_resume_device)); 738 739 + pr_debug("PM: Looking for hibernation image.\n"); 740 error = swsusp_check(); 741 if (error) 742 goto Unlock; ··· 768 goto Done; 769 } 770 771 + pr_debug("PM: Loading hibernation image.\n"); 772 773 error = swsusp_read(&flags); 774 swsusp_close(FMODE_READ); 775 if (!error) 776 hibernation_restore(flags & SF_PLATFORM_MODE); 777 778 + printk(KERN_ERR "PM: Failed to load hibernation image, recovering.\n"); 779 swsusp_free(); 780 thaw_processes(); 781 Done: ··· 788 /* For success case, the suspend path will release the lock */ 789 Unlock: 790 mutex_unlock(&pm_mutex); 791 + pr_debug("PM: Hibernation image not present or could not be loaded.\n"); 792 return error; 793 close_finish: 794 swsusp_close(FMODE_READ);
+2 -2
kernel/power/swap.c
··· 929 if (error) 930 blkdev_put(hib_resume_bdev, FMODE_READ); 931 else 932 - pr_debug("PM: Signature found, resuming\n"); 933 } else { 934 error = PTR_ERR(hib_resume_bdev); 935 } 936 937 if (error) 938 - pr_debug("PM: Error %d checking image file\n", error); 939 940 return error; 941 }
··· 929 if (error) 930 blkdev_put(hib_resume_bdev, FMODE_READ); 931 else 932 + pr_debug("PM: Image signature found, resuming\n"); 933 } else { 934 error = PTR_ERR(hib_resume_bdev); 935 } 936 937 if (error) 938 + pr_debug("PM: Image not found (code %d)\n", error); 939 940 return error; 941 }