diff options
Diffstat (limited to 'init/initramfs.c')
-rw-r--r-- | init/initramfs.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/init/initramfs.c b/init/initramfs.c index 4b9c20205092..371c3da64ad3 100644 --- a/init/initramfs.c +++ b/init/initramfs.c | |||
@@ -483,7 +483,8 @@ static int __init retain_initrd_param(char *str) | |||
483 | } | 483 | } |
484 | __setup("retain_initrd", retain_initrd_param); | 484 | __setup("retain_initrd", retain_initrd_param); |
485 | 485 | ||
486 | extern char __initramfs_start[], __initramfs_end[]; | 486 | extern char __initramfs_start[]; |
487 | extern unsigned long __initramfs_size; | ||
487 | #include <linux/initrd.h> | 488 | #include <linux/initrd.h> |
488 | #include <linux/kexec.h> | 489 | #include <linux/kexec.h> |
489 | 490 | ||
@@ -570,8 +571,7 @@ static void __init clean_rootfs(void) | |||
570 | 571 | ||
571 | static int __init populate_rootfs(void) | 572 | static int __init populate_rootfs(void) |
572 | { | 573 | { |
573 | char *err = unpack_to_rootfs(__initramfs_start, | 574 | char *err = unpack_to_rootfs(__initramfs_start, __initramfs_size); |
574 | __initramfs_end - __initramfs_start); | ||
575 | if (err) | 575 | if (err) |
576 | panic(err); /* Failed to decompress INTERNAL initramfs */ | 576 | panic(err); /* Failed to decompress INTERNAL initramfs */ |
577 | if (initrd_start) { | 577 | if (initrd_start) { |
@@ -585,8 +585,7 @@ static int __init populate_rootfs(void) | |||
585 | return 0; | 585 | return 0; |
586 | } else { | 586 | } else { |
587 | clean_rootfs(); | 587 | clean_rootfs(); |
588 | unpack_to_rootfs(__initramfs_start, | 588 | unpack_to_rootfs(__initramfs_start, __initramfs_size); |
589 | __initramfs_end - __initramfs_start); | ||
590 | } | 589 | } |
591 | printk(KERN_INFO "rootfs image is not initramfs (%s)" | 590 | printk(KERN_INFO "rootfs image is not initramfs (%s)" |
592 | "; looks like an initrd\n", err); | 591 | "; looks like an initrd\n", err); |