summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2006-09-22 13:21:07 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2006-09-22 13:21:07 +0000
commit336a4b63252b742e0d70eeaf8f1a39ee372be9c5 (patch)
tree6795bbf59d1a72f439e06d99414ed34d8b0c6d7b /sbin
parent3b74d1411c8d1f50c80fba664b2c1d639dc4b1e6 (diff)
Remove lfs_cleanerd and mount_lfs
Diffstat (limited to 'sbin')
-rw-r--r--sbin/mount_lfs/Makefile11
-rw-r--r--sbin/mount_lfs/mount_lfs.8129
-rw-r--r--sbin/mount_lfs/mount_lfs.c167
-rw-r--r--sbin/mount_lfs/pathnames.h35
4 files changed, 0 insertions, 342 deletions
diff --git a/sbin/mount_lfs/Makefile b/sbin/mount_lfs/Makefile
deleted file mode 100644
index 97783831257..00000000000
--- a/sbin/mount_lfs/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-# $OpenBSD: Makefile,v 1.3 1997/09/21 11:37:19 deraadt Exp $
-
-PROG= mount_lfs
-SRCS= mount_lfs.c getmntopts.c
-MAN= mount_lfs.8
-
-MOUNT= ${.CURDIR}/../mount
-CFLAGS+= -I${MOUNT}
-.PATH: ${MOUNT}
-
-.include <bsd.prog.mk>
diff --git a/sbin/mount_lfs/mount_lfs.8 b/sbin/mount_lfs/mount_lfs.8
deleted file mode 100644
index ee2fc59455b..00000000000
--- a/sbin/mount_lfs/mount_lfs.8
+++ /dev/null
@@ -1,129 +0,0 @@
-.\" $OpenBSD: mount_lfs.8,v 1.14 2003/06/02 20:06:15 millert Exp $
-.\" $NetBSD: mount_lfs.8,v 1.2 1995/03/18 14:57:30 cgd Exp $
-.\"
-.\" Copyright (c) 1993, 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" 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.
-.\" 3. 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.
-.\"
-.\" @(#)mount_lfs.8 8.5 (Berkeley) 3/30/94
-.\"
-.Dd March 30, 1994
-.Dt MOUNT_LFS 8
-.Os
-.Sh NAME
-.Nm mount_lfs
-.Nd mount a log-structured file system
-.Sh SYNOPSIS
-.Nm mount_lfs
-.Op Fl dns
-.Op Fl o Ar options
-.Ar special
-.Ar node
-.Sh DESCRIPTION
-The
-.Nm
-command attaches a log-structured file system
-.Ar special
-device on to the file system tree at the point
-.Ar node .
-In addition, the
-.Xr lfs_cleanerd 8
-utility is invoked to clean the file system periodically.
-.Pp
-This command is normally executed by
-.Xr mount 8
-at boot time.
-.Pp
-The options are as follows:
-.Bl -tag -width Ds
-.It Fl d
-Run
-.Xr lfs_cleanerd 8
-in debug mode.
-.It Fl o Ar options
-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.
-.It Fl n
-Don't start
-.Xr lfs_cleanerd 8
-on the file system.
-.It Fl s
-Cause
-.Xr lfs_cleanerd 8
-to read data in small chunks when cleaning the file system.
-.El
-.Sh SEE ALSO
-.Xr mount 2 ,
-.Xr fstab 5 ,
-.Xr lfs_cleanerd 8 ,
-.Xr mount 8 ,
-.Xr umount 8
-.Rs
-.%A John Ousterhout
-.%A Fred Douglis
-.%D 1989
-.%T "Beating the I/O Bottleneck: A Case for Log-structured File Systems"
-.%J "Operating Systems Review"
-.%V Vol. 23
-.%N No. 1
-.%P pp. 11-27
-.%O "also available as Technical Report UCB/CSD 88/467"
-.Re
-.Rs
-.%A Mendel Rosenblum
-.%A John Ousterhout
-.%D 1991
-.%T "The Design and Implementation of a Log-Structured File System"
-.%J "ACM SIGOPS Operating Systems Review"
-.%V Vol. 25
-.%N No. 5
-.Re
-.Rs
-.%A Seltzer
-.%D 1992
-.%T "File System Performance and Transaction Support"
-.%B "PhD Thesis, University of California, Berkeley"
-.%O "also available as Technical Report UCB/ERL M92"
-.Re
-.Rs
-.%A Margo Seltzer
-.%A Keith Bostic
-.%A Marshall Kirk McKusick
-.%A Carl Staelin
-.%D 1993
-.%T "An Implementation of a Log-Structured File System for UNIX"
-.%J "Proc. of the Winter 1993 USENIX Conf."
-.%P pp. 315-331
-.Re
-.Sh HISTORY
-The
-.Nm
-function first appeared in
-.Bx 4.4 .
diff --git a/sbin/mount_lfs/mount_lfs.c b/sbin/mount_lfs/mount_lfs.c
deleted file mode 100644
index 4d9cdc449da..00000000000
--- a/sbin/mount_lfs/mount_lfs.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/* $OpenBSD: mount_lfs.c,v 1.12 2005/04/08 20:09:37 jaredy Exp $ */
-/* $NetBSD: mount_lfs.c,v 1.4 1996/04/13 05:35:44 cgd Exp $ */
-
-/*-
- * Copyright (c) 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * 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.
- * 3. 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 char copyright[] =
-"@(#) Copyright (c) 1993, 1994\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)mount_lfs.c 8.3 (Berkeley) 3/27/94";
-#else
-static char rcsid[] = "$OpenBSD: mount_lfs.c,v 1.12 2005/04/08 20:09:37 jaredy Exp $";
-#endif
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/mount.h>
-#include <errno.h>
-
-#include <err.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "mntopts.h"
-#include "pathnames.h"
-
-const struct mntopt mopts[] = {
- MOPT_STDOPTS,
- MOPT_UPDATE,
- { NULL }
-};
-
-void usage(void);
-void invoke_cleaner(char *);
-
-int short_rds, cleaner_debug;
-
-int
-main(int argc, char *argv[])
-{
- struct ufs_args args;
- int ch, mntflags, noclean;
- char fs_name[MAXPATHLEN], *options;
- char *errcause;
-
- options = NULL;
- mntflags = noclean = 0;
- while ((ch = getopt(argc, argv, "dno:s")) != -1)
- switch (ch) {
- case 'd':
- cleaner_debug = 1;
- break;
- case 'n':
- noclean = 1;
- break;
- case 'o':
- getmntopts(optarg, mopts, &mntflags);
- break;
- case 's':
- short_rds = 1;
- break;
- case '?':
- default:
- usage();
- }
- argc -= optind;
- argv += optind;
-
- if (argc != 2)
- usage();
-
- args.fspec = argv[0]; /* the name of the device file */
- if (realpath(argv[1], fs_name) == NULL) /* the mount point */
- err(1, "realpath %s", argv[1]);
-
-#define DEFAULT_ROOTUID -2
- args.export_info.ex_root = DEFAULT_ROOTUID;
- if (mntflags & MNT_RDONLY)
- args.export_info.ex_flags = MNT_EXRDONLY;
- else
- args.export_info.ex_flags = 0;
-
- if (mount(MOUNT_LFS, fs_name, mntflags, &args) == -1) {
- switch (errno) {
- case EMFILE:
- errcause = "mount table full";
- break;
- case EINVAL:
- if (mntflags & MNT_UPDATE)
- errcause =
- "specified device does not match mounted device";
- else
- errcause = "incorrect super block";
- break;
- default:
- errcause = strerror(errno);
- break;
- }
- errx(1, "%s on %s: %s", args.fspec, fs_name, errcause);
- }
-
- if (!noclean)
- invoke_cleaner(fs_name);
- /* NOTREACHED */
-
- exit(0);
-}
-
-void
-invoke_cleaner(char *name)
-{
- char *args[6], **ap = args;
-
- /* Build the argument list. */
- *ap++ = _PATH_LFS_CLEANERD;
- if (short_rds)
- *ap++ = "-s";
- if (cleaner_debug)
- *ap++ = "-d";
- *ap++ = name;
- *ap = NULL;
-
- execv(args[0], args);
- err(1, "exec %s", _PATH_LFS_CLEANERD);
-}
-
-void
-usage(void)
-{
- (void)fprintf(stderr,
- "usage: mount_lfs [-dns] [-o options] special node\n");
- exit(1);
-}
diff --git a/sbin/mount_lfs/pathnames.h b/sbin/mount_lfs/pathnames.h
deleted file mode 100644
index 7224e535ef2..00000000000
--- a/sbin/mount_lfs/pathnames.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* $OpenBSD: pathnames.h,v 1.3 2003/06/02 20:06:15 millert Exp $ */
-/* $NetBSD: pathnames.h,v 1.2 1995/03/18 14:57:33 cgd Exp $ */
-
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * 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.
- * 3. 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.
- *
- * @(#)pathnames.h 8.1 (Berkeley) 6/8/93
- */
-
-#define _PATH_LFS_CLEANERD "/usr/libexec/lfs_cleanerd"