summaryrefslogtreecommitdiff
path: root/init/initramfs.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-05-05 13:12:55 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-05-05 13:12:55 +0400
commitf3831a592fe4332a70baad64a860b345398885b7 (patch)
treefd27b986295fe5a4f1c0924a804228f829a4c894 /init/initramfs.c
parent376f7839b72ec526173cafb5d8eadfc61e2effdf (diff)
parent8560b9321f9050968f393ce1ec67e47c1a0bd5cf (diff)
downloadlinux-f3831a592fe4332a70baad64a860b345398885b7.tar.xz
Merge commit 'takashi/topic/asoc' into for-2.6.31
Diffstat (limited to 'init/initramfs.c')
-rw-r--r--init/initramfs.c5
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)
{