aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorEric Piel <eric.piel@tremplin-utc.net>2009-05-06 19:03:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-06 19:36:10 -0400
commita1e6b6c1a676d25acdf079ee8ab5cdfeb5e5b835 (patch)
tree24895915fd3a50fd7fb593fd5127d2140b8a9010 /init
parentfc4d5c292b68ef02514d2072dcbf82d090c34875 (diff)
initramfs: clean up messages related to initramfs unpacking
With the removal of duplicate unpack_to_rootfs() (commit df52092f3c97788592ef72501a43fb7ac6a3cfe0) the messages displayed do not actually correspond to what the kernel is doing. In addition, depending if ramdisks are supported or not, the messages are not at all the same. So keep the messages more in sync with what is really doing the kernel, and only display a second message in case of failure. This also ensure that the printk message cannot be split by other printk's. Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init')
-rw-r--r--init/initramfs.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/init/initramfs.c b/init/initramfs.c
index 9ee7b781041..4c00edc5968 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -574,11 +574,10 @@ static int __init populate_rootfs(void)
574 if (initrd_start) { 574 if (initrd_start) {
575#ifdef CONFIG_BLK_DEV_RAM 575#ifdef CONFIG_BLK_DEV_RAM
576 int fd; 576 int fd;
577 printk(KERN_INFO "checking if image is initramfs...\n"); 577 printk(KERN_INFO "Trying to unpack rootfs image as initramfs...\n");
578 err = unpack_to_rootfs((char *)initrd_start, 578 err = unpack_to_rootfs((char *)initrd_start,
579 initrd_end - initrd_start); 579 initrd_end - initrd_start);
580 if (!err) { 580 if (!err) {
581 printk(KERN_INFO "rootfs image is initramfs; unpacking...\n");
582 free_initrd(); 581 free_initrd();
583 return 0; 582 return 0;
584 } else { 583 } else {
@@ -596,15 +595,11 @@ static int __init populate_rootfs(void)
596 free_initrd(); 595 free_initrd();
597 } 596 }
598#else 597#else
599 printk(KERN_INFO "Unpacking initramfs..."); 598 printk(KERN_INFO "Unpacking initramfs...\n");
600 err = unpack_to_rootfs((char *)initrd_start, 599 err = unpack_to_rootfs((char *)initrd_start,
601 initrd_end - initrd_start); 600 initrd_end - initrd_start);
602 if (err) { 601 if (err)
603 printk(" failed!\n"); 602 printk(KERN_EMERG "Initramfs unpacking failed: %s\n", err);
604 printk(KERN_EMERG "%s\n", err);
605 } else {
606 printk(" done\n");
607 }
608 free_initrd(); 603 free_initrd();
609#endif 604#endif
610 } 605 }