diff options
| author | Paul Mackerras <paulus@samba.org> | 2009-04-22 13:02:09 +1000 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2009-04-22 13:02:09 +1000 |
| commit | 5bd3ef84d73c2ea7b4babbad060909753c4828d4 (patch) | |
| tree | fdf2bafb48ae1ed03175f6c77a7548a181e69ee9 /init/initramfs.c | |
| parent | 0658c16056660886ea2f35c4f038be70a94b1532 (diff) | |
| parent | 6d25b688ecc488753af3c9e6f6a9a575b863cf37 (diff) | |
| download | linux-next-5bd3ef84d73c2ea7b4babbad060909753c4828d4.tar.gz linux-next-5bd3ef84d73c2ea7b4babbad060909753c4828d4.zip | |
Merge branch 'merge' of git://git.secretlab.ca/git/linux-2.6 into merge
Diffstat (limited to 'init/initramfs.c')
| -rw-r--r-- | init/initramfs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/init/initramfs.c b/init/initramfs.c index 80cd713f6cc5..9ee7b7810417 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -310,7 +310,8 @@ static int __init do_name(void) if (wfd >= 0) { sys_fchown(wfd, uid, gid); sys_fchmod(wfd, mode); - sys_ftruncate(wfd, body_len); + if (body_len) + sys_ftruncate(wfd, body_len); vcollected = kstrdup(collected, GFP_KERNEL); state = CopyFile; } @@ -515,6 +516,7 @@ skip: initrd_end = 0; } +#ifdef CONFIG_BLK_DEV_RAM #define BUF_SIZE 1024 static void __init clean_rootfs(void) { @@ -561,6 +563,7 @@ static void __init clean_rootfs(void) sys_close(fd); kfree(buf); } +#endif static int __init populate_rootfs(void) { |
