summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorSimon Kitching <skitching@apache.org>2009-04-02 16:57:00 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-02 19:04:51 -0700
commitc1c490e017b66b31f6559db9cbb51a3ce00cf639 (patch)
tree94dfc491de797796143bc457476d0e2163abd6d3 /init
parent6f2c55b843836d26528c56a0968689accaedbc67 (diff)
downloadop-kernel-dev-c1c490e017b66b31f6559db9cbb51a3ce00cf639.zip
op-kernel-dev-c1c490e017b66b31f6559db9cbb51a3ce00cf639.tar.gz
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 619c1ba..80cd713 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -571,11 +571,11 @@ static int __init populate_rootfs(void)
if (initrd_start) {
#ifdef CONFIG_BLK_DEV_RAM
int fd;
- printk(KERN_INFO "checking if image is initramfs...");
+ printk(KERN_INFO "checking if image is initramfs...\n");
err = unpack_to_rootfs((char *)initrd_start,
initrd_end - initrd_start);
if (!err) {
- printk(" it is\n");
+ printk(KERN_INFO "rootfs image is initramfs; unpacking...\n");
free_initrd();
return 0;
} else {
@@ -583,7 +583,8 @@ static int __init populate_rootfs(void)
unpack_to_rootfs(__initramfs_start,
__initramfs_end - __initramfs_start);
}
- printk("it isn't (%s); looks like an initrd\n", err);
+ printk(KERN_INFO "rootfs image is not initramfs (%s)"
+ "; looks like an initrd\n", err);
fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 0700);
if (fd >= 0) {
sys_write(fd, (char *)initrd_start,
OpenPOWER on IntegriCloud