diff options
Diffstat (limited to 'init')
-rw-r--r-- | init/initramfs.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/init/initramfs.c b/init/initramfs.c index 637344b05981..77b934cccefe 100644 --- a/init/initramfs.c +++ b/init/initramfs.c | |||
@@ -506,6 +506,7 @@ void __init populate_rootfs(void) | |||
506 | panic(err); | 506 | panic(err); |
507 | #ifdef CONFIG_BLK_DEV_INITRD | 507 | #ifdef CONFIG_BLK_DEV_INITRD |
508 | if (initrd_start) { | 508 | if (initrd_start) { |
509 | #ifdef CONFIG_BLK_DEV_RAM | ||
509 | int fd; | 510 | int fd; |
510 | printk(KERN_INFO "checking if image is initramfs..."); | 511 | printk(KERN_INFO "checking if image is initramfs..."); |
511 | err = unpack_to_rootfs((char *)initrd_start, | 512 | err = unpack_to_rootfs((char *)initrd_start, |
@@ -525,6 +526,15 @@ void __init populate_rootfs(void) | |||
525 | sys_close(fd); | 526 | sys_close(fd); |
526 | free_initrd(); | 527 | free_initrd(); |
527 | } | 528 | } |
529 | #else | ||
530 | printk(KERN_INFO "Unpacking initramfs..."); | ||
531 | err = unpack_to_rootfs((char *)initrd_start, | ||
532 | initrd_end - initrd_start, 0); | ||
533 | if (err) | ||
534 | panic(err); | ||
535 | printk(" done\n"); | ||
536 | free_initrd(); | ||
537 | #endif | ||
528 | } | 538 | } |
529 | #endif | 539 | #endif |
530 | } | 540 | } |