]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - init/do_mounts.c
xps: Transmit Packet Steering
[net-next-2.6.git] / init / do_mounts.c
index b7fc83994f3985a13a76d852cd21499233fe866d..830aaec9c7d5e0cb8df39af760791b5335772768 100644 (file)
@@ -58,6 +58,7 @@ static int __init readwrite(char *str)
 __setup("ro", readonly);
 __setup("rw", readwrite);
 
+#ifdef CONFIG_BLOCK
 /**
  * match_dev_by_uuid - callback for finding a partition using its uuid
  * @dev:       device passed in by the caller
@@ -111,6 +112,7 @@ static dev_t __init devt_from_partuuid(char *uuid_str)
 done:
        return res;
 }
+#endif
 
 /*
  *     Convert a name into device number.  We accept the following variants:
@@ -138,6 +140,7 @@ dev_t name_to_dev_t(char *name)
        dev_t res = 0;
        int part;
 
+#ifdef CONFIG_BLOCK
        if (strncmp(name, "PARTUUID=", 9) == 0) {
                name += 9;
                if (strlen(name) != 36)
@@ -147,6 +150,7 @@ dev_t name_to_dev_t(char *name)
                        goto fail;
                goto done;
        }
+#endif
 
        if (strncmp(name, "/dev/", 5) != 0) {
                unsigned maj, min;
@@ -287,7 +291,7 @@ static int __init do_mount_root(char *name, char *fs, int flags, void *data)
        if (err)
                return err;
 
-       sys_chdir("/root");
+       sys_chdir((const char __user __force *)"/root");
        ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev;
        printk("VFS: Mounted root (%s filesystem)%s on device %u:%u.\n",
               current->fs->pwd.mnt->mnt_sb->s_type->name,
@@ -357,13 +361,13 @@ out:
 #ifdef CONFIG_ROOT_NFS
 static int __init mount_nfs_root(void)
 {
-       void *data = nfs_root_data();
+       char *root_dev, *root_data;
 
-       create_dev("/dev/root", ROOT_DEV);
-       if (data &&
-           do_mount_root("/dev/root", "nfs", root_mountflags, data) == 0)
-               return 1;
-       return 0;
+       if (nfs_root_data(&root_dev, &root_data) != 0)
+               return 0;
+       if (do_mount_root(root_dev, "nfs", root_mountflags, root_data) != 0)
+               return 0;
+       return 1;
 }
 #endif
 
@@ -484,5 +488,5 @@ void __init prepare_namespace(void)
 out:
        devtmpfs_mount("dev");
        sys_mount(".", "/", NULL, MS_MOVE, NULL);
-       sys_chroot(".");
+       sys_chroot((const char __user __force *)".");
 }