aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linux/linux_file.c
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2015-04-18 09:49:09 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2015-04-18 09:49:09 +0000
commit94d014f0798703c96b29012f7adb4f703325992a (patch)
tree3bb4548bd7973bdf6b000d23c3085562c5c4e330 /sys/compat/linux/linux_file.c
parentbf9b5107effdf6a477cac9b64f8bc19385a508d6 (diff)
downloadsrc-94d014f0798703c96b29012f7adb4f703325992a.tar.gz
src-94d014f0798703c96b29012f7adb4f703325992a.zip
Remove unused code from linux_mount(), and make it possible to mount
any kind of filesystem instead of harcoded three. MFC after: 1 month Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=281689
Diffstat (limited to 'sys/compat/linux/linux_file.c')
-rw-r--r--sys/compat/linux/linux_file.c34
1 files changed, 5 insertions, 29 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 88303b92c9be..c5a9237a6d48 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -55,10 +55,6 @@ __FBSDID("$FreeBSD$");
#include <security/mac/mac_framework.h>
-#include <ufs/ufs/extattr.h>
-#include <ufs/ufs/quota.h>
-#include <ufs/ufs/ufsmount.h>
-
#ifdef COMPAT_LINUX32
#include <machine/../linux32/linux.h>
#include <machine/../linux32/linux32_proto.h>
@@ -1078,12 +1074,10 @@ linux_pwrite(td, uap)
int
linux_mount(struct thread *td, struct linux_mount_args *args)
{
- struct ufs_args ufs;
char fstypename[MFSNAMELEN];
char mntonname[MNAMELEN], mntfromname[MNAMELEN];
int error;
int fsflags;
- void *fsdata;
error = copyinstr(args->filesystemtype, fstypename, MFSNAMELEN - 1,
NULL);
@@ -1104,20 +1098,10 @@ linux_mount(struct thread *td, struct linux_mount_args *args)
if (strcmp(fstypename, "ext2") == 0) {
strcpy(fstypename, "ext2fs");
- fsdata = &ufs;
- ufs.fspec = mntfromname;
-#define DEFAULT_ROOTID -2
- ufs.export.ex_root = DEFAULT_ROOTID;
- ufs.export.ex_flags =
- args->rwflag & LINUX_MS_RDONLY ? MNT_EXRDONLY : 0;
} else if (strcmp(fstypename, "proc") == 0) {
strcpy(fstypename, "linprocfs");
- fsdata = NULL;
} else if (strcmp(fstypename, "vfat") == 0) {
strcpy(fstypename, "msdosfs");
- fsdata = NULL;
- } else {
- return (ENODEV);
}
fsflags = 0;
@@ -1137,19 +1121,11 @@ linux_mount(struct thread *td, struct linux_mount_args *args)
fsflags |= MNT_UPDATE;
}
- if (strcmp(fstypename, "linprocfs") == 0) {
- error = kernel_vmount(fsflags,
- "fstype", fstypename,
- "fspath", mntonname,
- NULL);
- } else if (strcmp(fstypename, "msdosfs") == 0) {
- error = kernel_vmount(fsflags,
- "fstype", fstypename,
- "fspath", mntonname,
- "from", mntfromname,
- NULL);
- } else
- error = EOPNOTSUPP;
+ error = kernel_vmount(fsflags,
+ "fstype", fstypename,
+ "fspath", mntonname,
+ "from", mntfromname,
+ NULL);
return (error);
}