Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217536
b: refs/heads/master
c: 562f5e6
h: refs/heads/master
v: v3
  • Loading branch information
Namhyung Kim authored and Linus Torvalds committed Oct 26, 2010
1 parent 8c45f75 commit d6231e4
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f0cfec11180973e4f4b2b6909623e47eaaf7ecfe
refs/heads/master: 562f5e638de4ef451226552fe8dd7847bacea24e
4 changes: 2 additions & 2 deletions trunk/init/do_mounts.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,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,
Expand Down Expand Up @@ -488,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 *)".");
}
2 changes: 1 addition & 1 deletion trunk/init/do_mounts_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ static void __init autodetect_raid(void)

wait_for_device_probe();

fd = sys_open("/dev/md0", 0, 0);
fd = sys_open((const char __user __force *) "/dev/md0", 0, 0);
if (fd >= 0) {
sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
sys_close(fd);
Expand Down
4 changes: 2 additions & 2 deletions trunk/init/do_mounts_rd.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ int __init rd_load_image(char *from)
char rotator[4] = { '|' , '/' , '-' , '\\' };
#endif

out_fd = sys_open("/dev/ram", O_RDWR, 0);
out_fd = sys_open((const char __user __force *) "/dev/ram", O_RDWR, 0);
if (out_fd < 0)
goto out;

Expand Down Expand Up @@ -267,7 +267,7 @@ int __init rd_load_image(char *from)
sys_close(out_fd);
out:
kfree(buf);
sys_unlink("/dev/ram");
sys_unlink((const char __user __force *) "/dev/ram");
return res;
}

Expand Down
5 changes: 3 additions & 2 deletions trunk/init/initramfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ static void __init clean_rootfs(void)
struct linux_dirent64 *dirp;
int num;

fd = sys_open("/", O_RDONLY, 0);
fd = sys_open((const char __user __force *) "/", O_RDONLY, 0);
WARN_ON(fd < 0);
if (fd < 0)
return;
Expand Down Expand Up @@ -590,7 +590,8 @@ static int __init populate_rootfs(void)
}
printk(KERN_INFO "rootfs image is not initramfs (%s)"
"; looks like an initrd\n", err);
fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 0700);
fd = sys_open((const char __user __force *) "/initrd.image",
O_WRONLY|O_CREAT, 0700);
if (fd >= 0) {
sys_write(fd, (char *)initrd_start,
initrd_end - initrd_start);
Expand Down
6 changes: 3 additions & 3 deletions trunk/init/noinitramfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ static int __init default_rootfs(void)
{
int err;

err = sys_mkdir("/dev", 0755);
err = sys_mkdir((const char __user __force *) "/dev", 0755);
if (err < 0)
goto out;

err = sys_mknod((const char __user *) "/dev/console",
err = sys_mknod((const char __user __force *) "/dev/console",
S_IFCHR | S_IRUSR | S_IWUSR,
new_encode_dev(MKDEV(5, 1)));
if (err < 0)
goto out;

err = sys_mkdir("/root", 0700);
err = sys_mkdir((const char __user __force *) "/root", 0700);
if (err < 0)
goto out;

Expand Down

0 comments on commit d6231e4

Please sign in to comment.