lkml.org 
[lkml]   [2006]   [Mar]   [24]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateThu, 23 Mar 2006 23:56:19 -0700
FromJason Gunthorpe <>
Subject[PATCH] Fix typo causing bad mode of /initrd.image
I noticed that after boot with an initrd in 2.6.16 the rootfs had:

--w-r-xr-T    1 root     root      6241141 Jan  1  1970 initrd.image

Which is caused by a small typo:

diff --git a/init/initramfs.c b/init/initramfs.c
index 637344b..f6fcc60 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -518,7 +518,7 @@ void __init populate_rootfs(void)
 			return;
 		}
 		printk("it isn't (%s); looks like an initrd\n", err);
-		fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 700);
+		fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 0700);
 		if (fd >= 0) {
 			sys_write(fd, (char *)initrd_start,
 					initrd_end - initrd_start);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-03-24 06:59    [from the cache]
©2003-2008