summaryrefslogtreecommitdiffstats
path: root/sbin/mount_std
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2013-03-05 23:53:37 +0000
committerjkim <jkim@FreeBSD.org>2013-03-05 23:53:37 +0000
commit581391a0d1c39668d569db4ea2d116ca473acc0a (patch)
tree5690d03f657a380885b7e6f896d37b61941d7b1a /sbin/mount_std
parent326a42abb915b374c53d3a927c0574d271be84b2 (diff)
downloadFreeBSD-src-581391a0d1c39668d569db4ea2d116ca473acc0a.zip
FreeBSD-src-581391a0d1c39668d569db4ea2d116ca473acc0a.tar.gz
GC unused mount_* directories. mount_reiserfs was disconnected from build
with r158666. mount_ext2fs and mount_std were disconnected with r164527.
Diffstat (limited to 'sbin/mount_std')
-rw-r--r--sbin/mount_std/Makefile23
-rw-r--r--sbin/mount_std/mount_std.8167
-rw-r--r--sbin/mount_std/mount_std.c160
3 files changed, 0 insertions, 350 deletions
diff --git a/sbin/mount_std/Makefile b/sbin/mount_std/Makefile
deleted file mode 100644
index 44ff9ef..0000000
--- a/sbin/mount_std/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-# @(#)Makefile 8.2 (Berkeley) 3/27/94
-# $FreeBSD$
-
-PROG= mount_std
-SRCS= mount_std.c getmntopts.c
-MAN= mount_std.8
-MLINKS= mount_std.8 mount_devfs.8 \
- mount_std.8 mount_fdescfs.8 \
- mount_std.8 mount_linprocfs.8 \
- mount_std.8 mount_procfs.8
-
-MOUNT= ${.CURDIR}/../mount
-CFLAGS+= -I${MOUNT}
-WARNS?= 3
-
-.PATH: ${MOUNT}
-
-LINKS= ${BINDIR}/mount_std ${BINDIR}/mount_devfs \
- ${BINDIR}/mount_std ${BINDIR}/mount_fdescfs \
- ${BINDIR}/mount_std ${BINDIR}/mount_linprocfs \
- ${BINDIR}/mount_std ${BINDIR}/mount_procfs
-
-.include <bsd.prog.mk>
diff --git a/sbin/mount_std/mount_std.8 b/sbin/mount_std/mount_std.8
deleted file mode 100644
index 0aeeba8..0000000
--- a/sbin/mount_std/mount_std.8
+++ /dev/null
@@ -1,167 +0,0 @@
-.\"
-.\" Copyright (c) 1992, 1993, 1994
-.\" The Regents of the University of California. All rights reserved.
-.\" All rights reserved.
-.\"
-.\" This code is derived from software donated to Berkeley by
-.\" Jan-Simon Pendry.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd November 26, 2004
-.Dt MOUNT_STD 8
-.Os
-.Sh NAME
-.Nm mount_std ,
-.Nm mount_devfs ,
-.Nm mount_fdescfs ,
-.Nm mount_linprocfs ,
-.Nm mount_procfs
-.Nd mount
-.Dq standard
-file systems
-.Sh SYNOPSIS
-.Nm mount_ Ns Ar fsname
-.Op Fl o Ar options
-.Ar "fs"
-.Ar mount_point
-.Sh DESCRIPTION
-The
-.Nm
-utility is a generic mechanism for attaching ``standard'' file systems to
-the file system.
-The
-.Nm
-utility currently supports the following file systems:
-.Nm devfs ,
-.Nm fdescfs ,
-.Nm linprocfs
-and
-.Nm procfs .
-A ``standard'' file system is one which:
-.Bl -enum -offset indent
-.It
-accepts only the standard
-.Fl o
-options
-.Dq ro ,
-.Dq rw ,
-.Dq noexec ,
-.Dq nosuid ,
-and
-.Dq union .
-.It
-has a kernel file system module name the same as its user-visible name.
-.It
-requires no other special processing on the part of the
-.Nm
-utility.
-.El
-.Pp
-The options are as follows:
-.Bl -tag -width indent
-.It Fl o
-Options are specified with a
-.Fl o
-flag followed by a comma separated string of options.
-See the
-.Xr mount 8
-man page for possible options and their meanings.
-.El
-.Pp
-The
-.Nm
-utility examines its zeroth command-line argument (the name by which
-it was called) to determine the type of file system to be mounted.
-If
-it is called by a name which does not end in
-.Dq Li _ Ns Ar fsname ,
-.Nm
-will assume (for compatibility
-with
-.Xr mount 8 )
-that the zeroth argument contains only the name of the file system type.
-The
-.Nm
-utility is normally installed with appropriate links to commands for
-the distributed file systems which can be mounted in this way;
-for information on the function of each file system, see the manual page
-for that specific
-.Nm mount_ Ns Ar fsname
-utility.
-.Pp
-Refer to the following manual pages for detailed information
-on these file systems:
-.Xr devfs 5 ,
-.Xr fdescfs 5 ,
-.Xr linprocfs 5
-and
-.Xr procfs 5 .
-.Sh DIAGNOSTICS
-.Bl -diag
-.It argv[0] must end in _fsname
-The
-.Nm
-utility was called with a zeroth argument of
-.Dq Li mount_std .
-.It %s file system not available
-The specified file system type was not present in the kernel and no
-loadable module for it was found.
-.El
-.Sh SEE ALSO
-.Xr mount 2 ,
-.Xr unmount 2 ,
-.Xr getvfsbyname 3 ,
-.Xr devfs 5 ,
-.Xr fdescfs 5 ,
-.Xr fstab 5 ,
-.Xr linprocfs 5 ,
-.Xr procfs 5 ,
-.Xr mount 8
-.Sh HISTORY
-The
-.Nm
-utility first appeared in
-.Fx 2.2 .
-Loadable file system modules first appeared in
-.Fx 2.0 .
-The
-.Dq fdescfs
-and
-.Dq procfs
-file system types first appeared in
-.Fx 2.0 ;
-the
-.Dq devfs
-file system type first appeared in
-.Fx 2.2 ;
-the
-.Dq linprocfs
-file system type first appeared in
-.Fx 4.0 .
-.Sh CAVEATS
-None of the ``standard'' file systems may be NFS-exported.
diff --git a/sbin/mount_std/mount_std.c b/sbin/mount_std/mount_std.c
deleted file mode 100644
index 50a93ee..0000000
--- a/sbin/mount_std/mount_std.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 1990, 1992 Jan-Simon Pendry
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static const char copyright[] =
-"@(#) Copyright (c) 1992, 1993, 1994\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/param.h>
-#include <sys/mount.h>
-#include <sys/uio.h>
-
-#include <err.h>
-#include <errno.h>
-#include <stdio.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sysexits.h>
-#include <unistd.h>
-
-#include "mntopts.h"
-
-static struct mntopt mopts[] = {
- MOPT_STDOPTS,
- MOPT_END
-};
-
-static char *fsname;
-static volatile sig_atomic_t caughtsig;
-
-static void usage(void) __dead2;
-
-static void
-catchsig(int s __unused)
-{
- caughtsig = 1;
-}
-
-int
-main(int argc, char *argv[])
-{
- int ch, mntflags;
- char mntpath[MAXPATHLEN];
- struct iovec iov[4];
- int error;
-
- /*
- * XXX
- * mount(8) calls the mount programs with an argv[0] which is
- * /just/ the file system name. So, if there is no underscore
- * in argv[0], we assume that we are being called from mount(8)
- * and that argv[0] is thus the name of the file system type.
- */
- fsname = strrchr(argv[0], '_');
- if (fsname) {
- if (strcmp(fsname, "_std") == 0)
- errx(EX_USAGE, "argv[0] must end in _fsname");
- fsname++;
- } else {
- fsname = argv[0];
- }
-
- mntflags = 0;
- while ((ch = getopt(argc, argv, "o:")) != -1)
- switch (ch) {
- case 'o':
- getmntopts(optarg, mopts, &mntflags, NULL);
- break;
- case '?':
- default:
- usage();
- }
- argc -= optind;
- argv += optind;
-
- if (argc != 2)
- usage();
-
- /* resolve the mountpoint with realpath(3) */
- if (checkpath(argv[1], mntpath) != 0)
- err(EX_USAGE, "%s", mntpath);
-
- iov[0].iov_base = "fstype";
- iov[0].iov_len = sizeof("fstype");
- iov[1].iov_base = fsname;
- iov[1].iov_len = strlen(iov[1].iov_base) + 1;
- iov[2].iov_base = "fspath";
- iov[2].iov_len = sizeof("fspath");
- iov[3].iov_base = mntpath;
- iov[3].iov_len = strlen(mntpath) + 1;
-
- /*
- * nmount(2) would kill us with SIGSYS if the kernel doesn't have it.
- * This design bug is inconvenient. We must catch the signal and not
- * just ignore it because of a plain bug: nmount(2) would return
- * EINVAL instead of the correct ENOSYS if the kernel doesn't have it
- * and we don't let the signal kill us. EINVAL is too ambiguous.
- * This bug in 4.4BSD-Lite1 was fixed in 4.4BSD-Lite2 but is still in
- * FreeBSD-5.0.
- */
- signal(SIGSYS, catchsig);
- error = nmount(iov, 4, mntflags);
- signal(SIGSYS, SIG_DFL);
-
- /*
- * Try with the old mount syscall in the case
- * this file system has not been converted yet,
- * or the user didn't recompile his kernel.
- */
- if (error && (errno == EOPNOTSUPP || errno == ENOSYS || caughtsig))
- error = mount(fsname, mntpath, mntflags, NULL);
-
- if (error)
- err(EX_OSERR, NULL);
- exit(0);
-}
-
-void
-usage(void)
-{
- (void)fprintf(stderr,
- "usage: mount_%s [-o options] what_to_mount mount_point\n",
- fsname);
- exit(EX_USAGE);
-}
OpenPOWER on IntegriCloud