From owner-svn-src-stable@freebsd.org Sun Oct 18 13:58:18 2015 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9749DA16AD6; Sun, 18 Oct 2015 13:58:18 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 485801845; Sun, 18 Oct 2015 13:58:18 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9IDwHD9081680; Sun, 18 Oct 2015 13:58:17 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9IDwHME081679; Sun, 18 Oct 2015 13:58:17 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201510181358.t9IDwHME081679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 18 Oct 2015 13:58:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r289504 - stable/10/sys/compat/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Oct 2015 13:58:18 -0000 Author: trasz Date: Sun Oct 18 13:58:17 2015 New Revision: 289504 URL: https://svnweb.freebsd.org/changeset/base/289504 Log: MFC r281689: Remove unused code from linux_mount(), and make it possible to mount any kind of filesystem instead of harcoded three. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/compat/linux/linux_file.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_file.c ============================================================================== --- stable/10/sys/compat/linux/linux_file.c Sun Oct 18 13:52:53 2015 (r289503) +++ stable/10/sys/compat/linux/linux_file.c Sun Oct 18 13:58:17 2015 (r289504) @@ -55,10 +55,6 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include - #ifdef COMPAT_LINUX32 #include #include @@ -1072,12 +1068,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); @@ -1098,20 +1092,10 @@ linux_mount(struct thread *td, struct li 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; @@ -1131,19 +1115,11 @@ linux_mount(struct thread *td, struct li 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); }