aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorSimon Kitching <skitching@apache.org>2009-04-02 19:57:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-02 22:04:51 -0400
commitc1c490e017b66b31f6559db9cbb51a3ce00cf639 (patch)
tree94dfc491de797796143bc457476d0e2163abd6d3 /init
parent6f2c55b843836d26528c56a0968689accaedbc67 (diff)
initramfs: prevent initramfs printk message being split by messages from other code.
initramfs uses printk without a linefeed, then does some work, then uses printk to finish the message off. However if some other code does a printk in between, then the messages get mixed together. Better for each message to be an independent line... Example of problem that this fixes: checking if image is initramfs...<7>Switched to high resolution mode on CPU 1 Switched to high resolution mode on CPU 0 it is Signed-off-by: Simon Kitching <skitching@apache.org> 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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/init/initramfs.c b/init/initramfs.c
index 619c1baf7701..80cd713f6cc5 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -571,11 +571,11 @@ static int __init populate_rootfs(void)
571 if (initrd_start) { 571 if (initrd_start) {
572#ifdef CONFIG_BLK_DEV_RAM 572#ifdef CONFIG_BLK_DEV_RAM
573 int fd; 573 int fd;
574 printk(KERN_INFO "checking if image is initramfs..."); 574 printk(KERN_INFO "checking if image is initramfs...\n");
575 err = unpack_to_rootfs((char *)initrd_start, 575 err = unpack_to_rootfs((char *)initrd_start,
576 initrd_end - initrd_start); 576 initrd_end - initrd_start);
577 if (!err) { 577 if (!err) {
578 printk(" it is\n"); 578 printk(KERN_INFO "rootfs image is initramfs; unpacking...\n");
579 free_initrd(); 579 free_initrd();
580 return 0; 580 return 0;
581 } else { 581 } else {
@@ -583,7 +583,8 @@ static int __init populate_rootfs(void)
583 unpack_to_rootfs(__initramfs_start, 583 unpack_to_rootfs(__initramfs_start,
584 __initramfs_end - __initramfs_start); 584 __initramfs_end - __initramfs_start);
585 } 585 }
586 printk("it isn't (%s); looks like an initrd\n", err); 586 printk(KERN_INFO "rootfs image is not initramfs (%s)"
587 "; looks like an initrd\n", err);
587 fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 0700); 588 fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 0700);
588 if (fd >= 0) { 589 if (fd >= 0) {
589 sys_write(fd, (char *)initrd_start, 590 sys_write(fd, (char *)initrd_start,