All of lore.kernel.org
 help / color / mirror / Atom feed
* - disable-init-initramfsc-updated-fix.patch removed from -mm tree
@ 2007-02-10  8:12 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2007-02-10  8:12 UTC (permalink / raw)
  To: deweerdt, frederik.deweerdt, jean-paul.saman, mm-commits


The patch titled
     disable-init-initramfsc-updated fix
has been removed from the -mm tree.  Its filename was
     disable-init-initramfsc-updated-fix.patch

This patch was dropped because it was folded into disable-init-initramfsc-updated.patch

------------------------------------------------------
Subject: disable-init-initramfsc-updated fix
From: Frederik Deweerdt <deweerdt@free.fr>

The following patch silences the following compile time warning introduced
by the disable-init-initramfsc-updated patch:

  CC      init/noinitramfs.o
  init/noinitramfs.c:42: warning : initialization from incompatible pointer type

In addition, I've cleaned up the headers and added some error handling.

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
Cc: Jean-Paul Saman <jean-paul.saman@nxp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 init/noinitramfs.c |   38 ++++++++++++++++++++++++--------------
 1 files changed, 24 insertions(+), 14 deletions(-)

diff -puN init/noinitramfs.c~disable-init-initramfsc-updated-fix init/noinitramfs.c
--- a/init/noinitramfs.c~disable-init-initramfsc-updated-fix
+++ a/init/noinitramfs.c
@@ -18,25 +18,35 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
 #include <linux/init.h>
-#include <linux/fs.h>
-#include <linux/slab.h>
-#include <linux/types.h>
-#include <linux/fcntl.h>
-#include <linux/delay.h>
-#include <linux/string.h>
+#include <linux/stat.h>
+#include <linux/kdev_t.h>
 #include <linux/syscalls.h>
 
 /*
  * Create a simple rootfs that is similar to the default initramfs
  */
-static void __init default_rootfs(void)
+static int __init default_rootfs(void)
 {
-	int mkdir_err = sys_mkdir("/dev", 0755);
-	int err = sys_mknod((const char __user *) "/dev/console",
-				S_IFCHR | S_IRUSR | S_IWUSR,
-				new_encode_dev(MKDEV(5, 1)));
-	if (err == -EROFS)
-		printk("Warning: Failed to create a rootfs\n");
-	mkdir_err = sys_mkdir("/root", 0700);
+	int err;
+
+	err = sys_mkdir("/dev", 0755);
+	if (err < 0)
+		goto out;
+
+	err = sys_mknod((const char __user *) "/dev/console",
+			S_IFCHR | S_IRUSR | S_IWUSR,
+			new_encode_dev(MKDEV(5, 1)));
+	if (err < 0)
+		goto out;
+
+	err = sys_mkdir("/root", 0700);
+	if (err < 0)
+		goto out;
+
+	return 0;
+
+out:
+	printk(KERN_WARNING "Failed to create a rootfs\n");
+	return err;
 }
 rootfs_initcall(default_rootfs);
_

Patches currently in -mm which might be from deweerdt@free.fr are

origin.patch
disable-init-initramfsc-updated.patch
disable-init-initramfsc-updated-fix.patch
replace-highest_possible_node_id-with-nr_node_ids-fix.patch
reiser4-sb_sync_inodes-fix.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-10  8:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-10  8:12 - disable-init-initramfsc-updated-fix.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.