summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-10-20 00:20:05 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-10-20 00:20:05 +0000
commit8f7ce08f2e616afb7a6f54dd7e5ee29d80a158cd (patch)
treeeec6786341d7b94e1639fe41c72457f35a3e03a8 /usr.sbin
parentd3858f6a1c00969e5d2c36a6f8976da74159187c (diff)
Start removing portability goo: we have syslog(), strerror(), POSIX regexp,
BSD-style getmntinfo(), BSD signals, 4.4BSD unmount(), etc Delete configurations for other OSes Delete fsinfo and mk-amd-map, as we don't build them. ok deraadt@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/amd/amd/Makefile5
-rw-r--r--usr.sbin/amd/amd/amd.c17
-rw-r--r--usr.sbin/amd/amd/get_args.c13
-rw-r--r--usr.sbin/amd/amd/mapc.c4
-rw-r--r--usr.sbin/amd/amd/mount_fs.c9
-rw-r--r--usr.sbin/amd/amd/mtab.c71
-rw-r--r--usr.sbin/amd/amd/sched.c13
-rw-r--r--usr.sbin/amd/amd/umount_fs.c147
-rw-r--r--usr.sbin/amd/amd/xutil.c29
-rw-r--r--usr.sbin/amd/amq/Makefile5
-rw-r--r--usr.sbin/amd/amq/amq.c12
-rw-r--r--usr.sbin/amd/config/Configure55
-rw-r--r--usr.sbin/amd/config/Makefile.aix34
-rw-r--r--usr.sbin/amd/config/Makefile.bsd447
-rw-r--r--usr.sbin/amd/config/Makefile.hpux12
-rw-r--r--usr.sbin/amd/config/Makefile.irix9
-rw-r--r--usr.sbin/amd/config/Makefile.irix312
-rw-r--r--usr.sbin/amd/config/Makefile.irix413
-rw-r--r--usr.sbin/amd/config/Makefile.stellix9
-rw-r--r--usr.sbin/amd/config/arch121
-rw-r--r--usr.sbin/amd/config/misc-aix3.h90
-rw-r--r--usr.sbin/amd/config/misc-hpux.h73
-rw-r--r--usr.sbin/amd/config/misc-irix.h44
-rw-r--r--usr.sbin/amd/config/misc-next.h38
-rw-r--r--usr.sbin/amd/config/misc-stellix.h61
-rw-r--r--usr.sbin/amd/config/misc-ultrix.h49
-rw-r--r--usr.sbin/amd/config/mount_aix.c147
-rw-r--r--usr.sbin/amd/config/mount_irix.c77
-rw-r--r--usr.sbin/amd/config/mount_stellix.c73
-rw-r--r--usr.sbin/amd/config/mtab_aix.c131
-rw-r--r--usr.sbin/amd/config/mtab_bsd.c111
-rw-r--r--usr.sbin/amd/config/mtab_file.c466
-rw-r--r--usr.sbin/amd/config/mtab_ultrix.c109
-rw-r--r--usr.sbin/amd/config/os-acis43.h78
-rw-r--r--usr.sbin/amd/config/os-aix3.h176
-rw-r--r--usr.sbin/amd/config/os-aux.h112
-rw-r--r--usr.sbin/amd/config/os-bsd44.h57
-rw-r--r--usr.sbin/amd/config/os-concentrix.h74
-rw-r--r--usr.sbin/amd/config/os-convex.h75
-rw-r--r--usr.sbin/amd/config/os-defaults.h49
-rw-r--r--usr.sbin/amd/config/os-dgux.h109
-rw-r--r--usr.sbin/amd/config/os-fpx4.h87
-rw-r--r--usr.sbin/amd/config/os-hcx.h76
-rw-r--r--usr.sbin/amd/config/os-hlh42.h84
-rw-r--r--usr.sbin/amd/config/os-hpux.h145
-rw-r--r--usr.sbin/amd/config/os-irix.h128
-rw-r--r--usr.sbin/amd/config/os-irix3.h128
-rw-r--r--usr.sbin/amd/config/os-irix4.h145
-rw-r--r--usr.sbin/amd/config/os-next.h74
-rw-r--r--usr.sbin/amd/config/os-pyrOSx.h75
-rw-r--r--usr.sbin/amd/config/os-riscix.h83
-rw-r--r--usr.sbin/amd/config/os-sos3.h74
-rw-r--r--usr.sbin/amd/config/os-sos4.h111
-rw-r--r--usr.sbin/amd/config/os-stellix.h103
-rw-r--r--usr.sbin/amd/config/os-type123
-rw-r--r--usr.sbin/amd/config/os-u2_2.h156
-rw-r--r--usr.sbin/amd/config/os-u3_0.h149
-rw-r--r--usr.sbin/amd/config/os-u4_0.h153
-rw-r--r--usr.sbin/amd/config/os-u4_2.h148
-rw-r--r--usr.sbin/amd/config/os-umax43.h74
-rw-r--r--usr.sbin/amd/config/os-utek.h44
-rw-r--r--usr.sbin/amd/config/os-utx32.h80
-rw-r--r--usr.sbin/amd/config/os-xinu43.h107
-rw-r--r--usr.sbin/amd/fsinfo/Makefile33
-rw-r--r--usr.sbin/amd/fsinfo/conf/automounts48
-rw-r--r--usr.sbin/amd/fsinfo/conf/csg_sun318
-rw-r--r--usr.sbin/amd/fsinfo/conf/csg_vax67
-rw-r--r--usr.sbin/amd/fsinfo/conf/diskless_sun3_sos49
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/achilles.doc.ic.ac.uk116
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/bigears.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/dylan.doc.ic.ac.uk68
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/flamingo.doc.ic.ac.uk104
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/ganymede.doc.ic.ac.uk33
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/gould.doc.ic.ac.uk477
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/gummo.doc.ic.ac.uk12
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/ivax.doc.ic.ac.uk84
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/obsidian.doc.ic.ac.uk28
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/pelican.doc.ic.ac.uk208
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/rvax.doc.ic.ac.uk66
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/sky.doc.ic.ac.uk79
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/svax.doc.ic.ac.uk66
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tcsun1.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tcsun2.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tcsun3.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tcsun4.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tcsun5.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/toytown.doc.ic.ac.uk116
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/truth.doc.ic.ac.uk9
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun1.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun10.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun11.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun12.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun13.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun14.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun15.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun16.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun17.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun18.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun19.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun2.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun3.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun4.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun5.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun6.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun7.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun8.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsun9.doc.ic.ac.uk3
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/tsunfs.doc.ic.ac.uk211
-rw-r--r--usr.sbin/amd/fsinfo/conf/hosts/whoops.doc.ic.ac.uk21
-rw-r--r--usr.sbin/amd/fsinfo/conf/users106
-rw-r--r--usr.sbin/amd/fsinfo/fsi_analyze.c640
-rw-r--r--usr.sbin/amd/fsinfo/fsi_data.h230
-rw-r--r--usr.sbin/amd/fsinfo/fsi_dict.c119
-rw-r--r--usr.sbin/amd/fsinfo/fsi_gram.y388
-rw-r--r--usr.sbin/amd/fsinfo/fsi_lex.l397
-rw-r--r--usr.sbin/amd/fsinfo/fsi_util.c568
-rw-r--r--usr.sbin/amd/fsinfo/fsinfo.877
-rw-r--r--usr.sbin/amd/fsinfo/fsinfo.c253
-rw-r--r--usr.sbin/amd/fsinfo/fsinfo.h135
-rw-r--r--usr.sbin/amd/fsinfo/wr_atab.c283
-rw-r--r--usr.sbin/amd/fsinfo/wr_bparam.c95
-rw-r--r--usr.sbin/amd/fsinfo/wr_dumpset.c82
-rw-r--r--usr.sbin/amd/fsinfo/wr_exportfs.c94
-rw-r--r--usr.sbin/amd/fsinfo/wr_fstab.c297
-rw-r--r--usr.sbin/amd/include/config.h12
-rw-r--r--usr.sbin/amd/include/uwait.h77
-rw-r--r--usr.sbin/amd/mk-amd-map/Makefile14
-rw-r--r--usr.sbin/amd/mk-amd-map/mk-amd-map.857
-rw-r--r--usr.sbin/amd/mk-amd-map/mk-amd-map.c366
129 files changed, 95 insertions, 11256 deletions
diff --git a/usr.sbin/amd/amd/Makefile b/usr.sbin/amd/amd/Makefile
index 8239f9b830d..311f13caf90 100644
--- a/usr.sbin/amd/amd/Makefile
+++ b/usr.sbin/amd/amd/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.4 2010/11/03 12:01:10 jsg Exp $
+# $OpenBSD: Makefile,v 1.5 2014/10/20 00:20:04 guenther Exp $
# from: @(#)Makefile 8.2 (Berkeley) 4/22/94
.include "../config/Makefile.config"
@@ -10,7 +10,7 @@ SRCS= afs_ops.c am_ops.c clock.c util.c xutil.c \
info_ndbm.c info_passwd.c info_nis.c \
info_union.c map.c srvr_afs.c srvr_nfs.c \
mntfs.c misc_rpc.c mount_fs.c mount_xdr.c \
- mtab.c mtab_bsd.c nfs_ops.c nfs_prot_svc.c \
+ mtab.c nfs_ops.c nfs_prot_svc.c \
nfs_start.c nfs_subr.c nfs_prot_xdr.c opts.c \
pfs_ops.c rpc_fwd.c sched.c sfs_ops.c amq_svc.c \
amq_subr.c umount_fs.c host_ops.c nfsx_ops.c \
@@ -20,7 +20,6 @@ CFLAGS+=-I${.CURDIR}/../config
CFLAGS+=-I${.CURDIR}/../include
CFLAGS+=-DARCH_REP=\"${MACHINE}\"
CFLAGS+=-DOS_REP=\"${OS}\"
-CFLAGS+=-DOS_HDR=\"os-${OS}.h\"
CFLAGS+=${CONFIG}
.PATH: ${.CURDIR}/../rpcx ${.CURDIR}/../config
diff --git a/usr.sbin/amd/amd/amd.c b/usr.sbin/amd/amd/amd.c
index 558fa7115c9..7e01fd2cb93 100644
--- a/usr.sbin/amd/amd/amd.c
+++ b/usr.sbin/amd/amd/amd.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)amd.c 8.1 (Berkeley) 6/6/93
- * $Id: amd.c,v 1.17 2010/12/21 18:45:54 deraadt Exp $
+ * $Id: amd.c,v 1.18 2014/10/20 00:20:04 guenther Exp $
*/
/*
@@ -46,11 +46,20 @@
#include <fcntl.h>
#include <unistd.h>
#include <setjmp.h>
+#include <endian.h>
#include <rpc/rpc.h>
#include <rpcsvc/ypclnt.h>
#include <rpcsvc/yp_prot.h>
+#if BYTE_ORDER == LITTLE_ENDIAN
+#define ARCH_ENDIAN "little"
+#elif BYTE_ORDER == BIG_ENDIAN
+#define ARCH_ENDIAN "big"
+#else
+#error "unknown endian"
+#endif
+
char pid_fsname[16 + MAXHOSTNAMELEN]; /* "kiska.southseas.nz:(pid%d)" */
#ifdef HAS_HOST
#ifdef HOST_EXEC
@@ -84,9 +93,6 @@ int orig_umask;
static void
sigterm(int sig)
{
-#ifdef SYS5_SIGNALS
- signal(sig, sigterm);
-#endif /* SYS5_SIGNALS */
switch (sig) {
case SIGINT:
@@ -113,9 +119,6 @@ sigterm(int sig)
static void
sighup(int sig)
{
-#ifdef SYS5_SIGNALS
- signal(sig, sighup);
-#endif /* SYS5_SIGNALS */
#ifdef DEBUG
if (sig != SIGHUP)
diff --git a/usr.sbin/amd/amd/get_args.c b/usr.sbin/amd/amd/get_args.c
index 9d18b4f5cd6..33d3afb03de 100644
--- a/usr.sbin/amd/amd/get_args.c
+++ b/usr.sbin/amd/amd/get_args.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)get_args.c 8.1 (Berkeley) 6/6/93
- * $Id: get_args.c,v 1.12 2014/01/21 22:19:32 jsg Exp $
+ * $Id: get_args.c,v 1.13 2014/10/20 00:20:04 guenther Exp $
*/
/*
@@ -40,9 +40,7 @@
*/
#include "am.h"
-#ifdef HAS_SYSLOG
#include <syslog.h>
-#endif /* HAS_SYSLOG */
#include <sys/stat.h>
#include <unistd.h>
@@ -246,15 +244,6 @@ get_args(int c, char *v[])
}
if (optind == c) {
-#ifdef hpux
- /*
- * HP-UX can't handle ./mtab
- * That system is sick - really.
- */
-#ifdef DEBUG
- debug_option("nomtab");
-#endif /* DEBUG */
-#endif /* hpux */
/*
* Append domain name to hostname.
diff --git a/usr.sbin/amd/amd/mapc.c b/usr.sbin/amd/amd/mapc.c
index 8760fd22757..a23f19f0866 100644
--- a/usr.sbin/amd/amd/mapc.c
+++ b/usr.sbin/amd/amd/mapc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mapc.c,v 1.14 2010/07/05 21:54:11 tedu Exp $ */
+/* $OpenBSD: mapc.c,v 1.15 2014/10/20 00:20:04 guenther Exp $ */
/*-
* Copyright (c) 1989 Jan-Simon Pendry
@@ -40,7 +40,7 @@
#include "am.h"
#ifdef HAS_REGEXP
-#include RE_HDR
+#include <regex.h>
#endif
/*
diff --git a/usr.sbin/amd/amd/mount_fs.c b/usr.sbin/amd/amd/mount_fs.c
index 56644efdd31..52c9d4f2245 100644
--- a/usr.sbin/amd/amd/mount_fs.c
+++ b/usr.sbin/amd/amd/mount_fs.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)mount_fs.c 8.1 (Berkeley) 6/6/93
- * $Id: mount_fs.c,v 1.11 2013/12/03 02:14:57 deraadt Exp $
+ * $Id: mount_fs.c,v 1.12 2014/10/20 00:20:04 guenther Exp $
*/
#include "am.h"
@@ -46,13 +46,6 @@ typedef nfs_fh fhandle_t;
/*
* Standard mount flags
*/
-#ifdef hpux
-/*
- * HP-UX has an annoying feature of printing
- * error msgs on /dev/console
- */
-#undef M_NOSUID
-#endif /* hpux */
struct opt_tab mnt_flags[] = {
{ "ro", M_RDONLY },
diff --git a/usr.sbin/amd/amd/mtab.c b/usr.sbin/amd/amd/mtab.c
index 8a762a5f4a0..79e9678a948 100644
--- a/usr.sbin/amd/amd/mtab.c
+++ b/usr.sbin/amd/amd/mtab.c
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
+ * Copyright (c) 1989, 1990 Jan-Simon Pendry
+ * Copyright (c) 1989, 1990 Imperial College of Science, Technology & Medicine
+ * Copyright (c) 1989, 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)mtab.c 8.1 (Berkeley) 6/6/93
- * $Id: mtab.c,v 1.5 2003/06/02 23:36:51 millert Exp $
+ * $Id: mtab.c,v 1.6 2014/10/20 00:20:04 guenther Exp $
*/
#include "am.h"
@@ -47,7 +47,7 @@ mnt_free(struct mntent *mp)
free(mp->mnt_dir);
free(mp->mnt_type);
free(mp->mnt_opts);
- free((void *)mp);
+ free(mp);
}
/*
@@ -62,7 +62,7 @@ discard_mntlist(mntlist *mp)
mp = mp->mnext;
if (mp2->mnt)
mnt_free(mp2->mnt);
- free((void *)mp2);
+ free(mp2);
}
}
@@ -95,3 +95,62 @@ hasmntval(struct mntent *mnt, char *opt)
return 0;
}
+
+static struct mntent *
+mnt_dup(struct statfs *mp)
+{
+ struct mntent *new_mp = ALLOC(mntent);
+ char *ty;
+
+ new_mp->mnt_fsname = strdup(mp->f_mntfromname);
+ new_mp->mnt_dir = strdup(mp->f_mntonname);
+ ty = mp->f_fstypename;
+ new_mp->mnt_type = strdup(ty);
+ new_mp->mnt_opts = strdup("unset");
+ new_mp->mnt_freq = 0;
+ new_mp->mnt_passno = 0;
+
+ return new_mp;
+}
+
+/*
+ * Read a mount table into memory
+ */
+mntlist *
+read_mtab(char *fs)
+{
+ mntlist **mpp, *mhp;
+ struct statfs *mntbufp, *mntp;
+
+ int nloc = getmntinfo(&mntbufp, MNT_NOWAIT);
+
+ if (nloc == 0) {
+ plog(XLOG_ERROR, "Can't read mount table");
+ return 0;
+ }
+
+ mpp = &mhp;
+ for (mntp = mntbufp; mntp < mntbufp + nloc; mntp++) {
+ /*
+ * Allocate a new slot
+ */
+ *mpp = ALLOC(mntlist);
+
+ /*
+ * Copy the data returned by getmntent
+ */
+ (*mpp)->mnt = mnt_dup(mntp);
+
+ /*
+ * Move to next pointer
+ */
+ mpp = &(*mpp)->mnext;
+ }
+
+ /*
+ * Terminate the list
+ */
+ *mpp = 0;
+
+ return mhp;
+}
diff --git a/usr.sbin/amd/amd/sched.c b/usr.sbin/amd/amd/sched.c
index 4fdf6f2c23b..17545ea4a77 100644
--- a/usr.sbin/amd/amd/sched.c
+++ b/usr.sbin/amd/amd/sched.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sched.c,v 1.14 2011/11/06 01:43:50 guenther Exp $ */
+/* $OpenBSD: sched.c,v 1.15 2014/10/20 00:20:04 guenther Exp $ */
/*
* Copyright (c) 1990 Jan-Simon Pendry
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)sched.c 8.1 (Berkeley) 6/6/93
- * $Id: sched.c,v 1.14 2011/11/06 01:43:50 guenther Exp $
+ * $Id: sched.c,v 1.15 2014/10/20 00:20:04 guenther Exp $
*/
/*
@@ -43,7 +43,7 @@
#include "am.h"
#include <signal.h>
-#include WAIT
+#include <sys/wait.h>
#include <setjmp.h>
extern jmp_buf select_intr;
extern int select_intr_valid;
@@ -197,11 +197,7 @@ sigchld(int sig)
int save_errno = errno;
pid_t pid;
-#ifdef SYS5_SIGNALS
- if ((pid = wait(&w)) > 0) {
-#else
while ((pid = waitpid((pid_t)-1, &w, WNOHANG)) > 0) {
-#endif /* SYS5_SIGNALS */
pjob *p, *p2;
if (WIFSIGNALED(w))
@@ -229,9 +225,6 @@ sigchld(int sig)
#endif /* DEBUG */
}
-#ifdef SYS5_SIGNALS
- signal(sig, sigchld);
-#endif /* SYS5_SIGNALS */
if (select_intr_valid)
longjmp(select_intr, sig);
errno = save_errno;
diff --git a/usr.sbin/amd/amd/umount_fs.c b/usr.sbin/amd/amd/umount_fs.c
index 0078ddaccab..6f1849abfc8 100644
--- a/usr.sbin/amd/amd/umount_fs.c
+++ b/usr.sbin/amd/amd/umount_fs.c
@@ -32,13 +32,11 @@
* SUCH DAMAGE.
*
* from: @(#)umount_fs.c 8.1 (Berkeley) 6/6/93
- * $Id: umount_fs.c,v 1.5 2012/05/24 19:40:51 miod Exp $
+ * $Id: umount_fs.c,v 1.6 2014/10/20 00:20:04 guenther Exp $
*/
#include "am.h"
-#ifdef NEED_UMOUNT_BSD
-
int
umount_fs(char *fs_name)
{
@@ -73,146 +71,3 @@ eintr:
return error;
}
-
-#endif /* NEED_UMOUNT_BSD */
-
-#ifdef NEED_UMOUNT_OSF
-
-#include <sys/mount.h> /* For MNT_NOFORCE */
-
-int
-umount_fs(char *fs_name)
-{
- int error;
-
-eintr:
- error = umount(fs_name, MNT_NOFORCE);
- if (error < 0)
- error = errno;
-
- switch (error) {
- case EINVAL:
- case ENOTBLK:
- plog(XLOG_WARNING, "unmount: %s is not mounted", fs_name);
- error = 0; /* Not really an error */
- break;
-
- case ENOENT:
- plog(XLOG_ERROR, "mount point %s: %m", fs_name);
- break;
-
- case EINTR:
-#ifdef DEBUG
- /* not sure why this happens, but it does. ask kirk one day... */
- dlog("%s: unmount: %m", fs_name);
-#endif /* DEBUG */
- goto eintr;
-
-#ifdef DEBUG
- default:
- dlog("%s: unmount: %m", fs_name);
- break;
-#endif /* DEBUG */
- }
-
- return error;
-}
-
-#endif /* NEED_UMOUNT_OSF */
-
-#ifdef NEED_UMOUNT_FS
-
-int
-umount_fs(char *fs_name)
-{
- mntlist *mlist, *mp, *mp_save = 0;
- int error = 0;
-
- mp = mlist = read_mtab(fs_name);
-
- /*
- * Search the mount table looking for
- * the correct (ie last) matching entry
- */
- while (mp) {
- if (strcmp(mp->mnt->mnt_fsname, fs_name) == 0 ||
- strcmp(mp->mnt->mnt_dir, fs_name) == 0)
- mp_save = mp;
- mp = mp->mnext;
- }
-
- if (mp_save) {
-#ifdef DEBUG
- dlog("Trying unmount(%s)", mp_save->mnt->mnt_dir);
-#endif /* DEBUG */
- /*
- * This unmount may hang leaving this
- * process with an exclusive lock on
- * /etc/mtab. Therefore it is necessary
- * to unlock mtab, do the unmount, then
- * lock mtab (again) and reread it and
- * finally update it.
- */
- unlock_mntlist();
- if (UNMOUNT_TRAP(mp_save->mnt) < 0) {
- switch (error = errno) {
- case EINVAL:
- case ENOTBLK:
- plog(XLOG_WARNING, "unmount: %s is not mounted", mp_save->mnt->mnt_dir);
- error = 0; /* Not really an error */
- break;
-
- case ENOENT:
- plog(XLOG_ERROR, "mount point %s: %m", mp_save->mnt->mnt_dir);
- break;
-
- default:
-#ifdef DEBUG
- dlog("%s: unmount: %m", mp_save->mnt->mnt_dir);
-#endif /* DEBUG */
- break;
- }
- }
-#ifdef DEBUG
- dlog("Finished unmount(%s)", mp_save->mnt->mnt_dir);
-#endif
-
-
-#ifdef UPDATE_MTAB
- if (!error) {
- free_mntlist(mlist);
- mp = mlist = read_mtab(fs_name);
-
- /*
- * Search the mount table looking for
- * the correct (ie last) matching entry
- */
- mp_save = 0;
- while (mp) {
- if (strcmp(mp->mnt->mnt_fsname, fs_name) == 0 ||
- strcmp(mp->mnt->mnt_dir, fs_name) == 0)
- mp_save = mp;
- mp = mp->mnext;
- }
-
- if (mp_save) {
- mnt_free(mp_save->mnt);
- mp_save->mnt = 0;
- rewrite_mtab(mlist);
- }
- }
-#endif /* UPDATE_MTAB */
- } else {
- plog(XLOG_ERROR, "Couldn't find how to unmount %s", fs_name);
- /*
- * Assume it is already unmounted
- */
- error = 0;
- }
-
- free_mntlist(mlist);
-
- return error;
-}
-
-#endif /* NEED_UMOUNT_FS */
diff --git a/usr.sbin/amd/amd/xutil.c b/usr.sbin/amd/amd/xutil.c
index c61a3a87fa2..4403c00ff24 100644
--- a/usr.sbin/amd/amd/xutil.c
+++ b/usr.sbin/amd/amd/xutil.c
@@ -32,16 +32,12 @@
* SUCH DAMAGE.
*
* from: @(#)xutil.c 8.1 (Berkeley) 6/6/93
- * $Id: xutil.c,v 1.12 2009/08/12 13:21:17 deraadt Exp $
+ * $Id: xutil.c,v 1.13 2014/10/20 00:20:04 guenther Exp $
*/
#include "config.h"
-#ifdef HAS_SYSLOG
#include <syslog.h>
-#endif /* HAS_SYSLOG */
-#ifdef HAS_STRERROR
#include <string.h>
-#endif
#include <unistd.h>
#include <stdarg.h>
@@ -49,9 +45,7 @@
#include <sys/stat.h>
FILE *logfp = stderr; /* Log errors to stderr initially */
-#ifdef HAS_SYSLOG
int syslogging;
-#endif /* HAS_SYSLOG */
int xlog_level = XLOG_ALL & ~XLOG_MAP & ~XLOG_STATS & ~XLOG_INFO;
int xlog_level_init = ~0;
@@ -173,13 +167,9 @@ checkup_mem(void)
* with the current error code taken from errno. Make sure
* 'e' never gets longer than maxlen characters.
*/
-INLINE static void
+static void
expand_error(char *f, char *e, int maxlen)
{
-#ifndef HAS_STRERROR
- extern int sys_nerr;
- extern char *sys_errlist[];
-#endif
char *p, *q;
int error = errno;
int len = 0;
@@ -187,14 +177,7 @@ expand_error(char *f, char *e, int maxlen)
for (p = f, q = e; (*q = *p) && len < maxlen; len++, q++, p++) {
if (p[0] == '%' && p[1] == 'm') {
char *errstr;
-#ifdef HAS_STRERROR
errstr = strerror(error);
-#else
- if (error < 0 || error >= sys_nerr)
- errstr = 0;
- else
- errstr = sys_errlist[error];
-#endif
if (errstr)
strlcpy(q, errstr, maxlen - (q - e));
else
@@ -279,7 +262,6 @@ plog(int lvl, char *fmt, ...)
ptr = msg + strlen(msg);
if (ptr[-1] == '\n')
*--ptr = '\0';
-#ifdef HAS_SYSLOG
if (syslogging) {
switch(lvl) { /* from mike <mcooper@usc.edu> */
case XLOG_FATAL: lvl = LOG_CRIT; break;
@@ -295,7 +277,6 @@ plog(int lvl, char *fmt, ...)
syslog(lvl, "%s", msg);
return;
}
-#endif /* HAS_SYSLOG */
/*
* Mimic syslog header
@@ -421,13 +402,10 @@ switch_to_logfile(char *logfile)
FILE *new_logfp = stderr;
if (logfile) {
-#ifdef HAS_SYSLOG
syslogging = 0;
-#endif /* HAS_SYSLOG */
if (strcmp(logfile, "/dev/stderr") == 0)
new_logfp = stderr;
else if (strcmp(logfile, "syslog") == 0) {
-#ifdef HAS_SYSLOG
syslogging = 1;
new_logfp = stderr;
#if defined(LOG_CONS) && defined(LOG_NOWAIT)
@@ -437,9 +415,6 @@ switch_to_logfile(char *logfile)
/* 4.2 compat mode - XXX */
openlog(__progname, LOG_PID);
#endif /* LOG_CONS && LOG_NOWAIT */
-#else
- plog(XLOG_WARNING, "syslog option not supported, logging unchanged");
-#endif /* HAS_SYSLOG */
} else {
(void) umask(orig_umask);
new_logfp = fopen(logfile, "a");
diff --git a/usr.sbin/amd/amq/Makefile b/usr.sbin/amd/amq/Makefile
index 2f36bd9a1a6..b382e48e7d9 100644
--- a/usr.sbin/amd/amq/Makefile
+++ b/usr.sbin/amd/amq/Makefile
@@ -1,5 +1,5 @@
# from: @(#)Makefile 8.1 (Berkeley) 6/6/93
-# $Id: Makefile,v 1.1 1995/10/18 08:47:13 deraadt Exp $
+# $Id: Makefile,v 1.2 2014/10/20 00:20:04 guenther Exp $
.include "../config/Makefile.config"
@@ -9,9 +9,6 @@ MAN = amq.8
CFLAGS+=-I${.CURDIR}/../include
CFLAGS+=-I${.CURDIR}/../rpcx
CFLAGS+=-I${.CURDIR}/../config
-CFLAGS+=-DARCH_REP=\"${MACHINE}\"
-CFLAGS+=-DOS_REP=\"${OS}\"
-CFLAGS+=-DOS_HDR=\"os-${OS}.h\"
.PATH: ${.CURDIR}/../rpcx ${.CURDIR}/../amd
.include "../../Makefile.inc"
diff --git a/usr.sbin/amd/amq/amq.c b/usr.sbin/amd/amq/amq.c
index a5db412bd01..d9d4ba9d4db 100644
--- a/usr.sbin/amd/amq/amq.c
+++ b/usr.sbin/amd/amq/amq.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)amq.c 8.1 (Berkeley) 6/7/93
- * $Id: amq.c,v 1.14 2013/04/17 15:55:46 deraadt Exp $
+ * $Id: amq.c,v 1.15 2014/10/20 00:20:04 guenther Exp $
*/
/*
@@ -184,17 +184,7 @@ show_mi(amq_mount_info_list *ml, enum show_opt e, int *mwid,
mi->mi_up > 0 ? "up" :
mi->mi_up < 0 ? "starting" : "down");
if (mi->mi_error > 0) {
-#ifdef HAS_STRERROR
printf(" (%s)", strerror(mi->mi_error));
-#else
- extern char *sys_errlist[];
- extern int sys_nerr;
-
- if (mi->mi_error < sys_nerr)
- printf(" (%s)", sys_errlist[mi->mi_error]);
- else
- printf(" (Error %d)", mi->mi_error);
-#endif
} else if (mi->mi_error < 0) {
fputs(" (in progress)", stdout);
}
diff --git a/usr.sbin/amd/config/Configure b/usr.sbin/amd/config/Configure
deleted file mode 100644
index e2430da5e27..00000000000
--- a/usr.sbin/amd/config/Configure
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh -
-#
-# Copyright (c) 1989 Jan-Simon Pendry
-# Copyright (c) 1989 Imperial College of Science, Technology & Medicine
-# Copyright (c) 1989, 1993
-# The Regents of the University of California. All rights reserved.
-#
-# This code is derived from software contributed to Berkeley by
-# Jan-Simon Pendry at Imperial College, London.
-#
-# 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.
-#
-# from: @(#)Configure 8.1 (Berkeley) 6/6/93
-# $Id: Configure,v 1.2 2003/06/02 23:36:51 millert Exp $
-#
-echo "Making ./arch and ./os-type executable ..."
-until chmod +x ./arch ./os-type; do echo "Error: chmod command failed" >&2; exit 1; done
-echo "Checking ./arch and ./os-type ..."
-echo ""
-arch="`sh ./arch 2>/dev/null`"
-os="`sh ./os-type 2>/dev/null`"
-case "$arch" in
-"") echo "./arch doesn't produce an answer - please check it" >&2; exit 1;;
-esac
-case "$os" in
-"") echo "./os-type doesn't produce an answer - please check it" >&2; exit 1;;
-esac
-cat << %
-This machine appears to be a "$arch" running "$os".
-If that is correct just run make.
-If those are incorrect please edit ./arch and ./os-type
-%
-exit 0
diff --git a/usr.sbin/amd/config/Makefile.aix3 b/usr.sbin/amd/config/Makefile.aix3
deleted file mode 100644
index 5bc9910157f..00000000000
--- a/usr.sbin/amd/config/Makefile.aix3
+++ /dev/null
@@ -1,4 +0,0 @@
-# from: @(#)Makefile.aix3 8.1 (Berkeley) 6/6/93
-# $Id: Makefile.aix3,v 1.1 1995/10/18 08:47:13 deraadt Exp $
-#
-SYSLIB = -lbsd
diff --git a/usr.sbin/amd/config/Makefile.bsd44 b/usr.sbin/amd/config/Makefile.bsd44
deleted file mode 100644
index 2d27cc42fb7..00000000000
--- a/usr.sbin/amd/config/Makefile.bsd44
+++ /dev/null
@@ -1,7 +0,0 @@
-# from: @(#)Makefile.bsd44 8.1 (Berkeley) 6/6/93
-# $Id: Makefile.bsd44,v 1.1 1995/10/18 08:47:13 deraadt Exp $
-#
-# Extra Makefile definitions for 4.4 BSD
-#
-
-RPCLIB = -lrpc
diff --git a/usr.sbin/amd/config/Makefile.hpux b/usr.sbin/amd/config/Makefile.hpux
deleted file mode 100644
index f3d13650fbd..00000000000
--- a/usr.sbin/amd/config/Makefile.hpux
+++ /dev/null
@@ -1,12 +0,0 @@
-# from: @(#)Makefile.hpux 8.1 (Berkeley) 6/6/93
-# $Id: Makefile.hpux,v 1.1 1995/10/18 08:47:13 deraadt Exp $
-#
-# Extra Makefile definitions for HP-UX
-#
-
-#CC = gcc ${GCCOPTS}
-# Works only on HP300
-CC = cc -Wc,-Nd2000
-SYSCC = $(CC)
-# Works only Hp800
-# CC = cc
diff --git a/usr.sbin/amd/config/Makefile.irix b/usr.sbin/amd/config/Makefile.irix
deleted file mode 100644
index f2671b47ebf..00000000000
--- a/usr.sbin/amd/config/Makefile.irix
+++ /dev/null
@@ -1,9 +0,0 @@
-# from: @(#)Makefile.irix 8.1 (Berkeley) 6/6/93
-# $Id: Makefile.irix,v 1.1 1995/10/18 08:47:13 deraadt Exp $
-#
-# Extra Makefile definitions for IRIX
-#
-
-DEBUG = #-g -DDEBUG
-CCOPTS = -I/usr/include/sun -I/usr/include/bsd -DIRIX
-RESOLV = -lrpcsvc -lsun -lbsd
diff --git a/usr.sbin/amd/config/Makefile.irix3 b/usr.sbin/amd/config/Makefile.irix3
deleted file mode 100644
index 8e4533647d8..00000000000
--- a/usr.sbin/amd/config/Makefile.irix3
+++ /dev/null
@@ -1,12 +0,0 @@
-# from: @(#)Makefile.irix3 8.1 (Berkeley) 6/6/93
-# $Id: Makefile.irix3,v 1.1 1995/10/18 08:47:13 deraadt Exp $
-#
-# Extra Makefile definitions for IRIX
-#
-
-# For 3.3.x and earlier we might need to indicate the Sun and BSD include
-# paths.
-
-DEBUG = #-g -DDEBUG
-CCOPTS = -I/usr/include/sun -I/usr/include/bsd
-RESOLV = -lrpcsvc -lsun -lbsd
diff --git a/usr.sbin/amd/config/Makefile.irix4 b/usr.sbin/amd/config/Makefile.irix4
deleted file mode 100644
index 4ee2603a927..00000000000
--- a/usr.sbin/amd/config/Makefile.irix4
+++ /dev/null
@@ -1,13 +0,0 @@
-# from: @(#)Makefile.irix4 8.1 (Berkeley) 6/6/93
-# $Id: Makefile.irix4,v 1.1 1995/10/18 08:47:13 deraadt Exp $
-#
-# Extra Makefile definitions for IRIX
-#
-
-# For 4.0.X and later we need to specify the -cckr option - although amd
-# has prototypes - some of the rpc prototypes clash. The special include
-# paths are not required. -lsun always comes before -lbsd.
-
-DEBUG = -g
-CCOPTS = -cckr
-RESOLV = -lrpcsvc -lsun -lbsd
diff --git a/usr.sbin/amd/config/Makefile.stellix b/usr.sbin/amd/config/Makefile.stellix
deleted file mode 100644
index c9597d5ea2c..00000000000
--- a/usr.sbin/amd/config/Makefile.stellix
+++ /dev/null
@@ -1,9 +0,0 @@
-# from: @(#)Makefile.stellix 8.1 (Berkeley) 6/6/93
-# $Id: Makefile.stellix,v 1.1 1995/10/18 08:47:13 deraadt Exp $
-#
-# Extra Makefile definitions for STELLIX
-#
-
-DEBUG = #-g -DDEBUG
-CCOPTS = -DSTELLIX
-RESOLV = -lrpcsvc
diff --git a/usr.sbin/amd/config/arch b/usr.sbin/amd/config/arch
deleted file mode 100644
index 16560ce36e4..00000000000
--- a/usr.sbin/amd/config/arch
+++ /dev/null
@@ -1,121 +0,0 @@
-#! /bin/sh
-#
-# Copyright (c) 1989 Jan-Simon Pendry
-# Copyright (c) 1989 Imperial College of Science, Technology & Medicine
-# Copyright (c) 1989, 1993
-# The Regents of the University of California. All rights reserved.
-#
-# This code is derived from software contributed to Berkeley by
-# Jan-Simon Pendry at Imperial College, London.
-#
-# 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.
-#
-# from: @(#)arch 8.1 (Berkeley) 6/6/93
-# $Id: arch,v 1.2 2003/06/02 23:36:51 millert Exp $
-#
-# Figure out machine architecture
-#
-
-PATH=/bin:/usr/bin:/usr/ucb:/etc:/usr/local/bin:${PATH} export PATH
-
-#
-# First try to find a standard command
-#
-a=arch # Sun compat
-m=machine # BSD compat
-u=uname # Sys5 compat
-
-if [ -f /etc/$a -o -f /bin/$a -o -f /usr/bin/$a -o -f /usr/local/bin/$a ]
-then
- exec $a
-elif [ -f /etc/$m -o -f /bin/$m -o -f /usr/bin/$m -o -f /usr/ucb/$m -o -f /usr/local/bin/$m ]
-then
- exec $m
-elif [ -f /etc/$u -o -f /bin/$u -o -f /usr/bin/$u -o -f /usr/local/bin/$u ]
-then
- ARCH="`uname`"
- case "$ARCH" in
- "HP-UX") echo hp9000; exit 0;;
- AIX*) MACH="`uname -m`"
- case "$MACH" in
- 00*) echo ibm6000; exit 0;;
- 10*) echo ibm032; exit 0;;
- 20*) echo ibm032; exit 0;;
- esac
- ;;
- A/UX) echo macII ; exit 0 ;;
- dgux) MACH="`uname -m`"
- case "$MACH" in
- AViiON) echo aviion; exit 0;;
- esac
- ;;
- *) MACH="`uname -m`"
- case "$MACH" in
- IP6) echo mips; exit 0;;
- IP7) echo mips; exit 0;;
- *) ;;
- esac
- ;;
- esac
-fi
-
-#
-# Take a pot-shot at your machine architecture
-#
-echo "# ... No ARCH= option specified; dynamically determining architecture" >&2
-
-case "`exec 2>/dev/null; head -2 /etc/motd`" in
-*"HP-UX"*) ARCH=hp9000;;
-*"Iris"*) ARCH=iris4d;;
-*"Ultrix"*) ARCH=vax;;
-*"RISC iX"*) ARCH=arm;;
-*"Umax 4.2"*) ARCH=encore;;
-*"Alliant Concentrix"*) ARCH=alliant;;
-*"FPS Model 500"*) ARCH=fps500;;
-*"HCX/UX"*) ARCH=harris;;
-*) ARCH=unknown;
- if [ -d /usr/include/caif ]; then
- ARCH=ibm032
- elif [ -f /bin/pyr ]; then
- if /bin/pyr; then
- ARCH=pyr
- fi
- elif [ -d /NextApps ]; then
- ARCH=next
- elif [ -f /etc/comply ]; then
- # Tex 4300 is essentially a sun 3.
- ARCH=sun3
- fi
- ;;
-esac
-
-echo "# ... architecture appears to be \"${ARCH}\"" >&2
-echo $ARCH
-
-case "$ARCH" in
-unknown) exit 1
-esac
-
-exit 0
diff --git a/usr.sbin/amd/config/misc-aix3.h b/usr.sbin/amd/config/misc-aix3.h
deleted file mode 100644
index f296ff1b0c6..00000000000
--- a/usr.sbin/amd/config/misc-aix3.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)misc-aix3.h 8.1 (Berkeley) 6/6/93
- * $Id: misc-aix3.h,v 1.2 2003/06/02 23:36:51 millert Exp $
- */
-
-struct ufs_args {
- char *fspec; /* Block device */
-};
-
-struct nfs_args {
- struct sockaddr_in addr; /* file server address */
- fhandle_t fh; /* File handle to be mounted */
- int flags; /* flags */
- int wsize; /* write size in bytes */
- int rsize; /* read size in bytes */
- int timeo; /* initial timeout in .1 secs */
- int retrans; /* times to retry send */
- char *hostname; /* server's hostname */
- int acregmin; /* attr cache file min secs */
- int acregmax; /* attr cache file max secs */
- int acdirmin; /* attr cache dir min secs */
- int acdirmax; /* attr cache dir max secs */
- char *netname; /* server's netname */
- int biods; /* number of BIODS */
-};
-
-/*
- * NFS mount option flags
- */
-#define MNTOPT_RO "ro" /* read only */
-#define MNTOPT_RW "rw" /* read/write */
-#define MNTOPT_SOFT "soft" /* soft mount */
-#define MNTOPT_HARD "hard" /* hard mount */
-#define MNTOPT_NOSUID "nosuid"/* no set uid allowed */
-#define MNTOPT_NOAUTO "noauto"/* hide entry from mount -a */
-#define MNTOPT_INTR "intr" /* allow interrupts on hard mount */
-#define MNTOPT_SECURE "secure"/* use secure RPC for NFS */
-#define MNTOPT_GRPID "grpid" /* SysV-compatible group-id on create */
-#define MNTOPT_NOSUB "nosub" /* disallow mounts beneath this one */
-#define MNTOPT_MULTI "multi" /* Do multi-component lookup */
-#define MNTOPT_NOAC "noac" /* don't cache attributes */
-
-#define NFSMNT_SOFT 0x001 /* soft mount (hard is default) */
-#define NFSMNT_WSIZE 0x002 /* set write size */
-#define NFSMNT_RSIZE 0x004 /* set read size */
-#define NFSMNT_TIMEO 0x008 /* set initial timeout */
-#define NFSMNT_RETRANS 0x010 /* set number of request retrys */
-#define NFSMNT_HOSTNAME 0x020 /* set hostname for error printf */
-#define NFSMNT_INT 0x040 /* allow interrupts on hard mount */
-#define NFSMNT_NOAC 0x080 /* don't cache attributes */
-#define NFSMNT_ACREGMIN 0x0100 /* set min secs for file attr cache */
-#define NFSMNT_ACREGMAX 0x0200 /* set max secs for file attr cache */
-#define NFSMNT_ACDIRMIN 0x0400 /* set min secs for dir attr cache */
-#define NFSMNT_ACDIRMAX 0x0800 /* set max secs for dir attr cache */
-#define NFSMNT_SECURE 0x1000 /* secure mount */
-#define NFSMNT_BIODS 0x10000 /* Number of biods for the file system */
-
-#define DEF_BIODS 6
diff --git a/usr.sbin/amd/config/misc-hpux.h b/usr.sbin/amd/config/misc-hpux.h
deleted file mode 100644
index b13b377940b..00000000000
--- a/usr.sbin/amd/config/misc-hpux.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)misc-hpux.h 8.1 (Berkeley) 6/6/93
- * $Id: misc-hpux.h,v 1.2 2003/06/02 23:36:51 millert Exp $
- */
-
-/*
- * These definitions are from <nfs/nfs.h>
- * Unfortunately, that file cannot be included
- * because it contains lots of structure definitions
- * that are not wanted (they produce name clashes).
- * Isn't HP-UX wonderful!
- */
-
-/*
- * HP-UX specific definitions
- */
-struct nfs_args {
- struct sockaddr_in *addr; /* file server address */
- fhandle_t *fh; /* File handle to be mounted */
- int flags; /* flags */
- int wsize; /* write size in bytes */
- int rsize; /* read size in bytes */
- int timeo; /* initial timeout in .1 secs */
- int retrans; /* times to retry send */
- char *hostname; /* server's name */
-#ifdef __hp9000s700 /* XXX for HPUX 8.0 */
- char *fsname; /* server's filesystem name */
-#endif
-};
-
-/*
- * NFS mount option flags
- */
-#define NFSMNT_SOFT 0x001 /* soft mount (hard is default) */
-#define NFSMNT_WSIZE 0x002 /* set write size */
-#define NFSMNT_RSIZE 0x004 /* set read size */
-#define NFSMNT_TIMEO 0x008 /* set initial timeout */
-#define NFSMNT_RETRANS 0x010 /* set number of request retrys */
-#define NFSMNT_HOSTNAME 0x020 /* set hostname for error printf */
-#define NFSMNT_INT 0x040 /* set option to have interruptable mounts */
-#define NFSMNT_NODEVS 0x080 /* turn off device file access (default on) */
diff --git a/usr.sbin/amd/config/misc-irix.h b/usr.sbin/amd/config/misc-irix.h
deleted file mode 100644
index 72b94b47e4e..00000000000
--- a/usr.sbin/amd/config/misc-irix.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)misc-irix.h 8.1 (Berkeley) 6/6/93
- * $Id: misc-irix.h,v 1.2 2003/06/02 23:36:51 millert Exp $
- */
-
-#include <sys/fs/nfs_clnt.h>
-#include <sys/fsid.h>
-#include <sys/fstyp.h>
-
-struct ufs_args {
- char *fspec;
-};
diff --git a/usr.sbin/amd/config/misc-next.h b/usr.sbin/amd/config/misc-next.h
deleted file mode 100644
index 3f37989f171..00000000000
--- a/usr.sbin/amd/config/misc-next.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)misc-next.h 8.1 (Berkeley) 6/6/93
- * $Id: misc-next.h,v 1.2 2003/06/02 23:36:51 millert Exp $
- */
-
-#include <nfs/nfs_mount.h>
diff --git a/usr.sbin/amd/config/misc-stellix.h b/usr.sbin/amd/config/misc-stellix.h
deleted file mode 100644
index 81718abf0b5..00000000000
--- a/usr.sbin/amd/config/misc-stellix.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)misc-stellix.h 8.1 (Berkeley) 6/6/93
- * $Id: misc-stellix.h,v 1.2 2003/06/02 23:36:51 millert Exp $
- */
-
-#include <sys/fstyp.h>
-
-struct ufs_args {
- char *fspec;
-};
-
-struct nfs_args {
- struct sockaddr_in *addr; /* file server address */
- fhandle_t *fh; /* File handle to be mounted */
- int flags; /* flags */
- int wsize; /* write size in bytes */
- int rsize; /* read size in bytes */
- int timeo; /* initial timeout in .1 secs *
-/
- int retrans; /* times to retry send */
- char *hostname; /* server's name */
-};
-#define NFSMNT_SOFT 0x001 /* soft mount (hard is default) */
-#define NFSMNT_WSIZE 0x002 /* set write size */
-#define NFSMNT_RSIZE 0x004 /* set read size */
-#define NFSMNT_TIMEO 0x008 /* set initial timeout (= 1.6 sec) */
-#define NFSMNT_RETRANS 0x010 /* set number of request retrys */
-#define NFSMNT_HOSTNAME 0x020 /* set hostname for error printf */
-#define NFSMNT_INT 0x040 /* allow interrupts on hard mount */
diff --git a/usr.sbin/amd/config/misc-ultrix.h b/usr.sbin/amd/config/misc-ultrix.h
deleted file mode 100644
index 385b43344c5..00000000000
--- a/usr.sbin/amd/config/misc-ultrix.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)misc-ultrix.h 8.1 (Berkeley) 6/6/93
- * $Id: misc-ultrix.h,v 1.2 2003/06/02 23:36:51 millert Exp $
- */
-
-#include <nfs/nfs_gfs.h>
-#define KERNEL
-#include <sys/fs_types.h>
-#undef KERNEL
-
-#ifndef HOSTNAMESZ
-#include <nfs/nfs_clnt.h>
-#endif
-
-#include <ufs/ufs_mount.h>
-
-#define ufs_args ufs_specific
diff --git a/usr.sbin/amd/config/mount_aix.c b/usr.sbin/amd/config/mount_aix.c
deleted file mode 100644
index 945da91e7eb..00000000000
--- a/usr.sbin/amd/config/mount_aix.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)mount_aix.c 8.1 (Berkeley) 6/6/93
- * $Id: mount_aix.c,v 1.3 2003/06/02 23:36:51 millert Exp $
- */
-
-
-/*
- * AIX 3 Mount helper
- */
-
-#include "misc-aix3.h"
-
-static int aix3_mkvp(p, gfstype, flags, object, stub, host, info, info_size, args)
-char *p;
-int gfstype;
-int flags;
-char *object;
-char *stub;
-char *host;
-char *info;
-int info_size;
-char *args;
-{
- struct vmount *vp = (struct vmount *) p;
- bzero((void *)vp, sizeof(*vp));
- /*
- * Fill in standard fields
- */
- vp->vmt_revision = VMT_REVISION;
- vp->vmt_flags = flags;
- vp->vmt_gfstype = gfstype;
-
-#define VMT_ROUNDUP(len) (4 * ((len + 3) / 4))
-#define VMT_ASSIGN(vp, idx, data, size) \
- vp->vmt_data[idx].vmt_off = p - (char *) vp; \
- vp->vmt_data[idx].vmt_size = size; \
- bcopy(data, p, size); \
- p += VMT_ROUNDUP(size);
-
- /*
- * Fill in all variable length data
- */
- p += sizeof(*vp);
-
- VMT_ASSIGN(vp, VMT_OBJECT, object, strlen(object) + 1);
- VMT_ASSIGN(vp, VMT_STUB, stub, strlen(stub) + 1);
- VMT_ASSIGN(vp, VMT_HOST, host, strlen(host) + 1);
- VMT_ASSIGN(vp, VMT_HOSTNAME, host, strlen(host) + 1);
- VMT_ASSIGN(vp, VMT_INFO, info, info_size);
- VMT_ASSIGN(vp, VMT_ARGS, args, strlen(args) + 1);
-
-#undef VMT_ASSIGN
-#undef VMT_ROUNDUP
-
- /*
- * Return length
- */
- return vp->vmt_length = p - (char *) vp;
-}
-
-/*
- * Map from conventional mount arguments
- * to AIX 3-style arguments.
- */
-aix3_mount(fsname, dir, flags, type, data, args)
-char *fsname;
-char *dir;
-int flags;
-int type;
-void *data;
-char *args;
-{
- char buf[4096];
- int size;
-
-#ifdef DEBUG
- dlog("aix3_mount: fsname %s, dir %s, type %d", fsname, dir, type);
-#endif /* DEBUG */
-
-/* aix3_mkvp(p, gfstype, flags, object, stub, host, info, info_size, args) */
-
- switch (type) {
-
- case MOUNT_TYPE_NFS: {
- char *host = strdup(fsname);
- char *rfs = strchr(host, ':');
- int free_rfs = 0;
- if (rfs) {
- *rfs++ = '\0';
- } else {
- rfs = host;
- free_rfs = 1;
- host = strdup(hostname);
- }
-
- size = aix3_mkvp(buf, type, flags, rfs, dir, host, data, sizeof(struct nfs_args), args);
- if (free_rfs)
- free((void *)rfs);
- free(host);
-
- } break;
-
- case MOUNT_TYPE_UFS:
- /* Need to open block device and extract log device info from sblk. */
- return EINVAL;
-
- default:
- return EINVAL;
- }
-#ifdef DEBUG
- /*dlog("aix3_mkvp: flags %#x, size %d, args %s", flags, size, args);*/
-#endif /* DEBUG */
-
- return vmount(buf, size);
-}
diff --git a/usr.sbin/amd/config/mount_irix.c b/usr.sbin/amd/config/mount_irix.c
deleted file mode 100644
index a806b7f2d26..00000000000
--- a/usr.sbin/amd/config/mount_irix.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)mount_irix.c 8.1 (Berkeley) 6/6/93
- * $Id: mount_irix.c,v 1.2 2003/06/02 23:36:51 millert Exp $
- */
-
-
-/*
- * IRIX Mount helper
- */
-
-#include "misc-irix.h"
-
-/*
- * Map from conventional mount arguments
- * to IRIX style arguments.
- */
-irix_mount(fsname, dir, flags, type, data)
-char *fsname;
-char *dir;
-int flags;
-int type;
-void *data;
-{
- int size;
-
-#ifdef DEBUG
- dlog("irix_mount: fsname %s, dir %s, type %d", fsname, dir, type);
-#endif /* DEBUG */
-
- if (type == MOUNT_TYPE_NFS) {
-
- size = sizeof (struct nfs_args);
-
- return mount(dir, dir, (MS_FSS|MS_DATA|flags),
- type, (struct nfs_args *) data, size);
-
- } else if (type == MOUNT_TYPE_UFS) {
-
- return mount(fsname, dir, (MS_FSS|flags), type);
-
- } else {
- return EINVAL;
- }
-
-}
diff --git a/usr.sbin/amd/config/mount_stellix.c b/usr.sbin/amd/config/mount_stellix.c
deleted file mode 100644
index 0d289d5e77d..00000000000
--- a/usr.sbin/amd/config/mount_stellix.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)mount_stellix.c 8.1 (Berkeley) 6/6/93
- * $Id: mount_stellix.c,v 1.2 2003/06/02 23:36:51 millert Exp $
- */
-
-/*
- * IRIX Mount helper
- */
-
-#include "misc-stellix.h"
-
-/*
- * Map from conventional mount arguments
- * to IRIX style arguments.
- */
-stellix_mount(fsname, dir, flags, type, data)
-char *fsname;
-char *dir;
-int flags;
-int type;
-void *data;
-{
-
-#ifdef DEBUG
- dlog("stellix_mount: fsname %s, dir %s, type %d", fsname, dir, type);
-#endif /* DEBUG */
-
- if (type == MOUNT_TYPE_NFS) {
-
- return mount(dir, dir, (MS_FSS|MS_NFS|flags),
- type, (caddr_t) data );
-
- } else if (type == MOUNT_TYPE_UFS) {
-
- return mount(fsname, dir, (MS_FSS|flags), type);
-
- } else {
- return EINVAL;
- }
-
-}
diff --git a/usr.sbin/amd/config/mtab_aix.c b/usr.sbin/amd/config/mtab_aix.c
deleted file mode 100644
index be1182b268a..00000000000
--- a/usr.sbin/amd/config/mtab_aix.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)mtab_aix.c 8.1 (Berkeley) 6/6/93
- * $Id: mtab_aix.c,v 1.2 2003/06/02 23:36:52 millert Exp $
- */
-
-#include "am.h"
-
-#ifdef READ_MTAB_AIX3_STYLE
-
-#include <sys/mntctl.h>
-#include <sys/vmount.h>
-
-static struct mntent *mnt_dup(mp)
-struct vmount *mp;
-{
- struct mntent *new_mp = ALLOC(mntent);
-
- char *ty;
- new_mp->mnt_fsname = strdup(vmt2dataptr(mp, VMT_OBJECT));
- new_mp->mnt_dir = strdup(vmt2dataptr(mp, VMT_STUB));
- new_mp->mnt_opts = strdup(vmt2dataptr(mp, VMT_ARGS));
- switch (mp->vmt_gfstype) {
- case MNT_JFS: ty = MTAB_TYPE_UFS; break;
- case MNT_NFS:
- ty = MTAB_TYPE_NFS;
- new_mp->mnt_fsname = str3cat(new_mp->mnt_fsname,
- vmt2dataptr(mp, VMT_HOSTNAME),
- ":", new_mp->mnt_fsname);
- break;
- default: ty = "unknown"; break;
- }
- new_mp->mnt_type = strdup(ty);
- new_mp->mnt_passno = mp->vmt_vfsnumber;
- new_mp->mnt_freq = 0;
-
- return new_mp;
-}
-
-/*
- * Read a mount table into memory
- */
-mntlist *read_mtab(fs)
-char *fs;
-{
- mntlist **mpp, *mhp;
-
- int i;
- char *mntinfo = 0, *cp;
- struct vmount *vp;
- int ret;
-
- /*
- * First figure out size of mount table
- * and allocate space for a copy...
- * Then get mount table for real.
- */
- ret = mntctl(MCTL_QUERY, sizeof(i), &i);
- if (ret == 0) {
- mntinfo = xmalloc(i);
- ret = mntctl(MCTL_QUERY, i, mntinfo);
- }
-
- if (ret <= 0) {
- plog(XLOG_ERROR, "mntctl: %m");
- goto out;
- }
-#ifdef DEBUG
- /*dlog("mntctl returns %d structures", ret);*/
-#endif /* DEBUG */
-
- mpp = &mhp;
- for (i = 0, cp = mntinfo; i < ret; i++, cp += vp->vmt_length) {
- vp = (struct vmount *) cp;
-
- /*
- * Allocate a new slot
- */
- *mpp = ALLOC(mntlist);
-
- /*
- * Copy the data returned by mntctl
- */
- (*mpp)->mnt = mnt_dup(vp);
-
- /*
- * Move to next pointer
- */
- mpp = &(*mpp)->mnext;
- }
-
- *mpp = 0;
-
-out:
- if (mntinfo)
- free(mntinfo);
- return mhp;
-}
-
-#endif /* READ_MTAB_AIX3_STYLE */
diff --git a/usr.sbin/amd/config/mtab_bsd.c b/usr.sbin/amd/config/mtab_bsd.c
deleted file mode 100644
index d422829207a..00000000000
--- a/usr.sbin/amd/config/mtab_bsd.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/* $OpenBSD: mtab_bsd.c,v 1.4 2003/06/02 23:36:52 millert Exp $ */
-
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)mtab_bsd.c 8.1 (Berkeley) 6/6/93
- */
-
-#include "am.h"
-
-#ifdef READ_MTAB_BSD_STYLE
-
-static struct mntent *mnt_dup(mp)
-struct statfs *mp;
-{
- struct mntent *new_mp = ALLOC(mntent);
- char *ty;
-
- new_mp->mnt_fsname = strdup(mp->f_mntfromname);
- new_mp->mnt_dir = strdup(mp->f_mntonname);
-#if !defined(__NetBSD__) && !defined(__OpenBSD__)
- switch (mp->f_type) {
- case MOUNT_UFS: ty = MTAB_TYPE_UFS; break;
- case MOUNT_NFS: ty = MTAB_TYPE_NFS; break;
- case MOUNT_MFS: ty = MTAB_TYPE_MFS; break;
- default: ty = "unknown"; break;
- }
-#else
- ty = mp->f_fstypename;
-#endif
- new_mp->mnt_type = strdup(ty);
- new_mp->mnt_opts = strdup("unset");
- new_mp->mnt_freq = 0;
- new_mp->mnt_passno = 0;
-
- return new_mp;
-}
-
-/*
- * Read a mount table into memory
- */
-mntlist *read_mtab(fs)
-char *fs;
-{
- mntlist **mpp, *mhp;
- struct statfs *mntbufp, *mntp;
-
- int nloc = getmntinfo(&mntbufp, MNT_NOWAIT);
-
- if (nloc == 0) {
- plog(XLOG_ERROR, "Can't read mount table");
- return 0;
- }
-
- mpp = &mhp;
- for (mntp = mntbufp; mntp < mntbufp + nloc; mntp++) {
- /*
- * Allocate a new slot
- */
- *mpp = ALLOC(mntlist);
-
- /*
- * Copy the data returned by getmntent
- */
- (*mpp)->mnt = mnt_dup(mntp);
-
- /*
- * Move to next pointer
- */
- mpp = &(*mpp)->mnext;
- }
-
- /*
- * Terminate the list
- */
- *mpp = 0;
-
- return mhp;
-}
-
-#endif /* READ_MTAB_BSD_STYLE */
diff --git a/usr.sbin/amd/config/mtab_file.c b/usr.sbin/amd/config/mtab_file.c
deleted file mode 100644
index 68dbc257eba..00000000000
--- a/usr.sbin/amd/config/mtab_file.c
+++ /dev/null
@@ -1,466 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)mtab_file.c 8.1 (Berkeley) 6/6/93
- * $Id: mtab_file.c,v 1.4 2003/06/02 23:36:52 millert Exp $
- */
-
-#include "am.h"
-
-#ifdef READ_MTAB_FROM_FILE
-
-#ifdef USE_FCNTL
-#include <fcntl.h>
-#else
-#include <sys/file.h>
-#endif /* USE_FCNTL */
-
-#ifdef UPDATE_MTAB
-
-/*
- * Do strict /etc/mtab locking
- */
-#define MTAB_LOCKING
-
-/*
- * Firewall mtab entries
- */
-#define MTAB_STRIPNL
-
-#include <sys/stat.h>
-static FILE *mnt_file;
-
-/*
- * If the system is being trashed by something, then
- * opening mtab may fail with ENFILE. So, go to sleep
- * for a second and try again. (Yes - this has happened to me.)
- *
- * Note that this *may* block the automounter, oh well.
- * If we get to this state then things are badly wrong anyway...
- *
- * Give the system 10 seconds to recover but then give up.
- * Hopefully something else will exit and free up some file
- * table slots in that time.
- */
-#define NFILE_RETRIES 10 /* seconds */
-
-#ifdef MTAB_LOCKING
-#ifdef LOCK_FCNTL
-static int lock(fd)
-{
- int rc;
- struct flock lk;
-
- lk.l_type = F_WRLCK;
- lk.l_whence = 0;
- lk.l_start = 0;
- lk.l_len = 0;
-
-again:
- rc = fcntl(fd, F_SETLKW, (caddr_t) &lk);
- if (rc < 0 && (errno == EACCES || errno == EAGAIN)) {
-#ifdef DEBUG
- dlog("Blocked, trying to obtain exclusive mtab lock");
-#endif /* DEBUG */
- sleep(1);
- goto again;
- }
- return rc;
-}
-#else
-#define lock(fd) (flock((fd), LOCK_EX))
-#endif /* LOCK_FCNTL */
-#endif /* MTAB_LOCKING */
-
-static FILE *open_locked_mtab(mtab_file, mode, fs)
-char *mtab_file;
-char *mode;
-char *fs;
-{
- FILE *mfp = 0;
-
-#ifdef UPDATE_MTAB
- /*
- * There is a possible race condition if two processes enter
- * this routine at the same time. One will be blocked by the
- * exclusive lock below (or by the shared lock in setmntent)
- * and by the time the second process has the exclusive lock
- * it will be on the wrong underlying object. To check for this
- * the mtab file is stat'ed before and after all the locking
- * sequence, and if it is a different file then we assume that
- * it may be the wrong file (only "may", since there is another
- * race between the initial stat and the setmntent).
- *
- * Simpler solutions to this problem are invited...
- */
- int racing = 2;
-#ifdef MTAB_LOCKING
- int rc;
- int retries = 0;
- struct stat st_before, st_after;
-#endif /* MTAB_LOCKING */
-
- if (mnt_file) {
-#ifdef DEBUG
- dlog("Forced close on %s in read_mtab", mtab_file);
-#endif /* DEBUG */
- endmntent(mnt_file);
- mnt_file = 0;
- }
-
-#ifdef MTAB_LOCKING
-again:
- if (mfp) {
- endmntent(mfp);
- mfp = 0;
- }
-
- clock_valid = 0;
- if (stat(mtab_file, &st_before) < 0) {
- plog(XLOG_ERROR, "%s: stat: %m", mtab_file);
- if (errno == ESTALE) {
- /* happens occasionally */
- sleep(1);
- goto again;
- }
- return 0;
- }
-#endif /* MTAB_LOCKING */
-#endif /* UPDATE_MTAB */
-
-eacces:
- mfp = setmntent(mtab_file, mode);
- if (!mfp) {
- /*
- * Since setmntent locks the descriptor, it
- * is possible it can fail... so retry if
- * needed.
- */
- if (errno == EACCES || errno == EAGAIN) {
-#ifdef DEBUG
- dlog("Blocked, trying to obtain exclusive mtab lock");
-#endif /* DEBUG */
- goto eacces;
- } else if (errno == ENFILE && retries++ < NFILE_RETRIES) {
- sleep(1);
- goto eacces;
- }
-
- plog(XLOG_ERROR, "setmntent(\"%s\", \"%s\"): %m", mtab_file, mode);
- return 0;
- }
-
-#ifdef MTAB_LOCKING
-#ifdef UPDATE_MTAB
- /*
- * At this point we have an exclusive lock on the mount list,
- * but it may be the wrong one so...
- */
-
- /*
- * Need to get an exclusive lock on the current
- * mount table until we have a new copy written
- * out, when the lock is released in free_mntlist.
- * flock is good enough since the mount table is
- * not shared between machines.
- */
- do
- rc = lock(fileno(mfp));
- while (rc < 0 && errno == EINTR);
- if (rc < 0) {
- plog(XLOG_ERROR, "Couldn't lock %s: %m", mtab_file);
- endmntent(mfp);
- return 0;
- }
- /*
- * Now check whether the mtab file has changed under our feet
- */
- if (stat(mtab_file, &st_after) < 0) {
- plog(XLOG_ERROR, "%s: stat", mtab_file);
- goto again;
- }
-
- if (st_before.st_dev != st_after.st_dev ||
- st_before.st_ino != st_after.st_ino) {
- struct timeval tv;
- if (racing == 0) {
- /* Sometimes print a warning */
- plog(XLOG_WARNING,
- "Possible mount table race - retrying %s", fs);
- }
- racing = (racing+1) & 3;
- /*
- * Take a nap. From: Doug Kingston <dpk@morgan.com>
- */
- tv.tv_sec = 0;
- tv.tv_usec = (mypid & 0x07) << 17;
- if (tv.tv_usec)
- if (select(0, (void *)0, (void *)0, (void *)0, &tv) < 0)
- plog(XLOG_WARNING, "mtab nap failed: %m");
-
- goto again;
- }
-#endif /* UPDATE_MTAB */
-#endif /* MTAB_LOCKING */
-
- return mfp;
-}
-
-/*
- * Unlock the mount table
- */
-void unlock_mntlist P((void));
-void unlock_mntlist()
-{
- /*
- * Release file lock, by closing the file
- */
- if (mnt_file) {
- endmntent(mnt_file);
- mnt_file = 0;
- }
-}
-
-/*
- * Write out a mount list
- */
-void rewrite_mtab(mp)
-mntlist *mp;
-{
- FILE *mfp;
- int error = 0;
-
- /*
- * Concoct a temporary name in the same
- * directory as the target mount table
- * so that rename() will work.
- */
- char tmpname[64];
- int retries;
- int tmpfd;
- char *cp;
- char *mcp = mtab;
- cp = strrchr(mcp, '/');
- if (cp) {
- bcopy(mcp, tmpname, cp - mcp);
- tmpname[cp-mcp] = '\0';
- } else {
- plog(XLOG_WARNING, "No '/' in mtab (%s), using \".\" as tmp directory", mtab);
- tmpname[0] = '.'; tmpname[1] = '\0';
- }
- strlcat(tmpname, "/mtabXXXXXX", sizeof(tmpname));
- mktemp(tmpname);
- retries = 0;
-enfile1:
- if ((tmpfd = open(tmpname, O_RDWR|O_CREAT|O_TRUNC, 0644)) < 0) {
- if (errno == ENFILE && retries++ < NFILE_RETRIES) {
- sleep(1);
- goto enfile1;
- }
- plog(XLOG_ERROR, "%s: open: %m", tmpname);
- return;
- }
- if (close(tmpfd) < 0)
- plog(XLOG_ERROR, "Couldn't close tmp file descriptor: %m");
-
- retries = 0;
-enfile2:
- mfp = setmntent(tmpname, "w");
- if (!mfp) {
- if (errno == ENFILE && retries++ < NFILE_RETRIES) {
- sleep(1);
- goto enfile2;
- }
- plog(XLOG_ERROR, "setmntent(\"%s\", \"w\"): %m", tmpname);
- error = 1;
- goto out;
- }
-
- while (mp) {
- if (mp->mnt) {
- if (addmntent(mfp, mp->mnt)) {
- plog(XLOG_ERROR, "Can't write entry to %s", tmpname);
- error = 1;
- goto out;
- }
- }
- mp = mp->mnext;
- }
-
- /*
- * SunOS 4.1 manuals say that the return code from entmntent()
- * is always 1 and to treat as a void. That means we need to
- * call fflush() to make sure the new mtab file got written.
- */
- if (fflush(mfp)) {
- plog(XLOG_ERROR, "flush new mtab file: %m");
- error = 1;
- goto out;
- }
-
- (void) endmntent(mfp);
-
- /*
- * Rename temporary mtab to real mtab
- */
- if (rename(tmpname, mtab) < 0) {
- plog(XLOG_ERROR, "rename %s to %s: %m", tmpname, mtab);
- error = 1;
- goto out;
- }
-
-out:
- if (error)
- (void) unlink(tmpname);
-}
-
-#ifdef MTAB_STRIPNL
-static void mtab_stripnl(s)
-char *s;
-{
- do {
- s = strchr(s, '\n');
- if (s)
- *s++ = ' ';
- } while (s);
-}
-#endif /* MTAB_STRIPNL */
-
-/*
- * Append a mntent structure to the
- * current mount table.
- */
-void write_mntent(mp)
-struct mntent *mp;
-{
- int retries = 0;
- FILE *mfp;
-enfile:
- mfp = open_locked_mtab(mtab, "a", mp->mnt_dir);
- if (mfp) {
-#ifdef MTAB_STRIPNL
- mtab_stripnl(mp->mnt_opts);
-#endif /* MTAB_STRIPNL */
- if (addmntent(mfp, mp))
- plog(XLOG_ERROR, "Couldn't write %s: %m", mtab);
- if (fflush(mfp))
- plog(XLOG_ERROR, "Couldn't flush %s: %m", mtab);
- (void) endmntent(mfp);
- } else {
- if (errno == ENFILE && retries < NFILE_RETRIES) {
- sleep(1);
- goto enfile;
- }
- plog(XLOG_ERROR, "setmntent(\"%s\", \"a\"): %m", mtab);
- }
-}
-
-#endif /* UPDATE_MTAB */
-
-static struct mntent *mnt_dup(mp)
-struct mntent *mp;
-{
- struct mntent *new_mp = ALLOC(mntent);
-
- new_mp->mnt_fsname = strdup(mp->mnt_fsname);
- new_mp->mnt_dir = strdup(mp->mnt_dir);
- new_mp->mnt_type = strdup(mp->mnt_type);
- new_mp->mnt_opts = strdup(mp->mnt_opts);
-
- new_mp->mnt_freq = mp->mnt_freq;
- new_mp->mnt_passno = mp->mnt_passno;
-
-#ifdef FIXUP_MNTENT_DUP
- /*
- * Additional fields get dup'ed here
- */
- FIXUP_MNTENT_DUP(new_mp, mp);
-#endif
-
- return new_mp;
-}
-
-/*
- * Read a mount table into memory
- */
-mntlist *read_mtab(fs)
-char *fs;
-{
- mntlist **mpp, *mhp;
-
- struct mntent *mep;
- FILE *mfp = open_locked_mtab(mtab, "r+", fs);
-
- if (!mfp)
- return 0;
-
- mpp = &mhp;
-
-/*
- * XXX - In SunOS 4 there is (yet another) memory leak
- * which loses 1K the first time getmntent is called.
- * (jsp)
- */
- while (mep = getmntent(mfp)) {
- /*
- * Allocate a new slot
- */
- *mpp = ALLOC(mntlist);
-
- /*
- * Copy the data returned by getmntent
- */
- (*mpp)->mnt = mnt_dup(mep);
-
- /*
- * Move to next pointer
- */
- mpp = &(*mpp)->mnext;
- }
- *mpp = 0;
-
-#ifdef UPDATE_MTAB
- /*
- * If we are not updating the mount table then we
- * can free the resources held here, otherwise they
- * must be held until the mount table update is complete
- */
- mnt_file = mfp;
-#else
- endmntent(mfp);
-#endif /* UPDATE_MTAB */
-
- return mhp;
-}
-
-#endif /* READ_MTAB_FROM_FILE */
diff --git a/usr.sbin/amd/config/mtab_ultrix.c b/usr.sbin/amd/config/mtab_ultrix.c
deleted file mode 100644
index 5b43d53ddc6..00000000000
--- a/usr.sbin/amd/config/mtab_ultrix.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)mtab_ultrix.c 8.1 (Berkeley) 6/6/93
- * $Id: mtab_ultrix.c,v 1.2 2003/06/02 23:36:52 millert Exp $
- */
-
-#include "am.h"
-
-#ifdef READ_MTAB_ULTRIX_STYLE
-
-#include <sys/mount.h>
-#include <sys/fs_types.h>
-
-static struct mntent *mnt_dup(mp)
-struct fs_data *mp;
-{
- struct mntent *new_mp = ALLOC(mntent);
-
- new_mp->mnt_fsname = strdup(mp->fd_devname);
- new_mp->mnt_dir = strdup(mp->fd_path);
- if (mp->fd_fstype >= GT_NUMTYPES)
- mp->fd_fstype = GT_UNKWN;
- else if (gt_names[mp->fd_fstype] == 0)
- mp->fd_fstype = GT_UNKWN;
- new_mp->mnt_type = strdup(gt_names[mp->fd_fstype]);
- new_mp->mnt_opts = strdup("unset");
-
- new_mp->mnt_freq = 0;
- new_mp->mnt_passno = mp->fd_dev;
-
- return new_mp;
-}
-
-/*
- * Read a mount table into memory
- */
-mntlist *read_mtab(fs)
-char *fs;
-{
- mntlist **mpp, *mhp;
-
-/* From: Piete Brooks <pb@cl.cam.ac.uk> */
-
- int loc=0;
-#undef NMOUNT
-#define NMOUNT 20
- struct fs_data mountbuffer[NMOUNT], *fs_data;
- int ret;
-
- mpp = &mhp;
- while ((ret = getmountent(&loc, mountbuffer, NMOUNT)) > 0) {
- for (fs_data = mountbuffer; fs_data < &mountbuffer[ret]; fs_data++) {
- /*
- * Allocate a new slot
- */
- *mpp = ALLOC(mntlist);
-
- /*
- * Copy the data returned by getmntent
- */
- (*mpp)->mnt = mnt_dup(fs_data);
-
- /*
- * Move to next pointer
- */
- mpp = &(*mpp)->mnext;
- }
- }
- if (ret < 0) {
- plog(XLOG_ERROR, "getmountent: %m");
- return 0;
- }
- *mpp = 0;
-
- return mhp;
-}
-
-#endif /* READ_MTAB_ULTRIX_STYLE */
diff --git a/usr.sbin/amd/config/os-acis43.h b/usr.sbin/amd/config/os-acis43.h
deleted file mode 100644
index a3a44a91f47..00000000000
--- a/usr.sbin/amd/config/os-acis43.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-acis43.h 8.1 (Berkeley) 6/6/93
- * $Id: os-acis43.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * IBM RT ACIS4.3 definitions for Amd (automounter)
- */
-
-/*
- * Does the compiler grok void *
- */
-#define VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Does this OS have NDBM support?
- */
-#define OS_HAS_NDBM
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_NFS MOUNT_NFS
-#define MOUNT_TYPE_UFS MOUNT_UFS
-#undef MTAB_TYPE_UFS
-#define MTAB_TYPE_UFS "ufs"
-
-#undef ARCH_ENDIAN
-#define ARCH_ENDIAN "big"
-
-/*
- * Need precise symlink lengths
-#define PRECISE_SYMLINKS
- */
diff --git a/usr.sbin/amd/config/os-aix3.h b/usr.sbin/amd/config/os-aix3.h
deleted file mode 100644
index ef58124cac7..00000000000
--- a/usr.sbin/amd/config/os-aix3.h
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-aix3.h 8.1 (Berkeley) 6/6/93
- * $Id: os-aix3.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * AIX 3.1 definitions for Amd (automounter)
- */
-
-/*
- * Does the compiler grok void *
- */
-#define VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_4
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_AIX3
-
-/*
- * Does this OS have NDBM support?
- */
-#define OS_HAS_NDBM
-
-/*
- * The mount table is obtained from the kernel
- */
-#undef UPDATE_MTAB
-
-/*
- * Pick up BSD bits from include files
- * Try for 4.4 compatibility if available (AIX 3.2 and later)
- */
-#define _BSD 44
-
-/*
- * No mntent info on AIX 3
- */
-#undef MNTENT_HDR
-#define MNTENT_HDR <sys/mntctl.h>
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_NFS MNT_NFS
-#define MOUNT_TYPE_UFS MNT_JFS
-#undef MTAB_TYPE_UFS
-#define MTAB_TYPE_UFS "jfs"
-
-/*
- * How to unmount filesystems
- */
-#undef MOUNT_TRAP
-#define MOUNT_TRAP(type, mnt, flag, mnt_data) \
- aix3_mount(mnt->mnt_fsname, mnt->mnt_dir, flag, type, mnt_data, mnt->mnt_opts)
-#undef UNMOUNT_TRAP
-#define UNMOUNT_TRAP(mnt) uvmount(mnt->mnt_passno, 0)
-
-
-/*
- * Byte ordering
- */
-#ifndef BYTE_ORDER
-#include <sys/machine.h>
-#endif /* BYTE_ORDER */
-
-#undef ARCH_ENDIAN
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define ARCH_ENDIAN "little"
-#else
-#if BYTE_ORDER == BIG_ENDIAN
-#define ARCH_ENDIAN "big"
-#else
-XXX - Probably no hope of running Amd on this machine!
-#endif /* BIG */
-#endif /* LITTLE */
-
-/*
- * Miscellaneous AIX 3 bits
- */
-#define NEED_MNTOPT_PARSER
-#define SHORT_MOUNT_NAME
-
-#define MNTMAXSTR 128
-
-#define MNTTYPE_UFS "jfs" /* Un*x file system */
-#define MNTTYPE_NFS "nfs" /* network file system */
-#define MNTTYPE_IGNORE "ignore" /* No type specified, ignore this entry */
-
-struct mntent {
- char *mnt_fsname; /* name of mounted file system */
- char *mnt_dir; /* file system path prefix */
- char *mnt_type; /* MNTTYPE_* */
- char *mnt_opts; /* MNTOPT* */
- int mnt_freq; /* dump frequency, in days */
- int mnt_passno; /* pass number on parallel fsck */
-};
-
-#define NFS_HDR "misc-aix3.h"
-#define UFS_HDR "misc-aix3.h"
-#undef NFS_FH_DREF
-#define NFS_FH_DREF(dst, src) { (dst) = *(src); }
-#undef NFS_SA_DREF
-#define NFS_SA_DREF(dst, src) { (dst).addr = *(src); }
-#define M_RDONLY MNT_READONLY
-
-/*
- * How to get a mount list
- */
-#undef READ_MTAB_FROM_FILE
-#define READ_MTAB_AIX3_STYLE
-
-/*
- * The data for the mount syscall needs the path in addition to the
- * host name since that is the only source of information about the
- * mounted filesystem.
-#define NFS_ARGS_NEEDS_PATH
- */
-
-#define NFS_LOMAP 34
-#define NFS_HIMAP 99
-#define NFS_ERROR_MAPPING \
-static nfs_errormap[] = { 0,75,77,99,99,99, \
- 99,99,99,99,99,78,99,99,99,79, \
- 99,99,70,99,35,36,37,38,39,40, \
- 41,42,43,44,45,46,47,48,49,50, \
- 51,52,53,54,55,56,57,58,60,61, \
- 64,65,99,67,68,62,63,66,69,68, \
- 99,99,99,71,99,99,99,99,99,99 \
- };
-
-#define MOUNT_HELPER_SOURCE "mount_aix.c"
-
-/*
- * Need this too
- */
-#include <time.h>
diff --git a/usr.sbin/amd/config/os-aux.h b/usr.sbin/amd/config/os-aux.h
deleted file mode 100644
index 2dde332ba48..00000000000
--- a/usr.sbin/amd/config/os-aux.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-aux.h 8.1 (Berkeley) 6/6/93
- * $Id: os-aux.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * A/UX macII definitions for Amd (automounter)
- * Contributed by Julian Onions <jpo@cs.nott.ac.uk>
- */
-
-/*
- * Does the compiler grok void *
- */
-#define VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#define ARCH_ENDIAN "big"
-
-/*
- * No support for ndbm
- */
-#undef OS_HAS_NDBM
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_UFS MOUNT_UFS
-#define MOUNT_TYPE_NFS MOUNT_NFS
-
-#undef MTAB_TYPE_UFS
-#define MTAB_TYPE_UFS "5.2"
-
-#define SIGCHLD SIGCLD
-#define SYS5_SIGNALS
-
-/*
- * Use <fcntl.h> rather than <sys/file.h>
- */
-#define USE_FCNTL
-
-/*
- * Use fcntl() rather than flock()
- */
-#define LOCK_FCNTL
-
-#ifdef __GNUC__
-#define alloca(sz) __builtin_alloca(sz)
-#endif
-
-#define bzero(ptr, len) memset(ptr, 0, len)
-#define bcopy(from, to, len) memcpy(to, from, len)
-#define getpagesize() (2048)
-#undef MOUNT_TRAP
-#define MOUNT_TRAP(type, mnt, flags, mnt_data) \
- fsmount(type, mnt->mnt_dir, flags, mnt_data)
-#undef UNMOUNT_TRAP
-#define UNMOUNT_TRAP(mnt) unmount(mnt->mnt_dir)
-#define NFDS 30 /* conservative */
-
-/* not included in sys/param.h */
-#include <sys/types.h>
-/* not part of sys/time.h */
-#include <time.h>
-/* for NMOUNT */
-#include <sys/config.h>
diff --git a/usr.sbin/amd/config/os-bsd44.h b/usr.sbin/amd/config/os-bsd44.h
index ca5901bf77c..252b709d767 100644
--- a/usr.sbin/amd/config/os-bsd44.h
+++ b/usr.sbin/amd/config/os-bsd44.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: os-bsd44.h,v 1.9 2010/07/05 21:54:11 tedu Exp $ */
+/* $OpenBSD: os-bsd44.h,v 1.10 2014/10/20 00:20:04 guenther Exp $ */
/*
* Copyright (c) 1990 Jan-Simon Pendry
@@ -59,18 +59,6 @@
#define OS_HAS_NDBM
/*
- * 4.4 doesn't provide NIS, but NetBSD does.
- */
-#if !(defined(__NetBSD__) || defined(__OpenBSD__))
-#undef HAS_NIS_MAPS
-#endif
-
-/*
- * OS provides strerror()
- */
-#define HAS_STRERROR
-
-/*
* The mount table is obtained from the kernel
*/
#undef UPDATE_MTAB
@@ -88,17 +76,6 @@
#undef MTAB_TYPE_UFS
#define MTAB_TYPE_UFS "ufs"
#define MTAB_TYPE_MFS "mfs"
-#if defined(__NetBSD__) || defined(__OpenBSD__)
-#undef MTYPE_TYPE
-#define MTYPE_TYPE char *
-#endif
-
-/*
- * How to unmount filesystems
- */
-#undef UNMOUNT_TRAP
-#undef NEED_UMOUNT_FS
-#define NEED_UMOUNT_BSD
/*
* How to copy an address into an NFS filehandle
@@ -112,24 +89,6 @@
}
/*
- * Byte ordering
- */
-#ifndef BYTE_ORDER
-#include <sys/types.h>
-#endif /* BYTE_ORDER */
-
-#undef ARCH_ENDIAN
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define ARCH_ENDIAN "little"
-#else
-#if BYTE_ORDER == BIG_ENDIAN
-#define ARCH_ENDIAN "big"
-#else
-XXX - Probably no hope of running Amd on this machine!
-#endif /* BIG */
-#endif /* LITTLE */
-
-/*
* Miscellaneous 4.4 BSD bits
*/
#define NEED_MNTOPT_PARSER
@@ -169,15 +128,7 @@ struct mntent {
* Type of a file handle
*/
#undef NFS_FH_TYPE
-#if defined(__NetBSD__) || defined(__OpenBSD__)
#define NFS_FH_TYPE void *
-#endif
-
-/*
- * How to get a mount list
- */
-#undef READ_MTAB_FROM_FILE
-#define READ_MTAB_BSD_STYLE
/*
* The data for the mount syscall needs the path in addition to the
@@ -187,12 +138,6 @@ struct mntent {
#define NFS_ARGS_NEEDS_PATH
/*
- * 4.4 has RE support built in
- */
-#undef RE_HDR
-#define RE_HDR <regex.h>
-
-/*
* Need precise length links
*/
#define PRECISE_SYMLINKS
diff --git a/usr.sbin/amd/config/os-concentrix.h b/usr.sbin/amd/config/os-concentrix.h
deleted file mode 100644
index da926537f2f..00000000000
--- a/usr.sbin/amd/config/os-concentrix.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-concentrix.h 8.1 (Berkeley) 6/6/93
- * $Id: os-concentrix.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * Alliant Concentrix 5.0.0 definitions for Amd (automounter)
- */
-
-/*
- * Does the compiler grok void *
- */
-#undef VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Does this OS have NDBM support?
- */
-#define OS_HAS_NDBM
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#define ARCH_ENDIAN "big"
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_NFS MOUNT_NFS
-#define MOUNT_TYPE_UFS MOUNT_UFS
diff --git a/usr.sbin/amd/config/os-convex.h b/usr.sbin/amd/config/os-convex.h
deleted file mode 100644
index 2c2cf8d07a6..00000000000
--- a/usr.sbin/amd/config/os-convex.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-convex.h 8.1 (Berkeley) 6/6/93
- * $Id: os-convex.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * Convex C220, version 7.1 definitions for Amd (automounter)
- * from Eitan Mizrotsky <eitan@shum.huji.ac.il>
- */
-
-
-/*
- * Does the compiler grok void *
- */
-#undef VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#define ARCH_ENDIAN "big"
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_UFS MOUNT_UFS
-#define MOUNT_TYPE_NFS MOUNT_NFS
-
-
-#define strrchr rindex
-#define strchr index
diff --git a/usr.sbin/amd/config/os-defaults.h b/usr.sbin/amd/config/os-defaults.h
index 6ab322c602e..693f7e114a8 100644
--- a/usr.sbin/amd/config/os-defaults.h
+++ b/usr.sbin/amd/config/os-defaults.h
@@ -1,3 +1,4 @@
+
/*
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
@@ -32,10 +33,7 @@
* SUCH DAMAGE.
*
* from: @(#)os-defaults.h 8.1 (Berkeley) 6/6/93
- * $Id: os-defaults.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * Common OS definitions. These may be overridden in
- * the OS specific files ("os-foo.h").
+ * $Id: os-defaults.h,v 1.3 2014/10/20 00:20:04 guenther Exp $
*/
/*
@@ -46,36 +44,16 @@
#define AMD_COMPAT 5000000 /* 5.0 */
/*
- * What type is free(void*) returning?
- */
-#define FREE_RETURN_TYPE void
-
-/*
* Is the mount table mirrored in software
*/
#define UPDATE_MTAB
/*
- * Where to get union wait
- */
-#define WAIT <sys/wait.h>
-
-/*
* Where to get mount entry info
*/
#define MNTENT_HDR <mntent.h>
/*
- * Include support for syslog()
- */
-#define HAS_SYSLOG
-
-/*
- * Byte ordering
- */
-#define ARCH_ENDIAN "unknown"
-
-/*
* Name of filesystem types
*/
#define MTAB_TYPE_NFS "nfs"
@@ -83,22 +61,13 @@
/*
* Name of mount & unmount system calls
- *
- * NOTE:
- * UNMOUNT_TRAP takes a struct mntent *
*/
#define MOUNT_TRAP(type, mnt, flags, mnt_data) \
mount(type, mnt->mnt_dir, flags, mnt_data)
-#define UNMOUNT_TRAP(mnt) unmount(mnt->mnt_dir)
/*
* How to unmount filesystems.
- * NEED_UMOUNT_FS includes code to scan the mount table
- * to find the correct information for the unmount system
- * call. Some systems, such as 4.4bsd, do not require
- * this - they can just do an unmount system call directly.
*/
-#define NEED_UMOUNT_FS
#define UMOUNT_FS(dir) umount_fs(dir)
/*
@@ -115,12 +84,7 @@
/*
* Type of filesystem type
*/
-#define MTYPE_TYPE int
-
-/*
- * How to get a mount list
- */
-#define READ_MTAB_FROM_FILE
+#define MTYPE_TYPE char *
/*
* Make Amd automount points appear
@@ -129,10 +93,3 @@
* problem in df et al.
*/
#define HAS_EMPTY_AUTOMOUNTS
-
-/*
- * For the RE matcher
- */
-#define CHARBITS 0377
-#define STRCSPN
-#define RE_HDR "re.h"
diff --git a/usr.sbin/amd/config/os-dgux.h b/usr.sbin/amd/config/os-dgux.h
deleted file mode 100644
index 852d8799045..00000000000
--- a/usr.sbin/amd/config/os-dgux.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-dgux.h 8.1 (Berkeley) 6/6/93
- * $Id: os-dgux.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * dg/ux definitions for Amd (automounter)
- */
-
-/*
- * Does the compiler grok void *
- */
-#define VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_4
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_4
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_NFS "nfs"
-#define MOUNT_TYPE_UFS "dg/ux"
-#undef MTAB_TYPE_UFS
-#define MTAB_TYPE_UFS "dg/ux"
-
-/*
- * Need the following in more places than just NFS_HDR
- */
-#include <sys/dg_mount.h>
-/*
- * This is braindead
- * dg/ux has nfs 4.0 but doesn't have the following options
- */
-#define NFSMNT_HOSTNAME 0x0
-#define NFSMNT_INT 0x0
-#define M_NEWTYPE 0
-
-/*
- * DG have their own filesystem.
- */
-#define ufs_args dgux_args
-
-/*
- * Byte ordering
- */
-
-#undef ARCH_ENDIAN
-#define ARCH_ENDIAN "big"
-
-#define _BSD_WAIT_FLAVOR
-#define _BSD_TTY_FLAVOR
-#define _BSD_SIGNAL_FLAVOR
-#define _DGUX_SOURCE
-
-/*
- * Use fcntl() rather than flock()
- */
-#define LOCK_FCNTL
-
-#define bzero(ptr, len) memset(ptr, 0, len)
-#define bcopy(from, to, len) memcpy(to, from, len)
-#undef MOUNT_TRAP
-#define MOUNT_TRAP(type, mnt, flags, mnt_data) \
- ((struct nfs_args *)mnt_data)->version = !strcmp(type, MOUNT_TYPE_UFS)?\
- DG_MOUNT_DGUX_VERSION:DG_MOUNT_NFS_VERSION, \
- dg_mount(type, mnt->mnt_dir, flags, mnt_data)
-#undef UNMOUNT_TRAP
-#define UNMOUNT_TRAP(mnt) umount(mnt->mnt_dir)
diff --git a/usr.sbin/amd/config/os-fpx4.h b/usr.sbin/amd/config/os-fpx4.h
deleted file mode 100644
index d2e6dfe14b1..00000000000
--- a/usr.sbin/amd/config/os-fpx4.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-fpx4.h 8.1 (Berkeley) 6/6/93
- * $Id: os-fpx4.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * Celerity FPX 4.1/2 definitions for Amd (automounter)
- * from Stephen Pope <scp@grizzly.acl.lanl.gov>
- */
-
-/*
- * FPX wants to include sys headers multiple times
- */
-#define INCLUDE_HEADERS
-
-/*
- * FPX sys/mount.h includes sys/nfs.h; prevent this
- */
-#define INCLUDED_nfs
-
-/*
- * FPX doesn't define NMOUNT anywhere
- */
-#define NMOUNT 40
-
-/*
- * Does the compiler grok void *
- */
-/* #define VOIDP */
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_4
-#define svc_fdset svc_fds
-#define svc_getreqset(p) svc_getreq((*p).fds_bits[0])
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#define ARCH_ENDIAN "big"
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_NFS MOUNT_NFS
-#define MOUNT_TYPE_UFS MOUNT_UFS
diff --git a/usr.sbin/amd/config/os-hcx.h b/usr.sbin/amd/config/os-hcx.h
deleted file mode 100644
index 3576e8464b9..00000000000
--- a/usr.sbin/amd/config/os-hcx.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-hcx.h 8.1 (Berkeley) 6/6/93
- * $Id: os-hcx.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * Harris HCX/UX Release 3.0 definitions for Amd (automounter)
- */
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Deviant call necessary. The mount() routine in libc only works for UFS
- * (it's a backward-compatible piece of C code which traps to mountsyscall).
- */
-#undef MOUNT_TRAP
-#define MOUNT_TRAP(type, mnt, flags, mnt_data) \
- mountsyscall(type, mnt->mnt_dir, flags, mnt_data)
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_NFS MOUNT_NFS
-#define MOUNT_TYPE_UFS MOUNT_UFS
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#ifdef _hcx
-#define ARCH_ENDIAN "big"
-#else
-XXX - bizarre!
-#endif
diff --git a/usr.sbin/amd/config/os-hlh42.h b/usr.sbin/amd/config/os-hlh42.h
deleted file mode 100644
index 9b823ad7cbc..00000000000
--- a/usr.sbin/amd/config/os-hlh42.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-hlh42.h 8.1 (Berkeley) 6/6/93
- * $Id: os-hlh42.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * HLH OTS definitions for Amd (automounter)
- */
-
-/*
- * Does the compiler grok void *
- */
-#undef VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#if defined(hlh)
-#define ARCH_ENDIAN "little"
-#endif
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_NFS MOUNT_NFS
-#define MOUNT_TYPE_UFS MOUNT_UFS
-
-/*
- * Miscellaneous HLH 4.2 incantations
- */
-#define strchr index
-#define strrchr rindex
-#define sigmask(x) (1 << ((x)-1))
-
-/*
- * HLH's 4.2 needs the extra RPC definitions.
- */
-#define NEED_XDR_POINTER
-#define NEED_CLNT_SPERRNO
diff --git a/usr.sbin/amd/config/os-hpux.h b/usr.sbin/amd/config/os-hpux.h
deleted file mode 100644
index 6781986cc2c..00000000000
--- a/usr.sbin/amd/config/os-hpux.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-hpux.h 8.1 (Berkeley) 6/6/93
- * $Id: os-hpux.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * HP/9000 HP-UX definitions for Amd (automounter)
- */
-
-/*
- * Does the compiler grok void *
- */
-#ifdef __GNUC__
-#define VOIDP
-#endif
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#if defined(hp9000s200) || defined(hp9000s300) || defined(hp9000s800)
-#define ARCH_ENDIAN "big"
-#endif
-
-#ifndef __hpux
-#define HPUX_VERSION_6
-#endif
-
-/*
- * No support for syslog() prior to 7.0
- */
-#ifdef HPUX_VERSION_6
-#undef HAS_SYSLOG
-#endif
-
-/*
- * No support for ndbm
- */
-#undef OS_HAS_NDBM
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_UFS MOUNT_UFS
-#define MOUNT_TYPE_NFS MOUNT_NFS
-#undef MTAB_TYPE_UFS
-#define MTAB_TYPE_UFS "hfs"
-
-/*
- * Where to get NFS definitions
- */
-#define NFS_HDR "misc-hpux.h"
-
-/*
- * Where to get union wait
- */
-#undef WAIT
-#define WAIT "uwait.h"
-#ifdef HPUX_VERSION_6
-#define SIGCHLD SIGCLD
-#endif
-#define SYS5_SIGNALS
-
-/*
- * Miscellaneous HP-UX definitions
- */
-
-#define NEED_XDR_POINTER
-#define NEED_CLNT_SPERRNO
-
-/*
- * Use <fcntl.h> rather than <sys/file.h>
- */
-#define USE_FCNTL
-
-/*
- * Use fcntl() rather than flock()
- */
-#define LOCK_FCNTL
-
-/*
- * Additional fields in struct mntent
- * are fixed up here
- */
-#define FIXUP_MNTENT(mntp) { \
- (mntp)->mnt_time = clocktime(); \
-}
-#define FIXUP_MNTENT_DUP(mntp, mp) { \
- (mntp)->mnt_time = (mp)->mnt_time; \
-}
-
-#define bzero(ptr, len) memset(ptr, 0, len)
-#define bcopy(from, to, len) memcpy(to, from, len)
-#define getpagesize() (2048)
-#undef MOUNT_TRAP
-#define MOUNT_TRAP(type, mnt, flags, mnt_data) \
- vfsmount(type, mnt->mnt_dir, flags, mnt_data)
-#undef UNMOUNT_TRAP
-#define UNMOUNT_TRAP(mnt) umount(mnt->mnt_dir)
-#define NFDS 30 /* conservative */
-#define MOUNTED MNT_MNTTAB
diff --git a/usr.sbin/amd/config/os-irix.h b/usr.sbin/amd/config/os-irix.h
deleted file mode 100644
index bcdfce65d37..00000000000
--- a/usr.sbin/amd/config/os-irix.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-irix.h 8.1 (Berkeley) 6/6/93
- * $Id: os-irix.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * IRIX 3.3 definitions for Amd (automounter)
- * Contributed by Scott R. Presnell <srp@cgl.ucsf.edu>
- */
-
-/*
- * Does the compiler grok void *
- */
-#define VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#define ARCH_ENDIAN "big"
-
-/*
- * Has support for syslog()
- */
-#define HAS_SYSLOG
-
-#define M_GRPID MS_GRPID
-#define M_RDONLY MS_RDONLY
-/*
- * Support for ndbm
- */
-#define OS_HAS_NDBM
-
-#define UPDATE_MTAB
-
-#undef MTAB_TYPE_NFS
-#define MTAB_TYPE_NFS "nfs"
-
-#undef MTAB_TYPE_UFS
-#define MTAB_TYPE_UFS "efs"
-
-#define NMOUNT 40 /* The std sun value */
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_UFS sysfs(GETFSIND, FSID_EFS)
-#define MOUNT_TYPE_NFS sysfs(GETFSIND, FSID_NFS)
-
-#define SYS5_SIGNALS
-
-/*
- * Use <fcntl.h> rather than <sys/file.h>
- */
-/*#define USE_FCNTL*/
-
-/*
- * Use fcntl() rather than flock()
- */
-/*#define LOCK_FCNTL*/
-
-#ifdef __GNUC__
-#define alloca(sz) __builtin_alloca(sz)
-#endif
-
-#define bzero(ptr, len) memset(ptr, 0, len)
-#define bcopy(from, to, len) memcpy(to, from, len)
-
-#undef MOUNT_TRAP
-#define MOUNT_TRAP(type, mnt, flags, mnt_data) \
- irix_mount(mnt->mnt_fsname, mnt->mnt_dir,flags, type, mnt_data)
-#undef UNMOUNT_TRAP
-#define UNMOUNT_TRAP(mnt) umount(mnt->mnt_dir)
-#define NFDS 30 /* conservative */
-
-#define NFS_HDR "misc-irix.h"
-#define UFS_HDR "misc-irix.h"
-
-/* not included in sys/param.h */
-#include <sys/types.h>
-
-#define MOUNT_HELPER_SOURCE "mount_irix.c"
-
-#define MNTINFO_DEV "fsid"
-#define MNTINFO_PREF "0x"
diff --git a/usr.sbin/amd/config/os-irix3.h b/usr.sbin/amd/config/os-irix3.h
deleted file mode 100644
index e09fef8b621..00000000000
--- a/usr.sbin/amd/config/os-irix3.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-irix3.h 8.1 (Berkeley) 6/6/93
- * $Id: os-irix3.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * IRIX 3.3 definitions for Amd (automounter)
- * Contributed by Scott R. Presnell <srp@cgl.ucsf.edu>
- */
-
-/*
- * Does the compiler grok void *
- */
-#define VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#define ARCH_ENDIAN "big"
-
-/*
- * Has support for syslog()
- */
-#define HAS_SYSLOG
-
-#define M_GRPID MS_GRPID
-#define M_RDONLY MS_RDONLY
-/*
- * Support for ndbm
- */
-#define OS_HAS_NDBM
-
-#define UPDATE_MTAB
-
-#undef MTAB_TYPE_NFS
-#define MTAB_TYPE_NFS "nfs"
-
-#undef MTAB_TYPE_UFS
-#define MTAB_TYPE_UFS "efs"
-
-#define NMOUNT 40 /* The std sun value */
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_UFS sysfs(GETFSIND, FSID_EFS)
-#define MOUNT_TYPE_NFS sysfs(GETFSIND, FSID_NFS)
-
-#define SYS5_SIGNALS
-
-/*
- * Use <fcntl.h> rather than <sys/file.h>
- */
-/*#define USE_FCNTL*/
-
-/*
- * Use fcntl() rather than flock()
- */
-/*#define LOCK_FCNTL*/
-
-#ifdef __GNUC__
-#define alloca(sz) __builtin_alloca(sz)
-#endif
-
-#define bzero(ptr, len) memset(ptr, 0, len)
-#define bcopy(from, to, len) memcpy(to, from, len)
-
-#undef MOUNT_TRAP
-#define MOUNT_TRAP(type, mnt, flags, mnt_data) \
- irix_mount(mnt->mnt_fsname, mnt->mnt_dir,flags, type, mnt_data)
-#undef UNMOUNT_TRAP
-#define UNMOUNT_TRAP(mnt) umount(mnt->mnt_dir)
-#define NFDS 30 /* conservative */
-
-#define NFS_HDR "misc-irix.h"
-#define UFS_HDR "misc-irix.h"
-
-/* not included in sys/param.h */
-#include <sys/types.h>
-
-#define MOUNT_HELPER_SOURCE "mount_irix.c"
-
-#define MNTINFO_DEV "fsid"
-#define MNTINFO_PREF "0x"
diff --git a/usr.sbin/amd/config/os-irix4.h b/usr.sbin/amd/config/os-irix4.h
deleted file mode 100644
index 4bf49382858..00000000000
--- a/usr.sbin/amd/config/os-irix4.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-irix4.h 8.1 (Berkeley) 6/6/93
- * $Id: os-irix4.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * IRIX 4.0.X definitions for Amd (automounter)
- * Contributed by Scott R. Presnell <srp@cgl.ucsf.edu>
- */
-
-/*
- * Does the compiler grok void *
- */
-#define VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#define ARCH_ENDIAN "big"
-
-/*
- * Has support for syslog()
- */
-#define HAS_SYSLOG
-
-#define M_RDONLY MS_RDONLY
-#define M_GRPID MS_GRPID
-#define M_NOSUID MS_NOSUID
-#define M_NONDEV MS_NODEV
-
-/*
- * Support for ndbm
- */
-#define OS_HAS_NDBM
-
-#define UPDATE_MTAB
-
-#undef MTAB_TYPE_NFS
-#define MTAB_TYPE_NFS "nfs"
-
-#undef MTAB_TYPE_UFS
-#define MTAB_TYPE_UFS "efs"
-
-#define NMOUNT 40 /* The std sun value */
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_UFS sysfs(GETFSIND, FSID_EFS)
-#define MOUNT_TYPE_NFS sysfs(GETFSIND, FSID_NFS)
-
-#define SYS5_SIGNALS
-
-/*
- * Use <fcntl.h> rather than <sys/file.h>
- */
-/*#define USE_FCNTL*/
-
-/*
- * Use fcntl() rather than flock()
- */
-/*#define LOCK_FCNTL*/
-
-#ifdef __GNUC__
-#define alloca(sz) __builtin_alloca(sz)
-#endif
-
-#define bzero(ptr, len) memset(ptr, 0, len)
-#define bcopy(from, to, len) memcpy(to, from, len)
-
-#undef MOUNT_TRAP
-#define MOUNT_TRAP(type, mnt, flags, mnt_data) \
- irix_mount(mnt->mnt_fsname, mnt->mnt_dir,flags, type, mnt_data)
-#undef UNMOUNT_TRAP
-#define UNMOUNT_TRAP(mnt) umount(mnt->mnt_dir)
-#define NFDS 30 /* conservative */
-
-#define NFS_HDR "misc-irix.h"
-#define UFS_HDR "misc-irix.h"
-
-/* not included in sys/param.h */
-#include <sys/types.h>
-
-#define MOUNT_HELPER_SOURCE "mount_irix.c"
-
-/*
- * Under 4.0.X this information is in /usr/include/mntent.h
- * Below is what is used to be for Irix 3.3.X.
- */
-/*#define MNTINFO_DEV "fsid"*/
-/*#define MNTINFO_PREF "0x"*/
-
-#define MNTINFO_PREF ""
-
-/*
- * Under Irix, mount type "auto" is probed by statfs() in df. A statfs() of
- * a direct mount causes that mount to fire. So change the mount type in
- * /etc/mtab to "ignore" to stop that (this is what SGI does for their
- * automounter. Use the old FASCIST define for this.
- */
-#define FASCIST_DF_COMMAND MNTTYPE_IGNORE
diff --git a/usr.sbin/amd/config/os-next.h b/usr.sbin/amd/config/os-next.h
deleted file mode 100644
index 44dda96d295..00000000000
--- a/usr.sbin/amd/config/os-next.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-next.h 8.1 (Berkeley) 6/6/93
- * $Id: os-next.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * NeXT OS definitions for Amd (automounter)
- * By Bill Trost, Reed College
- * trost%reed@cse.ogi.edu,
- *
- * Derived from the Sun 3.2 definitions for Amd (os-sos3.h).
- */
-
-/*
- * Does the compiler grok void * (NeXT uses gcc)
- */
-#define VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_UFS MOUNT_UFS
-#define MOUNT_TYPE_NFS MOUNT_NFS
-#undef MTAB_TYPE_UFS
-#define MTAB_TYPE_UFS "4.3"
-
-/*
- * Where to get NFS definitions
- */
-#define NFS_HDR "misc-next.h"
diff --git a/usr.sbin/amd/config/os-pyrOSx.h b/usr.sbin/amd/config/os-pyrOSx.h
deleted file mode 100644
index aa2ed6d77be..00000000000
--- a/usr.sbin/amd/config/os-pyrOSx.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-pyrOSx.h 8.1 (Berkeley) 6/6/93
- * $Id: os-pyrOSx.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * Pyramid OSx definitions for Amd (automounter)
- * from Stefan Petri <petri@tubsibr.UUCP>
- */
-
-/*
- * Does the compiler grok void *
- */
-#define VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#define ARCH_ENDIAN "big"
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_UFS MOUNT_UFS
-#define MOUNT_TYPE_NFS MOUNT_NFS
-
-#define strchr index
-#define strrchr rindex
-
-#define hostname mnthostname
diff --git a/usr.sbin/amd/config/os-riscix.h b/usr.sbin/amd/config/os-riscix.h
deleted file mode 100644
index 4bed0ed14cc..00000000000
--- a/usr.sbin/amd/config/os-riscix.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-riscix.h 8.1 (Berkeley) 6/6/93
- * $Id: os-riscix.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * Acorn Archimedes RISC iX definitions for Amd (automounter)
- * Contributed by Piete Brooks.
- */
-
-/*
- * Does the compiler grok void *
- */
-#define VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Does this OS have NDBM support?
- */
-#define OS_HAS_NDBM
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#define ARCH_ENDIAN "little"
-
-/*
- * Is the mount table mirrored in software
- */
-#define UPDATE_MTAB
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_NFS MOUNT_NFS
-#define MOUNT_TYPE_UFS MOUNT_UFS
-
-#undef MTAB_TYPE_UFS
-#define MTAB_TYPE_UFS MNTTYPE_43
diff --git a/usr.sbin/amd/config/os-sos3.h b/usr.sbin/amd/config/os-sos3.h
deleted file mode 100644
index 732f8baadd5..00000000000
--- a/usr.sbin/amd/config/os-sos3.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-sos3.h 8.1 (Berkeley) 6/6/93
- * $Id: os-sos3.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * SunOS 3.2 definitions for Amd (automounter)
- */
-
-/*
- * Does the compiler grok void *
- */
-#define VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#if defined(mc68010) || defined(mc68020) || defined(sparc)
-#define ARCH_ENDIAN "big"
-#endif
-#if defined(i386)
-#define ARCH_ENDIAN "little"
-#endif
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_UFS MOUNT_UFS
-#define MOUNT_TYPE_NFS MOUNT_NFS
diff --git a/usr.sbin/amd/config/os-sos4.h b/usr.sbin/amd/config/os-sos4.h
deleted file mode 100644
index b25af2ad16d..00000000000
--- a/usr.sbin/amd/config/os-sos4.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-sos4.h 8.1 (Berkeley) 6/6/93
- * $Id: os-sos4.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * SunOS 4.0 definitions for Amd (automounter)
- */
-
-/*
- * Does the compiler grok void *
- */
-#define VOIDP
-
-/*
- * What type is free(void*) returning?
- */
-#undef FREE_RETURN_TYPE
-#define FREE_RETURN_TYPE int
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_4
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_4
-
-/*
- * Does this OS have NDBM support?
- */
-#define OS_HAS_NDBM
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#if defined(mc68010) || defined(mc68020) || defined(sparc)
-#define ARCH_ENDIAN "big"
-#endif
-#if defined(i386)
-#define ARCH_ENDIAN "little"
-#endif
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_NFS "nfs"
-#define MOUNT_TYPE_UFS "4.2"
-
-/*
- * Type of a file handle
- */
-#undef NFS_FH_TYPE
-#define NFS_FH_TYPE caddr_t
-
-/*
- * Type of filesystem type
- */
-#undef MTYPE_TYPE
-#define MTYPE_TYPE char *
-
-/*
- * Add support for SunOS 4 automounter files
- */
-#define SUNOS4_COMPAT
-
-/*
- * System Vr4 / SunOS 4.1 compatibility
- * - put dev= in the options list
- *
- * From: Brent Callaghan <brent@eng.sun.com>
- */
-#define MNTINFO_DEV "dev"
-#define MNTINFO_PREF ""
diff --git a/usr.sbin/amd/config/os-stellix.h b/usr.sbin/amd/config/os-stellix.h
deleted file mode 100644
index 4ce83197e86..00000000000
--- a/usr.sbin/amd/config/os-stellix.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-stellix.h 8.1 (Berkeley) 6/6/93
- * $Id: os-stellix.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * Amd (automounter) definitions for Stellix.
- * From Stephen C. Pope <scp@acl.lanl.gov>
- */
-
-#define RPC_3
-
-#define NFS_3
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#define ARCH_ENDIAN "big"
-
-#define HAS_SYSLOG
-
-#define OS_HAS_NDBM
-
-#define UPDATE_MTAB
-
-#define USE_FCNTL
-
-#define LOCK_FCNTL
-
-/*
- * Name of filesystem types
- */
-#undef MTAB_TYPE_UFS
-#define MTAB_TYPE_UFS "sfs"
-
-#define MOUNT_TYPE_UFS sysfs(GETFSIND, "SFS1")
-#define MOUNT_TYPE_NFS sysfs(GETFSIND, "NFS")
-
-#define SYS5_SIGNALS
-#define HAS_SVR3_SIGNALS
-
-#define MOUNT_HELPER_SOURCE "mount_stellix.c"
-
-/*
- * Name of mount & unmount system calls
- *
- * NOTE:
- * UNMOUNT_TRAP takes a struct mntent *
- */
-#undef MOUNT_TRAP
-#define MOUNT_TRAP(type, mnt, flags, mnt_data) \
- stellix_mount(mnt->mnt_fsname, mnt->mnt_dir, flags, type, mnt_data)
-#undef UNMOUNT_TRAP
-#define UNMOUNT_TRAP(mnt) umount(mnt->mnt_dir)
-
-/*
- * How to unmount filesystems.
- * NEED_UMOUNT_FS includes code to scan the mount table
- * to find the correct information for the unmount system
- * call. Some systems, such as 4.4bsd, do not require
- * this - they can just do an unmount system call directly.
- */
-/* #define NEED_UMOUNT_FS */
-/* #define UMOUNT_FS(dir) umount_fs(dir) */
-
-#define NFS_HDR "misc-stellix.h"
-#define UFS_HDR "misc-stellix.h"
-
-#define M_RDONLY 0x01 /* mount fs read only */
-
-#define bzero(ptr, len) memset(ptr, 0, len)
-#define bcopy(from, to, len) memcpy(to, from, len)
diff --git a/usr.sbin/amd/config/os-type b/usr.sbin/amd/config/os-type
deleted file mode 100644
index 111f23261d5..00000000000
--- a/usr.sbin/amd/config/os-type
+++ /dev/null
@@ -1,123 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 1989 Jan-Simon Pendry
-# Copyright (c) 1989 Imperial College of Science, Technology & Medicine
-# Copyright (c) 1989, 1993
-# The Regents of the University of California. All rights reserved.
-#
-# This code is derived from software contributed to Berkeley by
-# Jan-Simon Pendry at Imperial College, London.
-#
-# 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.
-#
-# from: @(#)os-type 8.1 (Berkeley) 6/6/93
-# $Id: os-type,v 1.2 2003/06/02 23:36:52 millert Exp $
-#
-
-#
-# Take a pot-shot at your os type
-#
-echo "# ... No OS= option specified; dynamically determining OS type" >&2
-
-#
-# First try poking around in /etc/motd
-#
-
-case "`exec 2>/dev/null; head -2 /etc/motd`" in
-*"Sun UNIX 4.2 Release 3."*) OS=sos3;;
-*"SunOS Release 4."*) OS=sos4;;
-*"HP-UX on the HP"*) OS=hpux;;
-*"Ultrix V2."*) OS=u2_2;;
-*"Ultrix V3."*) OS=u3_0;;
-*"Ultrix-32 V3."*) OS=u3_0;;
-*"Ultrix Worksystem V2."*) OS=u3_0;;
-*"ULTRIX V4.2"*) OS=u4_2;;
-*"ULTRIX V4."*) OS=u4_0;;
-*"HLH OTS Version 1."*) OS=hlh42;;
-*"RISC iX release 1."*) OS=riscix;;
-*"FPX 4."*) OS=fpx4;;
-*"HCX/UX"*) OS=hcx;;
-*"4.4 BSD UNIX"*) OS=bsd44;;
-*"4.3 BSD Reno UNIX"*) OS=bsd44;;
-*"4.3 BSD UNIX"*) if [ -f /etc/minidisk ]; then
- OS=acis43
- elif [ -f /sbin/nfsiod ]; then
- OS=bsd44 # prototype
- else
- OS=xinu43
- fi;;
-*"Alliant Concentrix"*) OS=concentrix;;
-*"Umax 4.3"*) OS=umax43;;
-*)
-#
-# Well, that didn't work so apply some heuristics
-# to the filesystem name space...
-#
- echo "# ... inspecting File system ..." >&2
- if [ -f /etc/comply ]; then
- OS=utek
- elif [ -d /usr/lib/methods -o -d /etc/methods ]; then
- OS=aix3
- elif [ -f /usr/bin/cat ]; then
- OS=sos4
- elif [ -f /etc/nd ]; then
- OS=sos3
- elif [ -f /etc/elcsd ]; then
- echo "# ... Ultrix - assuming U4.0 ..." >&2
- OS=u4_0
- elif [ -f /hp-ux ]; then
- OS=hpux
- elif [ -f /etc/ttylocal ]; then
- OS=xinu43
- elif [ -f /etc/minidisk ]; then
- OS=acis43
- elif [ -f /etc/toolboxdaemon ]; then
- OS=aux
- elif [ -f /sbin/nfsiod ]; then
- OS=bsd44
- elif [ -d /vrm ]; then
- OS=aix2
- elif [ -f /bin/pyr ] && /bin/pyr; then
- OS=pyrOSx
- elif [ -d /NextApps ]; then
- OS=next
- elif [ -f /etc/gl/ucode ]; then
- OS=irix3
- elif [ -f /usr/gfx/ucode ]; then
- OS=irix4
- elif [ -f /stellix ]; then
- OS=stellix
- else
- case "`(sh ../config/arch)2>/dev/null`" in
- ibm032) OS=acis43;;
- aviion) OS=dgux;;
- *) OS=unknown;;
- esac
- fi;;
-esac
-
-echo "# ... OS appears to be \"${OS}\"" >&2
-echo "${OS}"
-exit 0
diff --git a/usr.sbin/amd/config/os-u2_2.h b/usr.sbin/amd/config/os-u2_2.h
deleted file mode 100644
index 901355e4064..00000000000
--- a/usr.sbin/amd/config/os-u2_2.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 1990 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-u2_2.h 8.1 (Berkeley) 6/6/93
- * $Id: os-u2_2.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * Ultrix 2.2 definitions for Amd (automounter)
- */
-
-/*
- * Does the compiler grok void *
- */
-#undef VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#if defined(vax)
-#define ARCH_ENDIAN "little"
-#endif
-
-/*
- * The mount table is obtained from the kernel
- */
-#undef UPDATE_MTAB
-
-/*
- * No mntent info on Ultrix
- */
-#undef MNTENT_HDR
-
-/*
- * No support for syslog()
- */
-#undef HAS_SYSLOG
-
-/*
- * No support for ndbm
- */
-#undef HAS_NDBM_MAPS
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_NFS GT_NFS
-#define MOUNT_TYPE_UFS GT_ULTRIX
-#undef MTAB_TYPE_UFS
-#define MTAB_TYPE_UFS "ufs"
-
-/*
- * Name of mount & unmount system calls
- */
-#undef MOUNT_TRAP
-#define MOUNT_TRAP(type, mnt, flag, mnt_data) \
- mount(mnt->mnt_fsname, mnt->mnt_dir, flag, type, mnt_data)
-#undef UNMOUNT_TRAP
-#define UNMOUNT_TRAP(mnt) umount(mnt->mnt_passno)
-
-/*
- * Miscellaneous Ultrix bits
- */
-#define M_RDONLY M_RONLY
-
-#ifndef MNTMAXSTR
-#define MNTMAXSTR 128
-#endif
-
-#define MNTTYPE_UFS "ufs" /* Un*x file system */
-#define MNTTYPE_NFS "nfs" /* network file system */
-#define MNTTYPE_IGNORE "ignore" /* No type specified, ignore this entry */
-
-#define MNTOPT_RO "ro" /* read only */
-#define MNTOPT_RW "rw" /* read/write */
-#define MNTOPT_QUOTA "quota" /* quotas */
-#define MNTOPT_NOQUOTA "noquota" /* no quotas */
-#define MNTOPT_HARD "hard" /* hard mount */
-#define MNTOPT_SOFT "soft" /* soft mount */
-#define MNTOPT_INTR "intr" /* interrupts allowed */
-
-#define MNTOPT_NOSUID "nosuid" /* no set uid allowed */
-
-struct mntent {
- char *mnt_fsname; /* name of mounted file system */
- char *mnt_dir; /* file system path prefix */
- char *mnt_type; /* MNTTYPE_* */
- char *mnt_opts; /* MNTOPT* */
- int mnt_freq; /* dump frequency, in days */
- int mnt_passno; /* pass number on parallel fsck */
-};
-#define MOUNTED "/etc/mtab"
-
-#define NFS_HDR "misc-ultrix.h"
-#define UFS_HDR "misc-ultrix.h"
-
-#define NEED_XDR_POINTER
-#define NEED_CLNT_SPERRNO
-
-#define nfs_args nfs_gfs_mount
-#define ULTRIX_HACK /* Should be handled better than this !! */
-#define NEED_MNTOPT_PARSER
-
-/*
- * How to get a mount list
- */
-#undef READ_MTAB_FROM_FILE
-#define READ_MTAB_ULTRIX_STYLE
-
-/*
- * Need precise length links
- */
-#define PRECISE_SYMLINKS
diff --git a/usr.sbin/amd/config/os-u3_0.h b/usr.sbin/amd/config/os-u3_0.h
deleted file mode 100644
index 0a3393a1c32..00000000000
--- a/usr.sbin/amd/config/os-u3_0.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-u3_0.h 8.1 (Berkeley) 6/6/93
- * $Id: os-u3_0.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * Ultrix 3.0 definitions for Amd (automounter)
- */
-
-/*
- * Does the compiler grok void *
- */
-#undef VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#if defined(vax) || defined(mips)
-#define ARCH_ENDIAN "little"
-#endif
-
-/*
- * The mount table is obtained from the kernel
- */
-#undef UPDATE_MTAB
-
-/*
- * No mntent info on Ultrix
- */
-#undef MNTENT_HDR
-
-/*
- * No support for syslog()
- */
-#undef HAS_SYSLOG
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_NFS GT_NFS
-#define MOUNT_TYPE_UFS GT_ULTRIX
-#undef MTAB_TYPE_UFS
-#define MTAB_TYPE_UFS "ufs"
-
-/*
- * Name of mount & unmount system calls
- */
-#undef MOUNT_TRAP
-#define MOUNT_TRAP(type, mnt, flag, mnt_data) \
- mount(mnt->mnt_fsname, mnt->mnt_dir, flag, type, mnt_data)
-#undef UNMOUNT_TRAP
-#define UNMOUNT_TRAP(mnt) umount(mnt->mnt_passno)
-
-/*
- * Miscellaneous Ultrix bits
- */
-#define M_RDONLY M_RONLY
-
-#define MNTMAXSTR 128
-
-#define MNTTYPE_UFS "ufs" /* Un*x file system */
-#define MNTTYPE_NFS "nfs" /* network file system */
-#define MNTTYPE_IGNORE "ignore" /* No type specified, ignore this entry */
-
-#define MNTOPT_RO "ro" /* read only */
-#define MNTOPT_RW "rw" /* read/write */
-#define MNTOPT_QUOTA "quota" /* quotas */
-#define MNTOPT_NOQUOTA "noquota" /* no quotas */
-#define MNTOPT_HARD "hard" /* hard mount */
-#define MNTOPT_SOFT "soft" /* soft mount */
-#define MNTOPT_INTR "intr" /* interrupts allowed */
-
-#define MNTOPT_NOSUID "nosuid" /* no set uid allowed */
-
-struct mntent {
- char *mnt_fsname; /* name of mounted file system */
- char *mnt_dir; /* file system path prefix */
- char *mnt_type; /* MNTTYPE_* */
- char *mnt_opts; /* MNTOPT* */
- int mnt_freq; /* dump frequency, in days */
- int mnt_passno; /* pass number on parallel fsck */
-};
-#define MOUNTED "/etc/mtab"
-
-#define NFS_HDR "misc-ultrix.h"
-#define UFS_HDR "misc-ultrix.h"
-
-#define NEED_XDR_POINTER
-#define NEED_CLNT_SPERRNO
-
-#define nfs_args nfs_gfs_mount
-#define ULTRIX_HACK /* Should be handled better than this !! */
-#define NEED_MNTOPT_PARSER
-
-/*
- * How to get a mount list
- */
-#undef READ_MTAB_FROM_FILE
-#define READ_MTAB_ULTRIX_STYLE
-
-/*
- * Need precise length links
- */
-#define PRECISE_SYMLINKS
diff --git a/usr.sbin/amd/config/os-u4_0.h b/usr.sbin/amd/config/os-u4_0.h
deleted file mode 100644
index 5b064086e16..00000000000
--- a/usr.sbin/amd/config/os-u4_0.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-u4_0.h 8.1 (Berkeley) 6/6/93
- * $Id: os-u4_0.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * Ultrix 4.0 definitions for Amd (automounter)
- * from Chris Lindblad <cjl@ai.mit.edu>
- */
-
-/*
- * Does the compiler grok void *
- */
-#ifdef __STDC__
-#define VOIDP
-#else
-#undef VOIDP
-#endif
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#if defined(vax) || defined(mips)
-#define ARCH_ENDIAN "little"
-#endif
-
-/*
- * The mount table is obtained from the kernel
- */
-#undef UPDATE_MTAB
-
-/*
- * No mntent info on Ultrix
- */
-#undef MNTENT_HDR
-
-/*
- * No support for syslog()
- */
-#define HAS_SYSLOG
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_NFS GT_NFS
-#define MOUNT_TYPE_UFS GT_ULTRIX
-#undef MTAB_TYPE_UFS
-#define MTAB_TYPE_UFS "ufs"
-
-/*
- * Name of mount & unmount system calls
- */
-#undef MOUNT_TRAP
-#define MOUNT_TRAP(type, mnt, flag, mnt_data) \
- mount(mnt->mnt_fsname, mnt->mnt_dir, flag, type, mnt_data)
-#undef UNMOUNT_TRAP
-#define UNMOUNT_TRAP(mnt) umount(mnt->mnt_passno)
-
-/*
- * Miscellaneous Ultrix bits
- */
-#define M_RDONLY M_RONLY
-
-#define MNTMAXSTR 128
-
-#define MNTTYPE_UFS "ufs" /* Un*x file system */
-#define MNTTYPE_NFS "nfs" /* network file system */
-#define MNTTYPE_IGNORE "ignore" /* No type specified, ignore this entry */
-
-#define MNTOPT_RO "ro" /* read only */
-#define MNTOPT_RW "rw" /* read/write */
-#define MNTOPT_QUOTA "quota" /* quotas */
-#define MNTOPT_NOQUOTA "noquota" /* no quotas */
-#define MNTOPT_HARD "hard" /* hard mount */
-#define MNTOPT_SOFT "soft" /* soft mount */
-#define MNTOPT_INTR "intr" /* interrupts allowed */
-
-#define MNTOPT_NOSUID "nosuid" /* no set uid allowed */
-
-struct mntent {
- char *mnt_fsname; /* name of mounted file system */
- char *mnt_dir; /* file system path prefix */
- char *mnt_type; /* MNTTYPE_* */
- char *mnt_opts; /* MNTOPT* */
- int mnt_freq; /* dump frequency, in days */
- int mnt_passno; /* pass number on parallel fsck */
-};
-#define MOUNTED "/etc/mtab"
-
-#define NFS_HDR "misc-ultrix.h"
-#define UFS_HDR "misc-ultrix.h"
-
-#define NEED_CLNT_SPERRNO
-
-#define nfs_args nfs_gfs_mount
-#define ULTRIX_HACK /* Should be handled better than this !! */
-#define NEED_MNTOPT_PARSER
-
-/*
- * How to get a mount list
- */
-#undef READ_MTAB_FROM_FILE
-#define READ_MTAB_ULTRIX_STYLE
-
-/*
- * Need precise length links
- */
-#define PRECISE_SYMLINKS
diff --git a/usr.sbin/amd/config/os-u4_2.h b/usr.sbin/amd/config/os-u4_2.h
deleted file mode 100644
index 729daf1e581..00000000000
--- a/usr.sbin/amd/config/os-u4_2.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-u4_2.h 8.1 (Berkeley) 6/6/93
- * $Id: os-u4_2.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * Ultrix 4.2 definitions for Amd (automounter)
- * from Chris Lindblad <cjl@ai.mit.edu>
- * and Chris Metcalf <metcalf@lcs.mit.edu>
- */
-
-/*
- * Does the compiler grok void *
- */
-#define VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_4
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#if defined(vax) || defined(mips)
-#define ARCH_ENDIAN "little"
-#endif
-
-/*
- * The mount table is obtained from the kernel
- */
-#undef UPDATE_MTAB
-
-/*
- * No mntent info on Ultrix
- */
-#undef MNTENT_HDR
-
-/*
- * No support for syslog()
- */
-#define HAS_SYSLOG
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_NFS GT_NFS
-#define MOUNT_TYPE_UFS GT_ULTRIX
-#undef MTAB_TYPE_UFS
-#define MTAB_TYPE_UFS "ufs"
-
-/*
- * Name of mount & unmount system calls
- */
-#undef MOUNT_TRAP
-#define MOUNT_TRAP(type, mnt, flag, mnt_data) \
- mount(mnt->mnt_fsname, mnt->mnt_dir, flag, type, mnt_data)
-#undef UNMOUNT_TRAP
-#define UNMOUNT_TRAP(mnt) umount(mnt->mnt_passno)
-
-/*
- * Miscellaneous Ultrix bits
- */
-#define M_RDONLY M_RONLY
-
-#define MNTMAXSTR 128
-
-#define MNTTYPE_UFS "ufs" /* Un*x file system */
-#define MNTTYPE_NFS "nfs" /* network file system */
-#define MNTTYPE_IGNORE "ignore" /* No type specified, ignore this entry */
-
-#define MNTOPT_RO "ro" /* read only */
-#define MNTOPT_RW "rw" /* read/write */
-#define MNTOPT_QUOTA "quota" /* quotas */
-#define MNTOPT_NOQUOTA "noquota" /* no quotas */
-#define MNTOPT_HARD "hard" /* hard mount */
-#define MNTOPT_SOFT "soft" /* soft mount */
-#define MNTOPT_INTR "intr" /* interrupts allowed */
-
-#define MNTOPT_NOSUID "nosuid" /* no set uid allowed */
-
-struct mntent {
- char *mnt_fsname; /* name of mounted file system */
- char *mnt_dir; /* file system path prefix */
- char *mnt_type; /* MNTTYPE_* */
- char *mnt_opts; /* MNTOPT* */
- int mnt_freq; /* dump frequency, in days */
- int mnt_passno; /* pass number on parallel fsck */
-};
-#define MOUNTED "/etc/mtab"
-
-#define NFS_HDR "misc-ultrix.h"
-#define UFS_HDR "misc-ultrix.h"
-
-#define nfs_args nfs_gfs_mount
-#define ULTRIX_HACK /* Should be handled better than this !! */
-#define NEED_MNTOPT_PARSER
-
-/*
- * How to get a mount list
- */
-#undef READ_MTAB_FROM_FILE
-#define READ_MTAB_ULTRIX_STYLE
-
-/*
- * Need precise length links
- */
-#define PRECISE_SYMLINKS
diff --git a/usr.sbin/amd/config/os-umax43.h b/usr.sbin/amd/config/os-umax43.h
deleted file mode 100644
index d6fac6787b7..00000000000
--- a/usr.sbin/amd/config/os-umax43.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-umax43.h 8.1 (Berkeley) 6/6/93
- * $Id: os-umax43.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * UMAX 4.3 definitions for Amd (automounter)
- */
-
-/*
- * Does the compiler grok void *
- */
-#define VOIDP
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_4
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Does this OS have NDBM support?
- */
-#define OS_HAS_NDBM
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#define ARCH_ENDIAN "little"
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_NFS MOUNT_NFS
-#define MOUNT_TYPE_UFS MOUNT_UFS
diff --git a/usr.sbin/amd/config/os-utek.h b/usr.sbin/amd/config/os-utek.h
deleted file mode 100644
index 936df33809d..00000000000
--- a/usr.sbin/amd/config/os-utek.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-utek.h 8.1 (Berkeley) 6/6/93
- * $Id: os-utek.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * Utek 4.0 definitions for Amd (automounter)
- * from Bill Trost <trost%reed@cse.ogi.edu>
- */
-
-#define UTEK
-#define __NFS_HEADER__ /* prevent re-inclusion of <sys/nfs.h> */
-/* ... and fake the rest */
-#include "os-sos3.h"
diff --git a/usr.sbin/amd/config/os-utx32.h b/usr.sbin/amd/config/os-utx32.h
deleted file mode 100644
index 0f6bf2cde71..00000000000
--- a/usr.sbin/amd/config/os-utx32.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Gould UTX/32 definitions for Amd (automounter)
- *
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-utx32.h 8.1 (Berkeley) 6/6/93
- * $Id: os-utx32.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- */
-
-/*
- * Does the compiler grok void *
- */
-#ifdef __GNUC__
-#define VOIDP
-#endif
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_3
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_3
-
-/*
- * Does this OS have NDBM support?
- */
-#define OS_HAS_NDBM
-
-/*
- * Byte ordering
- */
-#undef ARCH_ENDIAN
-#if defined(gould) || defined(GOULD_PN)
-#define ARCH_ENDIAN "big"
-#endif
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_NFS MOUNT_NFS
-#define MOUNT_TYPE_UFS MOUNT_UFS
-#undef MTAB_TYPE_UFS
-#define MTAB_TYPE_UFS "4.3"
diff --git a/usr.sbin/amd/config/os-xinu43.h b/usr.sbin/amd/config/os-xinu43.h
deleted file mode 100644
index 9e2ed0ba657..00000000000
--- a/usr.sbin/amd/config/os-xinu43.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)os-xinu43.h 8.1 (Berkeley) 6/6/93
- * $Id: os-xinu43.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- *
- * mt Xinu 4.3 (MORE/bsd) definitions for Amd (automounter)
- * Should work on both Vax and HP ...
- */
-
-/*
- * Does the compiler grok void *
- */
-#ifdef __GNUC__
-#define VOIDP
-#endif
-
-/*
- * Which version of the Sun RPC library we are using
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define RPC_4
-
-/*
- * mt Xinu have a compatibility problem
- * with getreq vs. getreqset. On SunOS
- * getreqset takes a pointer to an fd_set,
- * whereas on MORE/bsd, getreq takes a
- * fd_set directly (cf. an integer on SunOS).
- */
-#define svc_getreqset(p) svc_getreq(*p)
-
-/*
- * Which version of the NFS interface are we using.
- * This is the implementation release number, not
- * the protocol revision number.
- */
-#define NFS_4
-
-/*
- * Name of filesystem types
- */
-#define MOUNT_TYPE_NFS "nfs"
-#define MOUNT_TYPE_UFS "ufs"
-#undef MTAB_TYPE_UFS
-#define MTAB_TYPE_UFS "ufs"
-
-/*
- * Byte ordering
- */
-#ifndef BYTE_ORDER
-#include <machine/endian.h>
-#endif /* BYTE_ORDER */
-
-#undef ARCH_ENDIAN
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define ARCH_ENDIAN "little"
-#else
-#if BYTE_ORDER == BIG_ENDIAN
-#define ARCH_ENDIAN "big"
-#else
-XXX - Probably no hope of running Amd on this machine!
-#endif /* BIG */
-#endif /* LITTLE */
-
-/*
- * Type of a file handle
- */
-#undef NFS_FH_TYPE
-#define NFS_FH_TYPE caddr_t
-
-/*
- * Type of filesystem type
- */
-#undef MTYPE_TYPE
-#define MTYPE_TYPE char *
diff --git a/usr.sbin/amd/fsinfo/Makefile b/usr.sbin/amd/fsinfo/Makefile
deleted file mode 100644
index f73ab77e79b..00000000000
--- a/usr.sbin/amd/fsinfo/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-# from: @(#)Makefile 8.1 (Berkeley) 6/28/93
-# $Id: Makefile,v 1.1 1995/10/18 08:47:18 deraadt Exp $
-
-.include "../config/Makefile.config"
-
-PROG= fsinfo
-MAN= fsinfo.8
-SRCS= fsinfo.c fsi_gram.c fsi_lex.c \
- fsi_util.c fsi_analyze.c fsi_dict.c \
- wr_atab.c wr_bparam.c wr_dumpset.c \
- wr_exportfs.c wr_fstab.c
-CLEANFILES= \
- fsi_gram.c y.tab.c fsi_gram.h y.tab.h \
- fsi_lex.c lex.yy.c y.output
-CFLAGS+=-I.
-CFLAGS+=-I${.CURDIR}/../include
-CFLAGS+=-I${.CURDIR}/../config
-CFLAGS+=-DOS_HDR=\"os-${OS}.h\"
-
-fsi_lex.o fsinfo.o: fsi_gram.h
-fsi_gram.c fsi_gram.h: ../fsinfo/fsi_gram.y
- @echo "# expect 2 shift/reduce conflicts"
- ${YACC} -d ${.CURDIR}/fsi_gram.y
- mv y.tab.c fsi_gram.c
- mv y.tab.h fsi_gram.h
-
-fsi_lex.c: ../fsinfo/fsi_lex.l
- ${LEX} ${.CURDIR}/fsi_lex.l
- mv lex.yy.c fsi_lex.c
-
-.PATH: ${.CURDIR}/../config
-.include "../../Makefile.inc"
-.include <bsd.prog.mk>
diff --git a/usr.sbin/amd/fsinfo/conf/automounts b/usr.sbin/amd/fsinfo/conf/automounts
deleted file mode 100644
index ee4b4eedc1b..00000000000
--- a/usr.sbin/amd/fsinfo/conf/automounts
+++ /dev/null
@@ -1,48 +0,0 @@
-host localhost.doc.ic.ac.uk
-
-fs localhost:/localhost {
- fstype = export
- mount default {
- exportfs ""
- volname /home/localhost
- }
-}
-
-automount opts "opts:=rw,nosuid,grpid" /vol {
- rwho {}
- r+d {}
- public {}
- src { gnu{} athena{} gould{} utx{} sos4{} xinu43{} }
- export {
- exec {
- sun3 {}
- sun4 {}
- }
- roots {}
- swaps {
- tsun1 {} tsun2 {} tsun3 {} tsun4 {} tsun5 {} tsun6 {}
- tsun7 {} tsun8 {} tsun9 {} tsun10 {} tsun11 {} tsun12 {}
- tsun13 {} tsun14 {} tsun15 {} tsun16 {} tsun17 {} tsun18 {}
- tsun19 {}
- tcsun1 {} tcsun2 {} tcsun3 {} tcsun4 {} tcsun5 {}
- }
- misc {}
- }
-}
-
-automount opts "opts:=rw,nosuid,grpid" /home {
- achilles {}
- toytown {}
- gummo {}
- dylan { dk2{} dk5 {} }
- ganymede {}
- gould { staff{} teach{} }
- "localhost" -> localhost
-}
-
-automount opts "opts:=rw,nosuid,grpid" /homes {
- opr -> /home/localhost/opr
-#include "users"
-}
-
-automount /usr/achilles = /home/achilles
diff --git a/usr.sbin/amd/fsinfo/conf/csg_sun3 b/usr.sbin/amd/fsinfo/conf/csg_sun3
deleted file mode 100644
index 15d7f215b5d..00000000000
--- a/usr.sbin/amd/fsinfo/conf/csg_sun3
+++ /dev/null
@@ -1,18 +0,0 @@
-// $Id: csg_sun3,v 1.1 1995/10/18 08:47:19 deraadt Exp $
-// standard setups for DoC tsuns.
-// note that no /var/spool/rwho is mounted as we now expect amd to do this as /vol/rwho
-
-// a sun3
-#ifndef SOS4_SYS_OPTS
-#define SOS4_SYS_OPTS grpid,hard,intr
-#endif
-#define CSG_SUN3(HOST,DOMAIN,BOOT,EXEC) \
-host HOST.DOMAIN \
-\
-mount /vol/export/roots/HOST as / from BOOT opts rw,SOS4_SYS_OPTS \
-mount /vol/export/swaps/HOST fstype swap as swap from BOOT opts swap \
-mount /vol/export/exec/sun3 as /usr from EXEC opts ro,SOS4_SYS_OPTS \
-mount /vol/export/misc/crash/HOST as /var/crash/HOST from EXEC opts rw,nosuid,SOS4_SYS_OPTS \
-mount /vol/export/misc/tmp/HOST as /tmp from EXEC opts rw,nosuid,SOS4_SYS_OPTS \
-mount /vol/export/misc/usr.tmp/HOST as /var/tmp from EXEC opts rw,nosuid,SOS4_SYS_OPTS \
-mount /var/mmdf from BOOT opts rw,nosuid,SOS4_SYS_OPTS
diff --git a/usr.sbin/amd/fsinfo/conf/csg_vax b/usr.sbin/amd/fsinfo/conf/csg_vax
deleted file mode 100644
index 94d1d1d980d..00000000000
--- a/usr.sbin/amd/fsinfo/conf/csg_vax
+++ /dev/null
@@ -1,67 +0,0 @@
-// $Id: csg_vax,v 1.1 1995/10/18 08:47:19 deraadt Exp $
-// csg vax config - really just for {s,r}vax
-
-#define FSTYPE_UFS 4.2
-#define DEFAULT_OPTS rw
-
-#define CSG_VAX(HOST,DOMAIN) \
-host HOST.DOMAIN\
-\
-/*\
-arch vax\
-os xinu43\
-cluster csg\
-dumphost flamingo.doc.ic.ac.uk\
-*/\
-\
-// root\
-fs /dev/hp0a {\
- fstype = FSTYPE_UFS\
- opts = DEFAULT_OPTS\
- freq = 1\
- passno = 1\
- mount / {}\
-}\
-\
-// swap\
-fs /dev/hp0b {\
- fstype = swap\
-}\
-\
-// usr\
-fs /dev/hp0e {\
- fstype = FSTYPE_UFS\
- opts = DEFAULT_OPTS\
- freq = 1\
- passno = 2\
- mount /usr {\
- exportfs "\\\
- sky.doc.ic.ac.uk\\\
- svax.doc.ic.ac.uk\\\
- rvax.doc.ic.ac.uk\\\
- ivax.doc.ic.ac.uk\\\
- "\
- }\
-}\
-\
-// var\
-fs /dev/hp0d {\
- fstype = FSTYPE_UFS\
- opts = DEFAULT_OPTS\
- freq = 1\
- passno = 3\
- mount /var {}\
-}\
-\
-// home directories\
-fs /dev/hp0f {\
- fstype = FSTYPE_UFS\
- opts = DEFAULT_OPTS\
- freq = 1\
- passno = 3\
- mount /a/HOST/home/HOST {\
- exportfs "\\\
- teach_hosts\\\
- "\
- }\
-} \ No newline at end of file
diff --git a/usr.sbin/amd/fsinfo/conf/diskless_sun3_sos4 b/usr.sbin/amd/fsinfo/conf/diskless_sun3_sos4
deleted file mode 100644
index 0cacb2093c5..00000000000
--- a/usr.sbin/amd/fsinfo/conf/diskless_sun3_sos4
+++ /dev/null
@@ -1,9 +0,0 @@
-#define DISKLESS_SUN3_SOS4(HOST,DOMAIN,BOOTSERVER) \
-host HOST.DOMAIN \
-\
-mount /export/root/HOST as / from BOOTSERVER opts rw,grpid,intr \
-mount /export/swap/HOST as swap fstype swap from BOOTSERVER opts swap \
-mount /export/exec/sun3 as /usr from BOOTSERVER opts rw,grpid,intr \
-mount /var/clients/HOST as /var from BOOTSERVER opts rw,grpid,intr,nosuid \
-mount /var/clients/HOST.tmp as /tmp from BOOTSERVER opts rw,grpid,intr,nosuid \
-mount /var/spool/mail from BOOTSERVER opts rw,grpid,intr,nosuid
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/achilles.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/achilles.doc.ic.ac.uk
deleted file mode 100644
index 6a46ce883d6..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/achilles.doc.ic.ac.uk
+++ /dev/null
@@ -1,116 +0,0 @@
-// mkfsinfo
-
-host achilles.doc.ic.ac.uk
-
-/*
-arch sun4
-os sos4
-cluster theory
-dumphost achilles.doc.ic.ac.uk
-*/
-
-// SWAP Partitions
-fs /dev/xd0b {
- fstype = swap
-}
-
-fs /dev/xd1b {
- fstype = swap
-}
-
-// ROOT
-fs /dev/xd0a {
- fstype = 4.2
- opts = rw,noquota,grpid
- passno = 1;
- freq = 1;
- mount / { }
-}
-
-// ROOT Backup
-fs /dev/xd1a {
- fstype = ignore
- opts = rw,noquota,grpid
- passno = 1;
- freq = 1;
- mount /backup { }
-}
-
-fs /dev/xd1d {
- fstype = 4.2
- opts = rw,noquota,grpid
- passno = 1;
- freq = 1;
- mount /export {
- root {
- truth { exportfs "-root=truth,access=truth" }
- }
- swap {
- truth { exportfs "-root=truth,access=truth" }
- }
- exec {
- sun4 { exportfs "-access=toytown_clients:hangers_on:gummo:harpo:opus,rw=dylan:truth:florence:toytown" }
- }
- }
-}
-
-fs /dev/xd1f {
- fstype = 4.2
- opts = rw,noquota,grpid
- passno = 1;
- freq = 1;
- mount /var {
- clients {
- truth { exportfs "-root=truth,access=truth" }
- truth.tmp { exportfs "-root=truth,access=truth" }
- }
- spool {
- mail { exportfs "-root=truth,access=truth" }
- rwho { exportfs "ro" volname /vol/rwho sel "byte==big" }
- }
- }
-}
-
-fs /dev/xd0d {
- fstype = 4.2
- opts = rw,noquota,grpid
- passno = 1;
- freq = 1;
- mount /tmp {
- X11NeWS { exportfs "-ro" }
- }
-}
-
-fs /dev/xd0g {
- fstype = 4.2
- opts = rw,noquota,grpid
- passno = 1
- freq = 1
- mount default {
- exportfs "-access=toytown_clients:hangers_on"
- volname /home/achilles
- }
-}
-
-fs /dev/xd1g {
- fstype = 4.2
- opts = rw,noquota
- passno = 1
- freq = 1
- mount /usr {
- exportfs "-access=toytown_clients:hangers_on:gummo:harpo:opus,rw=dylan:truth:florence:toytown"
- share {
- volname "/usr/share"
- //exportfs "blah"
- }
- src {
- local {
- //exportfs "-access=toytown:zebedee:dougal:dylan:florence:opus,rw=dylan:florence,root=dylan:florence"
- bits { gnu { volname "/vol/src/gnu" } }
- athena { volname "/vol/src/athena" }
- }
- }
- }
-}
-
-/*mount /export/exec/sun3 fstype nfs from gould.doc.ic.ac.uk as /usr opts "rw"*/
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/bigears.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/bigears.doc.ic.ac.uk
deleted file mode 100644
index bda2fd886b2..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/bigears.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../diskless_sun3_sos4"
-
-DISKLESS_SUN3_SOS4(bigears,doc.ic.ac.uk,toytown.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/dylan.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/dylan.doc.ic.ac.uk
deleted file mode 100644
index 5284147d1c2..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/dylan.doc.ic.ac.uk
+++ /dev/null
@@ -1,68 +0,0 @@
-// mkfsinfo
-
-host dylan.doc.ic.ac.uk
-
-// SWAP
-fs /dev/dsk/0s0 {
- fstype = swap
-}
-
-// SWAP
-fs /dev/dsk/1s0 {
- fstype = swap
-}
-
-// ROOT
-fs /dev/dsk/0s0 {
- fstype = hfs
- opts = rw,noquota,grpid
- passno = 0;
- freq = 1;
- mount / { }
-}
-
-fs /dev/dsk/1s0 {
- fstype = hfs
- opts = defaults
- passno = 1;
- freq = 1;
- mount /usr {
- local {
- exportfs "dougal eden dylan zebedee brian"
- volname /nfs/hp300/local
- }
- }
-}
-
-fs /dev/dsk/2s0 {
- fstype = hfs
- opts = defaults
- passno = 1;
- freq = 1;
- mount default {
- exportfs "toytown_clients hangers_on"
- volname /home/dylan/dk2
- }
-}
-
-fs /dev/dsk/3s0 {
- fstype = hfs
- opts = defaults
- passno = 1;
- freq = 1;
- mount default {
- exportfs "toytown_clients hangers_on"
- volname /home/dylan/dk3
- }
-}
-
-fs /dev/dsk/5s0 {
- fstype = hfs
- opts = defaults
- passno = 1;
- freq = 1;
- mount default {
- exportfs "toytown_clients hangers_on"
- volname /home/dylan/dk5
- }
-}
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/flamingo.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/flamingo.doc.ic.ac.uk
deleted file mode 100644
index c8259874ee9..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/flamingo.doc.ic.ac.uk
+++ /dev/null
@@ -1,104 +0,0 @@
-// mkfsinfo for flamingo
-// $Id: flamingo.doc.ic.ac.uk,v 1.1 1995/10/18 08:47:19 deraadt Exp $
-
-host flamingo.doc.ic.ac.uk
-
-/*
-arch sun3
-os sos4
-cluster csg
-dumphost flamingo.doc.ic.ac.uk
-*/
-
-#define FSTYPE_UFS 4.2
-#define DEFAULT_OPTS rw,noquota,nosuid,grpid
-
-// swap
-fs /dev/xy0b {
- fstype = swap
-}
-
-// root
-fs /dev/xy0a {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- passno = 1
- freq = 1
- dumpset = csg_sun3_vax
- mount / {}
-}
-
-// usr
-fs /dev/xy0f {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 2
- dumpset = csg_sun3_vax
- mount /usr {
- volname /vol/export/exec/sun3
- exportfs "-ro,access=teach_hosts:ssun2.doc.ic.ac.uk:pelican:gould,\
- root=gould:pelican:ssun2.doc.ic.ac.uk"
- }
-}
-
-// tmp
-fs /dev/xy0d {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS,nosuid
- freq = 1
- passno = 3
- mount /tmp {
- exportfs "-access=ssun1:tsunfs,root=tsunfs"
- }
-}
-
-// var
-fs /dev/xy0e {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 4
- dumpset = csg_sun3_vax
- mount /var {
- tmp {
- exportfs "-access=ssun1:sky.doc.ic.ac.uk"
- }
- crash {
- exportfs "-access=ssun1"
- }
- misc {
- exportfs "-access=teach_hosts"
- }
- spool {
- rwho {
- volname /vol/rwho
- exportfs "-ro,access=teach_hosts"
- sel "byte==big"
- }
- }
- }
-}
-
-// source - sos4
-fs /dev/xy0h {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 6
- mount /usr/src {
- volname /vol/src/sos4
- exportfs "-access=svax:pelican:gould,root=pelican:svax"
- }
-}
-
-// home directories
-fs /dev/xy0g {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 5
- mount /a/flamingo/home/flamingo {
- exportfs "-access=teach_hosts:thp_hosts:ssun2:obsidian:truth,root=gould"
- }
-}
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/ganymede.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/ganymede.doc.ic.ac.uk
deleted file mode 100644
index e847c85874b..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/ganymede.doc.ic.ac.uk
+++ /dev/null
@@ -1,33 +0,0 @@
-host ganymede.doc.ic.ac.uk
-
-fs /dev/xy0a {
- fstype = 4.2
- opts = rw
- freq = 1
- passno = 1
- mount / {
- }
-}
-
-fs /dev/xy0g {
- fstype = 4.2
- opts = rw
- freq = 1
- passno = 2
- mount /usr {
- exportfs "-access=toytown:toytown_clients"
- }
-}
-
-fs /dev/xy0h {
- fstype = 4.2
- opts = rw
- freq = 1
- passno = 3
- mount /home/ganymede {
- exportfs "-access=toytown_clients:samson:hangers_on"
- }
-}
-
-mount /home/toytown opts rw,bg,nosuid
-mount /usr/local from toytown.doc.ic.ac.uk opts ro,bg
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/gould.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/gould.doc.ic.ac.uk
deleted file mode 100644
index 045c5e0bd4d..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/gould.doc.ic.ac.uk
+++ /dev/null
@@ -1,477 +0,0 @@
-// mkfsinfo for gould
-// $Id: gould.doc.ic.ac.uk,v 1.1 1995/10/18 08:47:20 deraadt Exp $
-
-host gould.doc.ic.ac.uk
-
-/*
-arch powernode
-os utx21
-cluster csg
-dumphost flamingo.doc.ic.ac.uk
-*/
-
-#define FSTYPE_UFS 4.3
-#define DEFAULT_OPTS rw,noquota
-
-// swap
-fs /dev/dk0b {
- fstype = swap
-}
-
-fs /dev/dk1b {
- fstype = swap
-}
-
-fs /dev/dk4b {
- fstype = swap
-}
-
-// root
-fs /dev/dk0a {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- passno = 1
- freq = 1
- dumpset = csg_nightly
- mount / {}
-}
-
-// root backup
-fs /dev/dk4a {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 4
- mount /backup {}
-}
-
-// usr
-fs /dev/dk4d {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 2
- dumpset = csg_nightly
- mount /usr {}
-}
-
-// tmp
-fs /dev/dk1a {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS,nosuid
- freq = 0
- passno = 2
- mount /tmp {}
-}
-
-// var
-fs /dev/dk4g {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 3
- dumpset = csg_nightly
- mount /var {}
-}
-
-// shared stuff - usually for Suns
-fs /dev/dk5f {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 6
- mount /usr/share {
- exportfs "-rdonly=1 \
- ivax.doc.ic.ac.uk \
- rvax.doc.ic.ac.uk \
- ssun1.doc.ic.ac.uk \
- ssun2.doc.ic.ac.uk \
- svax.doc.ic.ac.uk \
- tsun1.doc.ic.ac.uk \
- tsun10.doc.ic.ac.uk \
- tsun11.doc.ic.ac.uk \
- tsun12.doc.ic.ac.uk \
- tsun13.doc.ic.ac.uk \
- tsun14.doc.ic.ac.uk \
- tsun15.doc.ic.ac.uk \
- tsun16.doc.ic.ac.uk \
- tsun17.doc.ic.ac.uk \
- tsun18.doc.ic.ac.uk \
- tsun19.doc.ic.ac.uk \
- tsun2.doc.ic.ac.uk \
- tsun3.doc.ic.ac.uk \
- tsun4.doc.ic.ac.uk \
- tsun5.doc.ic.ac.uk \
- tsun6.doc.ic.ac.uk \
- tsun7.doc.ic.ac.uk \
- tsun8.doc.ic.ac.uk \
- tsun9.doc.ic.ac.uk \
- tsunfs.doc.ic.ac.uk \
- flamingo.doc.ic.ac.uk \
- pelican.doc.ic.ac.uk \
- oriona \
- sky.doc.ic.ac.uk \
- whoops.doc.ic.ac.uk \
- whoops \
- "
- }
-}
-
-// spool stuff, including the news
-fs /dev/dk4f {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 5
- mount /var/spool {
- exportfs "\
- oriona \
- rpcsfg \
- "
- }
-}
-
-fs /dev/dk3h {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 2
- mount /var/spool/News {}
-}
-
-// this is the public ftp area
-fs /dev/dk3f {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 4
- mount /usr/reserve {
- PUBLIC {
- volname /vol/public
- exportfs "\
- oriona \
- ssun1.doc.ic.ac.uk \
- ssun2.doc.ic.ac.uk \
- obsidian \
- gummo \
- tsunfs.doc.ic.ac.uk \
- flamingo.doc.ic.ac.uk \
- "
- }
- }
-}
-
-// sources - local and public
-fs /dev/dk7c {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 2
- dumpset = csg_nightly
- mount /usr/src {
- volname /vol/src/gould
- exportfs "\
- flamingo.doc.ic.ac.uk \
- pelican.doc.ic.ac.uk \
- oriona \
- ssun1.doc.ic.ac.uk \
- svax.doc.ic.ac.uk \
- rvax.doc.ic.ac.uk \
- obsidian \
- tsunfs \
- "
- }
-}
-
-// sources - utx
-fs /dev/dk4e {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 6
- dumpset = csg_nightly
- mount /usr/src/utx {
- volname /vol/src/utx
- exportfs "-rdonly=1 \
- flamingo.doc.ic.ac.uk \
- "
- }
-}
-
-// home directories
-fs /dev/dk1h {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 3
- dumpset = csg_nightly
- mount /home/gould/teach {
- exportfs "\
- thp1 \
- thp2 \
- thp3 \
- thp4 \
- thp5 \
- thp6 \
- thp7 \
- thp8 \
- thp9 \
- thp10 \
- thpfs \
- ivax.doc.ic.ac.uk \
- rvax.doc.ic.ac.uk \
- ssun1.doc.ic.ac.uk \
- ssun2.doc.ic.ac.uk \
- svax.doc.ic.ac.uk \
- tsun1.doc.ic.ac.uk \
- tsun10.doc.ic.ac.uk \
- tsun11.doc.ic.ac.uk \
- tsun12.doc.ic.ac.uk \
- tsun13.doc.ic.ac.uk \
- tsun14.doc.ic.ac.uk \
- tsun15.doc.ic.ac.uk \
- tsun16.doc.ic.ac.uk \
- tsun17.doc.ic.ac.uk \
- tsun18.doc.ic.ac.uk \
- tsun19.doc.ic.ac.uk \
- tsun2.doc.ic.ac.uk \
- tsun3.doc.ic.ac.uk \
- tsun4.doc.ic.ac.uk \
- tsun5.doc.ic.ac.uk \
- tsun6.doc.ic.ac.uk \
- tsun7.doc.ic.ac.uk \
- tsun8.doc.ic.ac.uk \
- tsun9.doc.ic.ac.uk \
- tsunfs.doc.ic.ac.uk \
- flamingo.doc.ic.ac.uk \
- pelican.doc.ic.ac.uk \
- oriona \
- sky.doc.ic.ac.uk \
- whoops.doc.ic.ac.uk \
- whoops \
- vlsi.doc.ic.ac.uk \
- vlsi \
- "
- }
-}
-
-fs /dev/dk0h {
- fstype = FSTYPE_UFS
- opts = rw,quota
- freq = 1
- passno = 2
- dumpset = csg_nightly
- mount /home/gould/staff {
- exportfs "\
- achilles \
- thp1 \
- thp2 \
- thp3 \
- thp4 \
- thp5 \
- thp6 \
- thp7 \
- thp8 \
- thp9 \
- thp10 \
- thpfs \
- ivax.doc.ic.ac.uk \
- rvax.doc.ic.ac.uk \
- ssun1.doc.ic.ac.uk \
- ssun2.doc.ic.ac.uk \
- svax.doc.ic.ac.uk \
- tsun1.doc.ic.ac.uk \
- tsun10.doc.ic.ac.uk \
- tsun11.doc.ic.ac.uk \
- tsun12.doc.ic.ac.uk \
- tsun13.doc.ic.ac.uk \
- tsun14.doc.ic.ac.uk \
- tsun15.doc.ic.ac.uk \
- tsun16.doc.ic.ac.uk \
- tsun17.doc.ic.ac.uk \
- tsun18.doc.ic.ac.uk \
- tsun19.doc.ic.ac.uk \
- tsun2.doc.ic.ac.uk \
- tsun3.doc.ic.ac.uk \
- tsun4.doc.ic.ac.uk \
- tsun5.doc.ic.ac.uk \
- tsun6.doc.ic.ac.uk \
- tsun7.doc.ic.ac.uk \
- tsun8.doc.ic.ac.uk \
- tsun9.doc.ic.ac.uk \
- tsunfs.doc.ic.ac.uk \
- flamingo.doc.ic.ac.uk \
- pelican.doc.ic.ac.uk \
- oriona \
- sky.doc.ic.ac.uk \
- whoops.doc.ic.ac.uk \
- whoops \
- vlsi.doc.ic.ac.uk \
- vlsi \
- vlsi02 \
- "
- }
-}
-
-// booting diskless suns
-fs /dev/dk5e {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 3
- dumpset = csg_nightly
- mount /export {
-#ifndef ok
- volname /vol/export
-#endif
- exportfs "\
- -rootid=0 \
- whoops \
- whoops.doc.ic.ac.uk \
- "
- misc {
- volname /vol/export/misc
- }
- }
-}
-
-fs /dev/dk5a {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 4
- dumpset = csg_nightly
- mount /export/roots {
- volname /vol/export/roots
- exportfs "\
- -rootid=0 \
- whoops \
- whoops.doc.ic.ac.uk \
- "
- }
-}
-
-fs /dev/dk5d {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 5
- dumpset = csg_nightly
- mount /export/exec/sun3 {
- volname /vol/export/exec/sun3
- exportfs "\
- ssun1.doc.ic.ac.uk \
- ssun2.doc.ic.ac.uk \
- tsun1.doc.ic.ac.uk \
- tsun10.doc.ic.ac.uk \
- tsun11.doc.ic.ac.uk \
- tsun12.doc.ic.ac.uk \
- tsun13.doc.ic.ac.uk \
- tsun14.doc.ic.ac.uk \
- tsun15.doc.ic.ac.uk \
- tsun16.doc.ic.ac.uk \
- tsun17.doc.ic.ac.uk \
- tsun18.doc.ic.ac.uk \
- tsun19.doc.ic.ac.uk \
- tsun2.doc.ic.ac.uk \
- tsun3.doc.ic.ac.uk \
- tsun4.doc.ic.ac.uk \
- tsun5.doc.ic.ac.uk \
- tsun6.doc.ic.ac.uk \
- tsun7.doc.ic.ac.uk \
- tsun8.doc.ic.ac.uk \
- tsun9.doc.ic.ac.uk \
- tsunfs.doc.ic.ac.uk \
- flamingo.doc.ic.ac.uk \
- pelican.doc.ic.ac.uk \
- whoops.doc.ic.ac.uk \
- whoops \
- "
- }
-}
-
-// various r+d things - used for athena, etc
-fs /dev/dk5g {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 2
- mount /usr/r+d {
- volname /vol/r+d
- exportfs "\
- ivax.doc.ic.ac.uk \
- rvax.doc.ic.ac.uk \
- ssun1.doc.ic.ac.uk \
- ssun2.doc.ic.ac.uk \
- svax.doc.ic.ac.uk \
- tsun1.doc.ic.ac.uk \
- tsun10.doc.ic.ac.uk \
- tsun11.doc.ic.ac.uk \
- tsun12.doc.ic.ac.uk \
- tsun13.doc.ic.ac.uk \
- tsun14.doc.ic.ac.uk \
- tsun15.doc.ic.ac.uk \
- tsun16.doc.ic.ac.uk \
- tsun17.doc.ic.ac.uk \
- tsun18.doc.ic.ac.uk \
- tsun19.doc.ic.ac.uk \
- tsun2.doc.ic.ac.uk \
- tsun3.doc.ic.ac.uk \
- tsun4.doc.ic.ac.uk \
- tsun5.doc.ic.ac.uk \
- tsun6.doc.ic.ac.uk \
- tsun7.doc.ic.ac.uk \
- tsun8.doc.ic.ac.uk \
- tsun9.doc.ic.ac.uk \
- tsunfs.doc.ic.ac.uk \
- flamingo.doc.ic.ac.uk \
- pelican.doc.ic.ac.uk \
- oriona \
- sky.doc.ic.ac.uk \
- whoops.doc.ic.ac.uk \
- whoops \
- "
- }
-}
-
-fs /dev/dk3d {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 3
- mount /usr/r+d/r1 {
- exportfs "\
- ssun1.doc.ic.ac.uk \
- ssun2.doc.ic.ac.uk \
- "
- }
-}
-
-fs /dev/dk4h {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 7
- mount /usr/r+d/r2 {
- exportfs "\
- achilles \
- gummo \
- harpo \
- oriona \
- ssun1.doc.ic.ac.uk \
- ssun2.doc.ic.ac.uk \
- thpfs \
- toytown \
- obsidian \
- "
- }
-}
-
-// this bit of disc needs a name !
-fs /dev/dk5h {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 7
- mount /mnt2 {}
-}
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/gummo.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/gummo.doc.ic.ac.uk
deleted file mode 100644
index aae6a5d7583..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/gummo.doc.ic.ac.uk
+++ /dev/null
@@ -1,12 +0,0 @@
-// mkfsinfo
-
-host gummo.doc.ic.ac.uk
-
-// ROOT
-fs /dev/xxx1 {
- fstype = export
- mount default {
- exportfs ""
- volname /home/gummo
- }
-}
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/ivax.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/ivax.doc.ic.ac.uk
deleted file mode 100644
index 2429246663b..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/ivax.doc.ic.ac.uk
+++ /dev/null
@@ -1,84 +0,0 @@
-// $Id: ivax.doc.ic.ac.uk,v 1.1 1995/10/18 08:47:20 deraadt Exp $
-// ivax
-
-#define FSTYPE_UFS 4.2
-#define DEFAULT_OPTS rw
-
-host {
- config "NFS_SERVER=true"
- config "NFS_CLIENT=true"
- config "YP_SERVER=false"
- config "YP_CLIENT=false"
-
- arch = vax
- os = xinu43
- cluster = teach.doc.ic.ac.uk
- netif il0 { hwaddr = "08:08:08:08:08:08" netmask = 0xfffffe00 inaddr = 129.31.80.36 }
-
-} ivax.doc.ic.ac.uk
-
-// root
-fs /dev/hp0a {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 1
- mount / {}
-}
-
-// swap
-fs /dev/hp0b {
- fstype = swap
-}
-
-// usr
-fs /dev/hp0e {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 2
- mount /usr {
- exportfs "\
- sky.doc.ic.ac.uk\
- svax.doc.ic.ac.uk\
- rvax.doc.ic.ac.uk\
- ivax.doc.ic.ac.uk\
- "
- }
-}
-
-// var
-fs /dev/hp0d {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 3
- mount /var {}
-}
-
-// home directories
-fs /dev/hp0f {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 3
- mount default {
- volname /home/ivax
- exportfs "\
- sky.doc.ic.ac.uk\
- "
- }
-}
-
-// sources which are used by the gould for the infoserver
-fs /dev/hp2c {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 3
- mount /public {
- exportfs "\
- gould\
- "
- }
-}
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/obsidian.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/obsidian.doc.ic.ac.uk
deleted file mode 100644
index 8d51596fb4e..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/obsidian.doc.ic.ac.uk
+++ /dev/null
@@ -1,28 +0,0 @@
-// $Id: obsidian.doc.ic.ac.uk,v 1.1 1995/10/18 08:47:20 deraadt Exp $
-// conf for obsidian
-
-#define FSTYPE_UFS hfs
-#define DEFAULT_OPTS rw
-
-host obsidian.doc.ic.ac.uk
-
-fs /dev/dsk/0s0 {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 1
- mount / {}
-}
-
-fs /dev/dsk/1s0 {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 1
- mount default {
- volname /home/obsidian
- exportfs "\
- gould\
- "
- }
-}
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/pelican.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/pelican.doc.ic.ac.uk
deleted file mode 100644
index 8e32cd5d909..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/pelican.doc.ic.ac.uk
+++ /dev/null
@@ -1,208 +0,0 @@
-// mkfsinfo for pelican
-// $Id: pelican.doc.ic.ac.uk,v 1.1 1995/10/18 08:47:20 deraadt Exp $
-
-host pelican.doc.ic.ac.uk
-
-/*
-arch sun3
-os sos4
-cluster csg
-dumphost flamingo.doc.ic.ac.uk
-*/
-
-#define FSTYPE_UFS 4.2
-#define DEFAULT_OPTS rw,noquota,nosuid,grpid
-
-// swap
-fs /dev/xd0b {
- fstype = swap
-}
-
-// root
-fs /dev/xd0a {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- passno = 1
- freq = 1
- dumpset = csg_sun3_vax
- mount / {
- exportfs "-ro,access=tsunfs,root=tsunfs"
- }
-}
-
-// usr
-fs /dev/xd0f {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 2
- dumpset = csg_sun3_vax
- mount /usr {
- volname /vol/export/exec/sun3
- exportfs "-ro,access=teach_hosts,root=gould:flamingo:tsunfs"
- }
-}
-
-// tmp
-fs /dev/xd0d {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS,nosuid
- freq = 1
- passno = 3
- mount /tmp {
- exportfs "\
- -access=\
- flamingo:\
- tsun16.doc.ic.ac.uk:\
- tsun17.doc.ic.ac.uk:\
- tsun18.doc.ic.ac.uk:\
- tsun19.doc.ic.ac.uk"
- }
-}
-
-// var
-fs /dev/xd0e {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 4
- dumpset = csg_sun3_vax
- mount /var {
- misc {
- // this is due to differences between tsunfs and pelican
- volname /vol/export/misc
- exportfs "\
- -access=teach_hosts,\
- root=\
- tcsun1.doc.ic.ac.uk:\
- tcsun2.doc.ic.ac.uk:\
- tcsun3.doc.ic.ac.uk:\
- tcsun4.doc.ic.ac.uk:\
- tcsun5.doc.ic.ac.uk:\
- tsun16.doc.ic.ac.uk:\
- tsun17.doc.ic.ac.uk:\
- tsun18.doc.ic.ac.uk:\
- tsun19.doc.ic.ac.uk"
- }
- mmdf {
- exportfs "\
- -access=teach_hosts,\
- root=\
- tcsun1.doc.ic.ac.uk:\
- tcsun2.doc.ic.ac.uk:\
- tcsun3.doc.ic.ac.uk:\
- tcsun4.doc.ic.ac.uk:\
- tcsun5.doc.ic.ac.uk:\
- tsun16.doc.ic.ac.uk:\
- tsun17.doc.ic.ac.uk:\
- tsun18.doc.ic.ac.uk:\
- tsun19.doc.ic.ac.uk"
- }
- spool {
- rwho {
- volname /vol/rwho
- exportfs "-ro,access=teach_hosts"
- sel "byte==big"
- }
- }
- }
-}
-
-// export for diskless clients
-fs /dev/xd0h {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 6
- mount /export {
- roots {
- tcsun1 {
- volname /vol/export/roots/tcsun1
- exportfs "-root=tcsun1.doc.ic.ac.uk,access=tcsun1.doc.ic.ac.uk"
- }
- tcsun2 {
- volname /vol/export/roots/tcsun2
- exportfs "-root=tcsun2.doc.ic.ac.uk,access=tcsun2.doc.ic.ac.uk"
- }
- tcsun3 {
- volname /vol/export/roots/tcsun3
- exportfs "-root=tcsun3.doc.ic.ac.uk,access=tcsun3.doc.ic.ac.uk"
- }
- tcsun4 {
- volname /vol/export/roots/tcsun4
- exportfs "-root=tcsun4.doc.ic.ac.uk,access=tcsun4.doc.ic.ac.uk"
- }
- tcsun5 {
- volname /vol/export/roots/tcsun5
- exportfs "-root=tcsun5.doc.ic.ac.uk,access=tcsun5.doc.ic.ac.uk"
- }
-
- tsun16 {
- volname /vol/export/roots/tsun16
- exportfs "-root=tsun16.doc.ic.ac.uk,access=tsun16.doc.ic.ac.uk"
- }
- tsun17 {
- volname /vol/export/roots/tsun17
- exportfs "-root=tsun17.doc.ic.ac.uk,access=tsun17.doc.ic.ac.uk"
- }
- tsun18 {
- volname /vol/export/roots/tsun18
- exportfs "-root=tsun18.doc.ic.ac.uk,access=tsun18.doc.ic.ac.uk"
- }
- tsun19 {
- volname /vol/export/roots/tsun19
- exportfs "-root=tsun19.doc.ic.ac.uk,access=tsun19.doc.ic.ac.uk"
- }
- }
- swaps {
- tcsun1 {
- volname /vol/export/swaps/tcsun1
- exportfs "-root=tcsun1.doc.ic.ac.uk,access=tcsun1.doc.ic.ac.uk"
- }
- tcsun2 {
- volname /vol/export/swaps/tcsun2
- exportfs "-root=tcsun2.doc.ic.ac.uk,access=tcsun2.doc.ic.ac.uk"
- }
- tcsun3 {
- volname /vol/export/swaps/tcsun3
- exportfs "-root=tcsun3.doc.ic.ac.uk,access=tcsun3.doc.ic.ac.uk"
- }
- tcsun4 {
- volname /vol/export/swaps/tcsun4
- exportfs "-root=tcsun4.doc.ic.ac.uk,access=tcsun4.doc.ic.ac.uk"
- }
- tcsun5 {
- volname /vol/export/swaps/tcsun5
- exportfs "-root=tcsun5.doc.ic.ac.uk,access=tcsun5.doc.ic.ac.uk"
- }
- tsun16 {
- volname /vol/export/swaps/tsun16
- exportfs "-root=tsun16.doc.ic.ac.uk,access=tsun16.doc.ic.ac.uk"
- }
- tsun17 {
- volname /vol/export/swaps/tsun17
- exportfs "-root=tsun17.doc.ic.ac.uk,access=tsun17.doc.ic.ac.uk"
- }
- tsun18 {
- volname /vol/export/swaps/tsun18
- exportfs "-root=tsun18.doc.ic.ac.uk,access=tsun18.doc.ic.ac.uk"
- }
- tsun19 {
- volname /vol/export/swaps/tsun19
- exportfs "-root=tsun19.doc.ic.ac.uk,access=tsun19.doc.ic.ac.uk"
- }
- }
- }
-}
-
-// home directories
-fs /dev/xd0g {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 5
- mount default {
- volname /home/pelican
- exportfs "-access=teach_hosts:thp_hosts:ssun2:obsidian:truth,root=gould"
- }
-}
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/rvax.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/rvax.doc.ic.ac.uk
deleted file mode 100644
index f07692c70e9..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/rvax.doc.ic.ac.uk
+++ /dev/null
@@ -1,66 +0,0 @@
-// $Id: rvax.doc.ic.ac.uk,v 1.1 1995/10/18 08:47:20 deraadt Exp $
-// rvax
-
-#define FSTYPE_UFS 4.2
-#define DEFAULT_OPTS rw
-
-host rvax.doc.ic.ac.uk
-
-/*
-arch vax
-os xinu43
-cluster csg
-dumphost flamingo.doc.ic.ac.uk
-*/
-
-// root
-fs /dev/hp0a {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 1
- mount / {}
-}
-
-// swap
-fs /dev/hp0b {
- fstype = swap
-}
-
-// usr
-fs /dev/hp0e {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 2
- mount /usr {
- exportfs "\
- sky.doc.ic.ac.uk\
- svax.doc.ic.ac.uk\
- rvax.doc.ic.ac.uk\
- ivax.doc.ic.ac.uk\
- "
- }
-}
-
-// var
-fs /dev/hp0d {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 3
- mount /var {}
-}
-
-// home directories
-fs /dev/hp0f {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 3
- mount /a/rvax/home/rvax {
- exportfs "\
- teach_hosts\
- "
- }
-} \ No newline at end of file
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/sky.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/sky.doc.ic.ac.uk
deleted file mode 100644
index fcb4a622e32..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/sky.doc.ic.ac.uk
+++ /dev/null
@@ -1,79 +0,0 @@
-// $Id: sky.doc.ic.ac.uk,v 1.1 1995/10/18 08:47:20 deraadt Exp $
-// sky
-
-#define FSTYPE_UFS 4.2
-#define DEFAULT_OPTS rw
-
-host sky.doc.ic.ac.uk
-
-/*
-arch vax
-os xinu43
-cluster csg
-dumphost flamingo.doc.ic.ac.uk
-*/
-
-// root
-fs /dev/hp0a {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 1
- mount / {}
-}
-
-// swap
-fs /dev/hp0b {
- fstype = swap
-}
-
-// usr
-fs /dev/hp0e {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 2
- mount /usr {
- exportfs "\
- sky.doc.ic.ac.uk\
- svax.doc.ic.ac.uk\
- rvax.doc.ic.ac.uk\
- ivax.doc.ic.ac.uk\
- "
- }
-}
-
-// var
-fs /dev/hp0d {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 3
- mount /var {}
-}
-
-// home directories
-fs /dev/hp0f {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 3
- mount /a/sky/home/sky {}
-}
-
-// 4.3 sources
-fs /dev/hp1g {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 2
- mount /usr/src {
- volname /vol/src/xinu43
- exportfs "\
- svax.doc.ic.ac.uk\
- rvax.doc.ic.ac.uk\
- sky.doc.ic.ac.uk\
- ivax.doc.ic.ac.uk\
- "
- }
-} \ No newline at end of file
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/svax.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/svax.doc.ic.ac.uk
deleted file mode 100644
index 4af860dd367..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/svax.doc.ic.ac.uk
+++ /dev/null
@@ -1,66 +0,0 @@
-// $Id: svax.doc.ic.ac.uk,v 1.1 1995/10/18 08:47:20 deraadt Exp $
-// svax
-
-#define FSTYPE_UFS 4.2
-#define DEFAULT_OPTS rw
-
-host svax.doc.ic.ac.uk
-
-/*
-arch vax
-os xinu43
-cluster csg
-dumphost flamingo.doc.ic.ac.uk
-*/
-
-// root
-fs /dev/hp0a {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 1
- mount / {}
-}
-
-// swap
-fs /dev/hp0b {
- fstype = swap
-}
-
-// usr
-fs /dev/hp0e {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 2
- mount /usr {
- exportfs "\
- sky.doc.ic.ac.uk\
- svax.doc.ic.ac.uk\
- rvax.doc.ic.ac.uk\
- ivax.doc.ic.ac.uk\
- "
- }
-}
-
-// var
-fs /dev/hp0d {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 3
- mount /var {}
-}
-
-// home directories
-fs /dev/hp0f {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 3
- mount /a/svax/home/svax {
- exportfs "\
- teach_hosts\
- "
- }
-} \ No newline at end of file
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tcsun1.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tcsun1.doc.ic.ac.uk
deleted file mode 100644
index 1b10d84111a..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tcsun1.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tcsun1,doc.ic.ac.uk,pelican.doc.ic.ac.uk,pelican.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tcsun2.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tcsun2.doc.ic.ac.uk
deleted file mode 100644
index 933d2f46438..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tcsun2.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tcsun2,doc.ic.ac.uk,pelican.doc.ic.ac.uk,pelican.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tcsun3.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tcsun3.doc.ic.ac.uk
deleted file mode 100644
index ccef4d4e221..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tcsun3.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tcsun3,doc.ic.ac.uk,pelican.doc.ic.ac.uk,pelican.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tcsun4.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tcsun4.doc.ic.ac.uk
deleted file mode 100644
index 9de9a9a69d3..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tcsun4.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tcsun4,doc.ic.ac.uk,pelican.doc.ic.ac.uk,pelican.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tcsun5.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tcsun5.doc.ic.ac.uk
deleted file mode 100644
index 7f268a0b945..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tcsun5.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tcsun5,doc.ic.ac.uk,pelican.doc.ic.ac.uk,pelican.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/toytown.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/toytown.doc.ic.ac.uk
deleted file mode 100644
index 7b27f160463..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/toytown.doc.ic.ac.uk
+++ /dev/null
@@ -1,116 +0,0 @@
-host toytown.doc.ic.ac.uk
-
-fs /dev/xy0a {
- fstype = 4.2
- opts = rw,noquota,grpid
- freq = 25
- passno = 1
- mount / {
- }
-}
-
-fs /dev/xy0g {
- fstype = 4.2
- opts = rw,noquota,grpid
- freq = 25
- passno = 2
- mount /usr {
- exportfs "-access=toytown_clients:hangers_on:pythagoras,ro"
- sun3 { }
- local { }
- }
-}
-
-fs /dev/xy1g {
- fstype = 4.2
- opts = rw,grpid,nosuid
- freq = 6
- passno = 2
- mount /home/toytown {
- exportfs "-access=toytown_clients:hangers_on,root=achilles"
- }
-}
-
-fs /dev/xy0f {
- fstype = 4.2
- opts = rw,noquota,grpid,nosuid
- freq = 25
- passno = 4
- mount /var {
- spool {
- exportfs "-access=toytown_clients:hangers_on"
- mail { }
- rwho { volname /vol/rwho sel "byte==big" }
-/*
- mail { exportfs "-access=toytown_clients:hangers_on" }
- rwho { exportfs "ro" volname /vol/rwho sel "byte==big" }
-*/
- }
- clients {
- archimedes { exportfs "-access=archimedes,root=archimedes" }
- archimedes.tmp { exportfs "-access=archimedes,root=archimedes" }
- aver { exportfs "-access=aver,root=aver" }
- aver.tmp { exportfs "-access=aver,root=aver" }
- bigears { exportfs "-access=bigears,root=bigears" }
- bigears.tmp { exportfs "-access=bigears,root=bigears" }
- diadem { exportfs "-access=diadem,root=diadem" }
- diadem.tmp { exportfs "-access=diadem,root=diadem" }
- montague { exportfs "-access=montague,root=montague" }
- montague.tmp { exportfs "-access=montague,root=montague" }
- noddy { exportfs "-access=noddy,root=noddy" }
- noddy.tmp { exportfs "-access=noddy,root=noddy" }
- pcplod { exportfs "-access=pcplod,root=pcplod" }
- pcplod.tmp { exportfs "-access=pcplod,root=pcplod" }
- samson { exportfs "-access=samson,root=samson" }
- samson.tmp { exportfs "-access=samson,root=samson" }
- turing { exportfs "-access=turing,root=turing" }
- turing.tmp { exportfs "-access=turing,root=turing" }
- }
- }
-}
-
-fs /dev/xy0d {
- fstype = 4.2
- opts = rw,noquota,grpid,nosuid
- freq = 25
- passno = 3
- mount /export {
- exec {
- sun3 { exportfs "-access=toytown_clients:hangers_on:pythagoras" }
- }
- root {
- archimedes { exportfs "-access=archimedes,root=archimedes" }
- aver { exportfs "-access=aver,root=aver" }
- bigears { exportfs "-access=bigears,root=bigears" }
- diadem { exportfs "-access=diadem,root=diadem" }
- montague { exportfs "-access=montague,root=montague" }
- noddy { exportfs "-access=noddy,root=noddy" }
- pcplod { exportfs "-access=pcplod,root=pcplod" }
- samson { exportfs "-access=samson,root=samson" }
- turing { exportfs "-access=turing,root=turing" }
- }
- swap {
- archimedes { exportfs "-access=archimedes,root=archimedes" }
- aver { exportfs "-access=aver,root=aver" }
- bigears { exportfs "-access=bigears,root=bigears" }
- diadem { exportfs "-access=diadem,root=diadem" }
- montague { exportfs "-access=montague,root=montague" }
- noddy { exportfs "-access=noddy,root=noddy" }
- pcplod { exportfs "-access=pcplod,root=pcplod" }
- samson { exportfs "-access=samson,root=samson" }
- turing { exportfs "-access=turing,root=turing" }
- }
- }
-}
-
-fs /dev/xy0b {
- fstype = swap
-}
-
-fs /dev/xy1b {
- fstype = swap
-}
-
-mount /home/ganymede opts rw,grpid,nosuid,bg,intr
-mount /home/achilles opts rw,grpid,nosuid,bg,intr
-mount /usr/src from achilles.doc.ic.ac.uk opts rw,grpid,nosuid,bg,intr
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/truth.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/truth.doc.ic.ac.uk
deleted file mode 100644
index 01392799c19..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/truth.doc.ic.ac.uk
+++ /dev/null
@@ -1,9 +0,0 @@
-host truth.doc.ic.ac.uk
-
-mount /export/exec/sun4 from achilles.doc.ic.ac.uk as /usr opts "rw,grpid,intr"
-mount /export/root/truth from achilles.doc.ic.ac.uk as / opts "rw,grpid,intr"
-mount /export/swap/truth from achilles.doc.ic.ac.uk fstype swap as swap opts swap
-mount /var/clients/truth.tmp from achilles.doc.ic.ac.uk as /tmp opts "rw,nosuid,grpid,intr"
-mount /var/clients/truth from achilles.doc.ic.ac.uk as /var opts "rw,nosuid,grpid,intr"
-mount /var/spool/mail from achilles.doc.ic.ac.uk as /var/spool/mail opts "rw,nosuid,grpid,intr"
-mount /usr/src from achilles.doc.ic.ac.uk as /usr/src opts "rw,nosuid,grpid,intr,bg"
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun1.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun1.doc.ic.ac.uk
deleted file mode 100644
index ff5016cf1b9..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun1.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun1,doc.ic.ac.uk,tsunfs.doc.ic.ac.uk,gould.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun10.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun10.doc.ic.ac.uk
deleted file mode 100644
index 2496cdb3a0a..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun10.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun10,doc.ic.ac.uk,tsunfs.doc.ic.ac.uk,gould.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun11.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun11.doc.ic.ac.uk
deleted file mode 100644
index d6e7b9d685a..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun11.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun11,doc.ic.ac.uk,tsunfs.doc.ic.ac.uk,gould.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun12.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun12.doc.ic.ac.uk
deleted file mode 100644
index a8439bbab39..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun12.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun12,doc.ic.ac.uk,tsunfs.doc.ic.ac.uk,gould.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun13.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun13.doc.ic.ac.uk
deleted file mode 100644
index 44e495689c3..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun13.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun13,doc.ic.ac.uk,tsunfs.doc.ic.ac.uk,gould.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun14.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun14.doc.ic.ac.uk
deleted file mode 100644
index 66a50516cde..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun14.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun14,doc.ic.ac.uk,tsunfs.doc.ic.ac.uk,gould.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun15.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun15.doc.ic.ac.uk
deleted file mode 100644
index 3246df37324..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun15.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun15,doc.ic.ac.uk,tsunfs.doc.ic.ac.uk,gould.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun16.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun16.doc.ic.ac.uk
deleted file mode 100644
index 4ab7bd0e6c2..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun16.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun16,doc.ic.ac.uk,pelican.doc.ic.ac.uk,pelican.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun17.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun17.doc.ic.ac.uk
deleted file mode 100644
index 11ef757bc16..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun17.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun17,doc.ic.ac.uk,pelican.doc.ic.ac.uk,pelican.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun18.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun18.doc.ic.ac.uk
deleted file mode 100644
index fbdf8798323..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun18.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun18,doc.ic.ac.uk,pelican.doc.ic.ac.uk,pelican.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun19.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun19.doc.ic.ac.uk
deleted file mode 100644
index da9aba84dbc..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun19.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun19,doc.ic.ac.uk,pelican.doc.ic.ac.uk,pelican.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun2.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun2.doc.ic.ac.uk
deleted file mode 100644
index b6fca7790b6..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun2.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun2,doc.ic.ac.uk,tsunfs.doc.ic.ac.uk,gould.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun3.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun3.doc.ic.ac.uk
deleted file mode 100644
index e40bd16ffa5..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun3.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun3,doc.ic.ac.uk,tsunfs.doc.ic.ac.uk,gould.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun4.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun4.doc.ic.ac.uk
deleted file mode 100644
index cd973580b41..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun4.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun4,doc.ic.ac.uk,tsunfs.doc.ic.ac.uk,gould.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun5.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun5.doc.ic.ac.uk
deleted file mode 100644
index 3a8c7e20c47..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun5.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun5,doc.ic.ac.uk,tsunfs.doc.ic.ac.uk,gould.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun6.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun6.doc.ic.ac.uk
deleted file mode 100644
index 4c6ea76644c..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun6.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun6,doc.ic.ac.uk,tsunfs.doc.ic.ac.uk,gould.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun7.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun7.doc.ic.ac.uk
deleted file mode 100644
index 9df32a9413c..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun7.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun7,doc.ic.ac.uk,tsunfs.doc.ic.ac.uk,gould.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun8.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun8.doc.ic.ac.uk
deleted file mode 100644
index e2b5e1f133e..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun8.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun8,doc.ic.ac.uk,tsunfs.doc.ic.ac.uk,gould.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsun9.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsun9.doc.ic.ac.uk
deleted file mode 100644
index e82e815ddf8..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsun9.doc.ic.ac.uk
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../csg_sun3"
-
-CSG_SUN3(tsun9,doc.ic.ac.uk,tsunfs.doc.ic.ac.uk,gould.doc.ic.ac.uk)
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/tsunfs.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/tsunfs.doc.ic.ac.uk
deleted file mode 100644
index 9955a45e592..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/tsunfs.doc.ic.ac.uk
+++ /dev/null
@@ -1,211 +0,0 @@
-// mkfsinfo for tsunfs
-// $Id: tsunfs.doc.ic.ac.uk,v 1.1 1995/10/18 08:47:21 deraadt Exp $
-
-host tsunfs.doc.ic.ac.uk
-
-/*
-arch sun3
-os sos4
-cluster csg
-dumphost flamingo.doc.ic.ac.uk
-*/
-
-#define FSTYPE_UFS 4.2
-#define DEFAULT_OPTS rw,noquota,nosuid,grpid
-
-// swap
-fs /dev/xy0b {
- fstype = swap
-}
-
-// root
-fs /dev/xy0a {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- passno = 1
- freq = 1
- dumpset = csg_sun3_vax
- mount / {}
-}
-
-// usr
-fs /dev/xy0f {
- fstype = FSTYPE_UFS
- opts = rw,grpid
- freq = 1
- passno = 2
- dumpset = csg_sun3_vax
- mount /usr {}
-}
-
-// var
-fs /dev/xy0e {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 4
- dumpset = csg_sun3_vax
- mount /var {
- mmdf {
- exportfs "-access=teach_hosts,root=\
- tsun1.doc.ic.ac.uk:\
- tsun2.doc.ic.ac.uk:\
- tsun3.doc.ic.ac.uk:\
- tsun4.doc.ic.ac.uk:\
- tsun5.doc.ic.ac.uk:\
- tsun6.doc.ic.ac.uk:\
- tsun7.doc.ic.ac.uk:\
- tsun8.doc.ic.ac.uk:\
- tsun9.doc.ic.ac.uk:\
- tsun10.doc.ic.ac.uk:\
- tsun11.doc.ic.ac.uk:\
- tsun12.doc.ic.ac.uk:\
- tsun13.doc.ic.ac.uk:\
- tsun14.doc.ic.ac.uk:\
- tsun15.doc.ic.ac.uk:\
- ssun1.doc.ic.ac.uk:\
- whoops.doc.ic.ac.uk:\
- "
- }
- }
-}
-
-// root filesystems for diskless clients
-fs /dev/xy0d {
- fstype = FSTYPE_UFS
- opts = rw,grpid
- freq = 1
- passno = 3
- mount /export/roots {
- tsun1 {
- volname /vol/export/roots/tsun1
- exportfs "-root=tsun1.doc.ic.ac.uk,-access=tsun1.doc.ic.ac.uk"
- }
- tsun2 {
- volname /vol/export/roots/tsun2
- exportfs "-root=tsun2.doc.ic.ac.uk,-access=tsun2.doc.ic.ac.uk"
- }
- tsun3 {
- volname /vol/export/roots/tsun3
- exportfs "-root=tsun3.doc.ic.ac.uk,-access=tsun3.doc.ic.ac.uk"
- }
- tsun4 {
- volname /vol/export/roots/tsun4
- exportfs "-root=tsun4.doc.ic.ac.uk,-access=tsun4.doc.ic.ac.uk"
- }
- tsun5 {
- volname /vol/export/roots/tsun5
- exportfs "-root=tsun5.doc.ic.ac.uk,-access=tsun5.doc.ic.ac.uk"
- }
- tsun6 {
- volname /vol/export/roots/tsun6
- exportfs "-root=tsun6.doc.ic.ac.uk,-access=tsun6.doc.ic.ac.uk"
- }
- tsun7 {
- volname /vol/export/roots/tsun7
- exportfs "-root=tsun7.doc.ic.ac.uk,-access=tsun7.doc.ic.ac.uk"
- }
- tsun8 {
- volname /vol/export/roots/tsun8
- exportfs "-root=tsun8.doc.ic.ac.uk,-access=tsun8.doc.ic.ac.uk"
- }
- tsun9 {
- volname /vol/export/roots/tsun9
- exportfs "-root=tsun9.doc.ic.ac.uk,-access=tsun9.doc.ic.ac.uk"
- }
- tsun10 {
- volname /vol/export/roots/tsun10
- exportfs "-root=tsun10.doc.ic.ac.uk,-access=tsun10.doc.ic.ac.uk"
- }
- tsun11 {
- volname /vol/export/roots/tsun11
- exportfs "-root=tsun11.doc.ic.ac.uk,-access=tsun11.doc.ic.ac.uk"
- }
- tsun12 {
- volname /vol/export/roots/tsun12
- exportfs "-root=tsun12.doc.ic.ac.uk,-access=tsun12.doc.ic.ac.uk"
- }
- tsun13 {
- volname /vol/export/roots/tsun13
- exportfs "-root=tsun13.doc.ic.ac.uk,-access=tsun13.doc.ic.ac.uk"
- }
- tsun14 {
- volname /vol/export/roots/tsun14
- exportfs "-root=tsun14.doc.ic.ac.uk,-access=tsun14.doc.ic.ac.uk"
- }
- tsun15 {
- volname /vol/export/roots/tsun15
- exportfs "-root=tsun15.doc.ic.ac.uk,-access=tsun15.doc.ic.ac.uk"
- }
- }
-}
-
-// swap for diskless clients
-fs /dev/xy1c {
- fstype = FSTYPE_UFS
- opts = DEFAULT_OPTS
- freq = 1
- passno = 5
- mount /export/swaps {
- tsun1 {
- volname /vol/export/swaps/tsun1
- exportfs "-root=tsun1.doc.ic.ac.uk,-access=tsun1.doc.ic.ac.uk"
- }
- tsun2 {
- volname /vol/export/swaps/tsun2
- exportfs "-root=tsun2.doc.ic.ac.uk,-access=tsun2.doc.ic.ac.uk"
- }
- tsun3 {
- volname /vol/export/swaps/tsun3
- exportfs "-root=tsun3.doc.ic.ac.uk,-access=tsun3.doc.ic.ac.uk"
- }
- tsun4 {
- volname /vol/export/swaps/tsun4
- exportfs "-root=tsun4.doc.ic.ac.uk,-access=tsun4.doc.ic.ac.uk"
- }
- tsun5 {
- volname /vol/export/swaps/tsun5
- exportfs "-root=tsun5.doc.ic.ac.uk,-access=tsun5.doc.ic.ac.uk"
- }
- tsun6 {
- volname /vol/export/swaps/tsun6
- exportfs "-root=tsun6.doc.ic.ac.uk,-access=tsun6.doc.ic.ac.uk"
- }
- tsun7 {
- volname /vol/export/swaps/tsun7
- exportfs "-root=tsun7.doc.ic.ac.uk,-access=tsun7.doc.ic.ac.uk"
- }
- tsun8 {
- volname /vol/export/swaps/tsun8
- exportfs "-root=tsun8.doc.ic.ac.uk,-access=tsun8.doc.ic.ac.uk"
- }
- tsun9 {
- volname /vol/export/swaps/tsun9
- exportfs "-root=tsun9.doc.ic.ac.uk,-access=tsun9.doc.ic.ac.uk"
- }
- tsun10 {
- volname /vol/export/swaps/tsun10
- exportfs "-root=tsun10.doc.ic.ac.uk,-access=tsun10.doc.ic.ac.uk"
- }
- tsun11 {
- volname /vol/export/swaps/tsun11
- exportfs "-root=tsun11.doc.ic.ac.uk,-access=tsun11.doc.ic.ac.uk"
- }
- tsun12 {
- volname /vol/export/swaps/tsun12
- exportfs "-root=tsun12.doc.ic.ac.uk,-access=tsun12.doc.ic.ac.uk"
- }
- tsun13 {
- volname /vol/export/swaps/tsun13
- exportfs "-root=tsun13.doc.ic.ac.uk,-access=tsun13.doc.ic.ac.uk"
- }
- tsun14 {
- volname /vol/export/swaps/tsun14
- exportfs "-root=tsun14.doc.ic.ac.uk,-access=tsun14.doc.ic.ac.uk"
- }
- tsun15 {
- volname /vol/export/swaps/tsun15
- exportfs "-root=tsun15.doc.ic.ac.uk,-access=tsun15.doc.ic.ac.uk"
- }
- }
-}
diff --git a/usr.sbin/amd/fsinfo/conf/hosts/whoops.doc.ic.ac.uk b/usr.sbin/amd/fsinfo/conf/hosts/whoops.doc.ic.ac.uk
deleted file mode 100644
index c977f1c7cba..00000000000
--- a/usr.sbin/amd/fsinfo/conf/hosts/whoops.doc.ic.ac.uk
+++ /dev/null
@@ -1,21 +0,0 @@
-// $Id: whoops.doc.ic.ac.uk,v 1.1 1995/10/18 08:47:21 deraadt Exp $
-// sm's bastardised csg_sun3
-// note that no /var/spool/rwho is mounted as we now expect amd to do this as /vol/rwho
-
-#define HOST whoops
-#define DOMAIN doc.ic.ac.uk
-#define BOOT gould.doc.ic.ac.uk
-#define EXEC gould.doc.ic.ac.uk
-#define MAIL tsunfs.doc.ic.ac.uk
-
-// a sun3
-host HOST.DOMAIN
-
-mount /vol/export/roots/HOST as / from BOOT opts rw,grpid,hard,intr
-mount /vol/export/swaps/HOST fstype swap as swap from BOOT opts swap
-mount /vol/export/exec/sun3 as /usr from EXEC opts ro,grpid,hard,intr
-mount /vol/export/misc/crash/HOST as /var/crash/HOST from EXEC opts rw,nosuid,grpid,hard,intr
-mount /vol/export/misc/tmp/HOST as /tmp from EXEC opts rw,nosuid,grpid,hard,intr
-mount /vol/export/misc/usr.tmp/HOST as /var/tmp from EXEC opts rw,nosuid,grpid,hard,intr
-mount /var/mmdf from MAIL opts rw,nosuid,grpid,hard,intr
-
diff --git a/usr.sbin/amd/fsinfo/conf/users b/usr.sbin/amd/fsinfo/conf/users
deleted file mode 100644
index 9dc83d9c5d4..00000000000
--- a/usr.sbin/amd/fsinfo/conf/users
+++ /dev/null
@@ -1,106 +0,0 @@
-audit -> /etc/security/audit
-bin -> /bin
-daemon -> /
-games -> /usr/games
-ingres -> /usr/ingres
-news -> /var/spool/news
-nobody -> /nonexistent
-root -> /
-sync -> /
-sys -> /
-sysdiag -> /usr/diag/sysdiag
-uucp -> /var/spool/uucppublic
-acwf = /home/toytown/others/acwf
-adh = /home/dylan/dk2/adh
-ae = /home/toytown/samson/ae
-aj = /home/toytown/samson/aj
-athena = /vol/src/athena
-bh = /home/toytown/jim/bh
-bp = /home/toytown/others/bp
-brg = /home/gummo/users/brg
-bt = /home/toytown/samson/bt
-ca = /home/toytown/diadem/ca
-ccm = /home/toytown/ai/ccm
-chlo = /home/toytown/samson/chlo
-clh = /home/toytown/ai/clh
-cr = /home/toytown/samson/cr
-cw = /home/toytown/genesis/cw
-dds = /home/toytown/genesis/dds
-dg = /home/toytown/dov/dg
-dgb = /home/dylan/dk2/dgb
-dme = /home/achilles/dme
-dp = /home/gummo/usersdiana
-ds = /home/toytown/ai/ds
-dwj = /home/achilles/dwj
-eaa = /home/toytown/dov/eaa
-esh = /home/toytown/ai/esh
-fcs = /home/ganymede/fcs
-fst = /home/dylan/dk2/fst
-glb = /home/toytown/ai/glb
-grace = /home/toytown/others/grace
-guest = /home/toytown/others/guest
-hd = /home/toytown/others/hd
-hf = /home/toytown/genesis/hf
-iccp = /home/toytown/samson/iccp
-ids = /home/toytown/samson/ids
-ih = /home/toytown/others/ih
-ja = /home/toytown/ai/ja
-jfc = /home/toytown/jim/jfc
-jg = /home/toytown/genesis/jg
-jjc = /home/toytown/genesis/jjc
-js = /home/toytown/samson/js
-jsp = /home/achilles/jsp
-jvp = /home/toytown/jim/jvp
-kdr = /home/dylan/dk2/kdr
-kevin = /home/toytown/others/kpt
-kpt = /home/toytown/others/kpt
-ksa = /home/toytown/ai/ksa
-lkcl = /home/dylan/dk2/lkcl
-ll = /home/toytown/dov/ll
-ll1 = /home/toytown/others/ll1
-lmjm = /home/toytown/others/lmjm
-lsh = /home/toytown/ai/lsh
-mb = /home/toytown/jim/mb
-md = /home/achilles/md
-mdr = /home/achilles/mdr
-mg = /home/ganymede/mg
-mjh = /home/toytown/others/mjh
-mrs = /home/achilles/mrs
-mwg = /home/achilles/mwg
-mwt = /home/achilles/mwt
-nd = /home/gummo/users/nd
-njw = /home/dylan/dk2/njw
-ok = /home/ganymede/ok
-pah = /home/toytown/jim/pah
-pdg = /home/toytown/samson/pdg
-phjk = /home/toytown/ai/phjk
-pm = /home/achilles/pm
-pm2 = /home/dylan/dk2/pm2
-ps = /home/toytown/genesis/ps
-pt = /home/toytown/dov/pt
-pvr = /home/toytown/jim/pvr
-rgc = /home/toytown/jim/rgc
-rjc = /home/toytown/jim/rjc
-rjq = /home/achilles/rjq
-sa = /home/toytown/samson/sa
-shb = /home/toytown/others/shb
-shc = /home/dylan/dk2/shc
-sjk = /home/toytown/jim/sjk
-sjl2 = /home/achilles/sjl2
-sjv = /home/ganymede/sjv
-sm = /home/toytown/others/sm
-sme = /home/ganymede/sme
-sph = /home/toytown/ai/sph
-ssp = /home/toytown/others/ssp
-sw = /home/toytown/others/sw
-sza = /home/ganymede/sza
-teb = /home/dylan/dk2/teb
-thp = /home/achilles/thp
-tm = /home/toytown/ai/tm
-tsem = /home/toytown/genesis/tsem
-umacd20 = /home/ganymede/umacd20
-wmvh = /home/dylan/dk2/wmvh
-wrdo = /home/ganymede/wrdo
-ygal = /home/toytown/samson/ygal
-zmact03 = /home/toytown/jim/zmact03
-zmacy26 = /home/toytown/jim/zmacy26
diff --git a/usr.sbin/amd/fsinfo/fsi_analyze.c b/usr.sbin/amd/fsinfo/fsi_analyze.c
deleted file mode 100644
index 97b2f26fd0d..00000000000
--- a/usr.sbin/amd/fsinfo/fsi_analyze.c
+++ /dev/null
@@ -1,640 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)fsi_analyze.c 8.1 (Berkeley) 6/6/93
- * $Id: fsi_analyze.c,v 1.5 2003/06/02 23:36:52 millert Exp $
- */
-
-/*
- * Analyze filesystem declarations
- *
- * Note: most of this is magic!
- */
-
-#include "../fsinfo/fsinfo.h"
-
-char *disk_fs_strings[] = {
- "fstype", "opts", "dumpset", "passno", "freq", "mount", "log", 0,
-};
-
-char *mount_strings[] = {
- "volname", "exportfs", 0,
-};
-
-char *fsmount_strings[] = {
- "as", "volname", "fstype", "opts", "from", 0,
-};
-
-char *host_strings[] = {
- "host", "netif", "config", "arch", "cluster", "os", 0,
-};
-
-char *ether_if_strings[] = {
- "inaddr", "netmask", "hwaddr", 0,
-};
-
-/*
- * Strip off the trailing part of a domain
- * to produce a short-form domain relative
- * to the local host domain.
- * Note that this has no effect if the domain
- * names do not have the same number of
- * components. If that restriction proves
- * to be a problem then the loop needs recoding
- * to skip from right to left and do partial
- * matches along the way -- ie more expensive.
- */
-void domain_strip(otherdom, localdom)
-char *otherdom, *localdom;
-{
-#ifdef PARTIAL_DOMAINS
- char *p1 = otherdom-1;
- char *p2 = localdom-1;
-
- do {
- if (p1 = strchr(p1+1, '.'))
- if (p2 = strchr(p2+1, '.'))
- if (STREQ(p1+1, p2+1)) {
- *p1 = '\0';
- break;
- }
- } while (p1 && p2);
-#else
- char *p1, *p2;
-
- if ((p1 = strchr(otherdom, '.')) &&
- (p2 = strchr(localdom, '.')) &&
- (strcmp(p1+1, p2+1) == 0))
- *p1 = '\0';
-#endif /* PARTIAL_DOMAINS */
-}
-
-/*
- * Take a little-endian domain name and
- * transform into a big-endian Un*x pathname.
- * For example: kiska.doc.ic -> ic/doc/kiska
- */
-static char *compute_hostpath(hn)
-char *hn;
-{
- char *p = strdup(hn);
- char *d;
- char path[MAXPATHLEN];
- size_t len = strlen(p) + 1;
-
- domain_strip(p, hostname);
- path[0] = '\0';
-
- do {
- d = strrchr(p, '.');
- if (d) {
- *d = 0;
- strlcat(path, d+1, sizeof(path));
- strlcat(path, "/", sizeof(path));
- } else {
- strlcat(path, p, sizeof(path));
- }
- } while (d);
-
- log("hostpath of '%s' is '%s'", hn, path);
-
- strlcpy(p, path, len);
- return p;
-}
-
-static dict_ent *find_volname(nn)
-char *nn;
-{
- dict_ent *de;
- char *p = strdup(nn);
- char *q;
-
- do {
- log("Searching for volname %s", p);
- de = dict_locate(dict_of_volnames, p);
- q = strrchr(p, '/');
- if (q) *q = '\0';
- } while (!de && q);
-
- free(p);
- return de;
-}
-
-static show_required(l, mask, info, hostname, strings)
-ioloc *l;
-int mask;
-char *info;
-char *hostname;
-char *strings[];
-{
- int i;
- log("mask left for %s:%s is %#x", hostname, info, mask);
-
- for (i = 0; strings[i]; i++)
- if (ISSET(mask, i))
- lerror(l, "%s:%s needs field \"%s\"", hostname, info, strings[i]);
-}
-
-/*
- * Check and fill in "exportfs" details.
- * Make sure the m_exported field references
- * the most local node with an "exportfs" entry.
- */
-static int check_exportfs(q, e)
-qelem *q;
-mount *e;
-{
- mount *mp;
- int errors = 0;
-
- ITER(mp, mount, q) {
- if (ISSET(mp->m_mask, DM_EXPORTFS)) {
- if (e)
- lwarning(mp->m_ioloc, "%s has duplicate exportfs data", mp->m_name);
- mp->m_exported = mp;
- if (!ISSET(mp->m_mask, DM_VOLNAME))
- set_mount(mp, DM_VOLNAME, strdup(mp->m_name));
- } else {
- mp->m_exported = e;
- }
-
- /*
- * Recursively descend the mount tree
- */
- if (mp->m_mount)
- errors += check_exportfs(mp->m_mount, mp->m_exported);
-
- /*
- * If a volume name has been specified, but this node and none
- * of its parents has been exported, report an error.
- */
- if (ISSET(mp->m_mask, DM_VOLNAME) && !mp->m_exported) {
- lerror(mp->m_ioloc, "%s has a volname but no exportfs data", mp->m_name);
- errors++;
- }
- }
-
- return errors;
-}
-
-static int analyze_dkmount_tree(q, parent, dk)
-qelem *q;
-mount *parent;
-disk_fs *dk;
-{
- mount *mp;
- int errors = 0;
-
- ITER(mp, mount, q) {
- log("Mount %s:", mp->m_name);
- if (parent) {
- char n[MAXPATHLEN];
- snprintf(n, sizeof(n), "%s/%s", parent->m_name, mp->m_name);
- if (*mp->m_name == '/')
- lerror(mp->m_ioloc, "sub-directory %s of %s starts with '/'", mp->m_name, parent->m_name);
- else if (STREQ(mp->m_name, "default"))
- lwarning(mp->m_ioloc, "sub-directory of %s is named \"default\"", parent->m_name);
- log("Changing name %s to %s", mp->m_name, n);
- free(mp->m_name);
- mp->m_name = strdup(n);
- }
- mp->m_name_len = strlen(mp->m_name);
- mp->m_parent = parent;
- mp->m_dk = dk;
- if (mp->m_mount)
- analyze_dkmount_tree(mp->m_mount, mp, dk);
- }
-
- return errors;
-}
-
-/*
- * The mount tree is a singleton list
- * containing the top-level mount
- * point for a disk.
- */
-static int analyze_dkmounts(dk, q)
-disk_fs *dk;
-qelem *q;
-{
- int errors = 0;
- mount *mp, *mp2 = 0;
- int i = 0;
-
- /*
- * First scan the list of subdirs to make
- * sure there is only one - and remember it
- */
- if (q) {
- ITER(mp, mount, q) {
- mp2 = mp;
- i++;
- }
- }
-
- /*
- * Check...
- */
- if (i < 1) {
- lerror(dk->d_ioloc, "%s:%s has no mount point", dk->d_host->h_hostname, dk->d_dev);
- return 1;
- }
- if (i > 1) {
- lerror(dk->d_ioloc, "%s:%s has more than one mount point", dk->d_host->h_hostname, dk->d_dev);
- errors++;
- }
- /*
- * Now see if a default mount point is required
- */
- if (STREQ(mp2->m_name, "default")) {
- if (ISSET(mp2->m_mask, DM_VOLNAME)) {
- char nbuf[1024];
- compute_automount_point(nbuf, sizeof(nbuf), dk->d_host, mp2->m_volname);
- free(mp2->m_name);
- mp2->m_name = strdup(nbuf);
- log("%s:%s has default mount on %s", dk->d_host->h_hostname, dk->d_dev, mp2->m_name);
- } else {
- lerror(dk->d_ioloc, "no volname given for %s:%s", dk->d_host->h_hostname, dk->d_dev);
- errors++;
- }
- }
- /*
- * Fill in the disk mount point
- */
- if (!errors && mp2 && mp2->m_name)
- dk->d_mountpt = strdup(mp2->m_name);
- else
- dk->d_mountpt = strdup("error");
-
- /*
- * Analyze the mount tree
- */
- errors += analyze_dkmount_tree(q, 0, dk);
-
- /*
- * Analyze the export tree
- */
- errors += check_exportfs(q, 0);
-
- return errors;
-}
-
-static void fixup_required_disk_info(dp)
-disk_fs *dp;
-{
- /*
- * "fstype"
- */
- if (ISSET(dp->d_mask, DF_FSTYPE)) {
- if (STREQ(dp->d_fstype, "swap")) {
- /*
- * Fixup for a swap device
- */
- if (!ISSET(dp->d_mask, DF_PASSNO)) {
- dp->d_passno = 0;
- BITSET(dp->d_mask, DF_PASSNO);
- } else if (dp->d_freq != 0) {
- lwarning(dp->d_ioloc,
- "Pass number for %s:%s is non-zero",
- dp->d_host->h_hostname, dp->d_dev);
- }
-
- /*
- * "freq"
- */
- if (!ISSET(dp->d_mask, DF_FREQ)) {
- dp->d_freq = 0;
- BITSET(dp->d_mask, DF_FREQ);
- } else if (dp->d_freq != 0) {
- lwarning(dp->d_ioloc,
- "dump frequency for %s:%s is non-zero",
- dp->d_host->h_hostname, dp->d_dev);
- }
-
- /*
- * "opts"
- */
- if (!ISSET(dp->d_mask, DF_OPTS))
- set_disk_fs(dp, DF_OPTS, strdup("swap"));
-
- /*
- * "mount"
- */
- if (!ISSET(dp->d_mask, DF_MOUNT)) {
- qelem *q = new_que();
- mount *m = new_mount();
- m->m_name = strdup("swap");
- m->m_mount = new_que();
- ins_que(&m->m_q, q->q_back);
- dp->d_mount = q;
- BITSET(dp->d_mask, DF_MOUNT);
- } else {
- lerror(dp->d_ioloc, "%s: mount field specified for swap partition", dp->d_host->h_hostname);
- }
- } else if (STREQ(dp->d_fstype, "export")) {
- /*
- * "passno"
- */
- if (!ISSET(dp->d_mask, DF_PASSNO)) {
- dp->d_passno = 0;
- BITSET(dp->d_mask, DF_PASSNO);
- } else if (dp->d_passno != 0) {
- lwarning(dp->d_ioloc,
- "pass number for %s:%s is non-zero",
- dp->d_host->h_hostname, dp->d_dev);
- }
-
- /*
- * "freq"
- */
- if (!ISSET(dp->d_mask, DF_FREQ)) {
- dp->d_freq = 0;
- BITSET(dp->d_mask, DF_FREQ);
- } else if (dp->d_freq != 0) {
- lwarning(dp->d_ioloc,
- "dump frequency for %s:%s is non-zero",
- dp->d_host->h_hostname, dp->d_dev);
- }
-
- /*
- * "opts"
- */
- if (!ISSET(dp->d_mask, DF_OPTS))
- set_disk_fs(dp, DF_OPTS, strdup("rw,defaults"));
-
- }
- }
-}
-
-static void fixup_required_mount_info(fp, de)
-fsmount *fp;
-dict_ent *de;
-{
- if (!ISSET(fp->f_mask, FM_FROM)) {
- if (de->de_count != 1) {
- lerror(fp->f_ioloc, "ambiguous mount: %s is a replicated filesystem", fp->f_volname);
- } else {
- dict_data *dd;
- mount *mp = 0;
- ITER(dd, dict_data, &de->de_q) {
- mp = (mount *) dd->dd_data;
- break;
- }
- if (!mp)
- abort();
- fp->f_ref = mp;
- set_fsmount(fp, FM_FROM, mp->m_dk->d_host->h_hostname);
- log("set: %s comes from %s", fp->f_volname, fp->f_from);
- }
- }
-
- if (!ISSET(fp->f_mask, FM_FSTYPE)) {
- set_fsmount(fp, FM_FSTYPE, strdup("nfs"));
- log("set: fstype is %s", fp->f_fstype);
- }
-
- if (!ISSET(fp->f_mask, FM_OPTS)) {
- set_fsmount(fp, FM_OPTS, strdup("rw,nosuid,grpid,defaults"));
- log("set: opts are %s", fp->f_opts);
- }
-
- if (!ISSET(fp->f_mask, FM_LOCALNAME)) {
- if (fp->f_ref) {
- set_fsmount(fp, FM_LOCALNAME, strdup(fp->f_volname));
- log("set: localname is %s", fp->f_localname);
- } else {
- lerror(fp->f_ioloc, "cannot determine localname since volname %s is not uniquely defined", fp->f_volname);
- }
- }
-}
-
-/*
- * For each disk on a host
- * analyze the mount information
- * and fill in any derivable
- * details.
- */
-static void analyze_drives(hp)
-host *hp;
-{
- qelem *q = hp->h_disk_fs;
- disk_fs *dp;
-
- ITER(dp, disk_fs, q) {
- int req;
- log("Disk %s:", dp->d_dev);
- dp->d_host = hp;
- fixup_required_disk_info(dp);
- req = ~dp->d_mask & DF_REQUIRED;
- if (req)
- show_required(dp->d_ioloc, req, dp->d_dev, hp->h_hostname, disk_fs_strings);
- analyze_dkmounts(dp, dp->d_mount);
- }
-}
-
-/*
- * Check that all static mounts make sense and
- * that the source volumes exist.
- */
-static void analyze_mounts(hp)
-host *hp;
-{
- qelem *q = hp->h_mount;
- fsmount *fp;
- int netbootp = 0;
-
- ITER(fp, fsmount, q) {
- char *p;
- char *nn = strdup(fp->f_volname);
- int req;
- dict_ent *de;
- int found = 0;
- int matched = 0;
- do {
- p = 0;
- de = find_volname(nn);
- log("Mount: %s (trying %s)", fp->f_volname, nn);
-
- if (de) {
- found = 1;
- /*
- * Check that the from field is really exporting
- * the filesystem requested.
- */
- if (ISSET(fp->f_mask, FM_FROM)) {
- dict_data *dd;
- mount *mp2 = 0;
- ITER(dd, dict_data, &de->de_q) {
- mount *mp = (mount *) dd->dd_data;
- if (STREQ(mp->m_dk->d_host->h_hostname, fp->f_from)) {
- mp2 = mp;
- break;
- }
- }
-
- if (mp2) {
- fp->f_ref = mp2;
- matched = 1;
- break;
- }
- } else {
- matched = 1;
- break;
- }
- }
- p = strrchr(nn, '/');
- if (p)
- *p = 0;
- } while (de && p);
- free(nn);
-
- if (!found) {
- lerror(fp->f_ioloc, "volname %s unknown", fp->f_volname);
- } else if (matched) {
- fixup_required_mount_info(fp, de);
- req = ~fp->f_mask & FM_REQUIRED;
- if (req) {
- show_required(fp->f_ioloc, req, fp->f_volname, hp->h_hostname,
- fsmount_strings);
- } else if (strcmp(fp->f_localname, "/") == 0) {
- hp->h_netroot = fp;
- netbootp |= FM_NETROOT;
- } else if (strcmp(fp->f_localname, "swap") == 0) {
- hp->h_netswap = fp;
- netbootp |= FM_NETSWAP;
- }
- } else {
- lerror(fp->f_ioloc, "volname %s not exported from %s", fp->f_volname,
- fp->f_from ? fp->f_from : "anywhere");
- }
- }
-
- if (netbootp && (netbootp != FM_NETBOOT))
- lerror(hp->h_ioloc, "network booting requires both root and swap areas");
-}
-
-void analyze_hosts(q)
-qelem *q;
-{
- host *hp;
-
- show_area_being_processed("analyze hosts", 5);
-
- /*
- * Check all drives
- */
- ITER(hp, host, q) {
- log("disks on host %s", hp->h_hostname);
- show_new("ana-host");
- hp->h_hostpath = compute_hostpath(hp->h_hostname);
-
- if (hp->h_disk_fs)
- analyze_drives(hp);
-
- }
-
- show_area_being_processed("analyze mounts", 5);
-
- /*
- * Check static mounts
- */
- ITER(hp, host, q) {
- log("mounts on host %s", hp->h_hostname);
- show_new("ana-mount");
- if (hp->h_mount)
- analyze_mounts(hp);
-
- }
-}
-
-/*
- * Check an automount request
- */
-static void analyze_automount(ap)
-automount *ap;
-{
- dict_ent *de = find_volname(ap->a_volname);
- if (de) {
- ap->a_mounted = de;
- } else {
- if (STREQ(ap->a_volname, ap->a_name))
- lerror(ap->a_ioloc, "unknown volname %s automounted", ap->a_volname);
- else
- lerror(ap->a_ioloc, "unknown volname %s automounted on %s", ap->a_volname, ap->a_name);
- }
-}
-
-static void analyze_automount_tree(q, pref, lvl)
-qelem *q;
-char *pref;
-int lvl;
-{
- automount *ap;
-
- ITER(ap, automount, q) {
- char nname[1024];
- if (lvl > 0 || ap->a_mount)
- if (ap->a_name[1] && strchr(ap->a_name+1, '/'))
- lerror(ap->a_ioloc, "not allowed '/' in a directory name");
- snprintf(nname, sizeof(nname), "%s/%s", pref, ap->a_name);
- free(ap->a_name);
- ap->a_name = strdup(nname[1] == '/' ? nname+1 : nname);
- log("automount point %s:", ap->a_name);
- show_new("ana-automount");
- if (ap->a_mount) {
- analyze_automount_tree(ap->a_mount, ap->a_name, lvl+1);
- } else if (ap->a_volname) {
- log("\tautomount from %s", ap->a_volname);
- analyze_automount(ap);
- } else if (ap->a_symlink) {
- log("\tsymlink to %s", ap->a_symlink);
- } else {
- ap->a_volname = strdup(ap->a_name);
- log("\timplicit automount from %s", ap->a_volname);
- analyze_automount(ap);
- }
- }
-}
-
-void analyze_automounts(q)
-qelem *q;
-{
- auto_tree *tp;
-
- show_area_being_processed("analyze automount", 5);
- /*
- * q is a list of automounts
- */
- ITER(tp, auto_tree, q)
- analyze_automount_tree(tp->t_mount, "", 0);
-}
diff --git a/usr.sbin/amd/fsinfo/fsi_data.h b/usr.sbin/amd/fsinfo/fsi_data.h
deleted file mode 100644
index efbad7d8303..00000000000
--- a/usr.sbin/amd/fsinfo/fsi_data.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)fsi_data.h 8.1 (Berkeley) 6/6/93
- * $Id: fsi_data.h,v 1.3 2003/06/02 23:36:52 millert Exp $
- */
-
-typedef struct auto_tree auto_tree;
-typedef struct automount automount;
-typedef struct dict dict;
-typedef struct dict_data dict_data;
-typedef struct dict_ent dict_ent;
-typedef struct disk_fs disk_fs;
-typedef struct ether_if ether_if;
-typedef struct fsmount fsmount;
-typedef struct host host;
-typedef struct ioloc ioloc;
-typedef struct mount mount;
-typedef struct qelem qelem;
-
-/*
- * Linked lists...
- */
-struct qelem {
- qelem *q_forw;
- qelem *q_back;
-};
-
-/*
- * Automount tree
- */
-struct automount {
- qelem a_q;
- ioloc *a_ioloc;
- char *a_name; /* Automount key */
- char *a_volname; /* Equivalent volume to be referenced */
- char *a_symlink; /* Symlink representation */
- qelem *a_mount; /* Tree representation */
- dict_ent *a_mounted;
-};
-
-/*
- * List of automount trees
- */
-struct auto_tree {
- qelem t_q;
- ioloc *t_ioloc;
- char *t_defaults;
- qelem *t_mount;
-};
-
-/*
- * A host
- */
-struct host {
- qelem q;
- int h_mask;
- ioloc *h_ioloc;
- fsmount *h_netroot, *h_netswap;
-#define HF_HOST 0
- char *h_hostname; /* The full name of the host */
- char *h_lochost; /* The name of the host with local domains stripped */
- char *h_hostpath; /* The filesystem path to the host (cf compute_hostpath) */
-#define HF_ETHER 1
- qelem *h_ether;
-#define HF_CONFIG 2
- qelem *h_config;
-#define HF_ARCH 3
- char *h_arch;
-#define HF_CLUSTER 4
- char *h_cluster;
-#define HF_OS 5
- char *h_os;
- qelem *h_disk_fs;
- qelem *h_mount;
-};
-
-/*
- * An ethernet interface
- */
-struct ether_if {
- qelem e_q;
- int e_mask;
- ioloc *e_ioloc;
- char *e_if;
-#define EF_INADDR 0
- struct in_addr e_inaddr;
-#define EF_NETMASK 1
- u_int32_t e_netmask;
-#define EF_HWADDR 2
- char *e_hwaddr;
-};
-
-/*
- * Disk filesystem structure.
- *
- * If the DF_* numbers are changed
- * disk_fs_strings in analyze.c will
- * need updating.
- */
-struct disk_fs {
- qelem d_q;
- int d_mask;
- ioloc *d_ioloc;
- host *d_host;
- char *d_mountpt;
- char *d_dev;
-#define DF_FSTYPE 0
- char *d_fstype;
-#define DF_OPTS 1
- char *d_opts;
-#define DF_DUMPSET 2
- char *d_dumpset;
-#define DF_PASSNO 3
- int d_passno;
-#define DF_FREQ 4
- int d_freq;
-#define DF_MOUNT 5
- qelem *d_mount;
-#define DF_LOG 6
- char *d_log;
-};
-#define DF_REQUIRED ((1<<DF_FSTYPE)|(1<<DF_OPTS)|(1<<DF_PASSNO)|(1<<DF_MOUNT))
-
-/*
- * A mount tree
- */
-struct mount {
- qelem m_q;
- ioloc *m_ioloc;
- int m_mask;
-#define DM_VOLNAME 0
- char *m_volname;
-#define DM_EXPORTFS 1
- char *m_exportfs;
-#define DM_SEL 2
- char *m_sel;
- char *m_name;
- int m_name_len;
- mount *m_parent;
- disk_fs *m_dk;
- mount *m_exported;
- qelem *m_mount;
-};
-
-/*
- * Additional filesystem mounts
- *
- * If the FM_* numbers are changed
- * disk_fs_strings in analyze.c will
- * need updating.
- */
-struct fsmount {
- qelem f_q;
- mount *f_ref;
- ioloc *f_ioloc;
- int f_mask;
-#define FM_LOCALNAME 0
- char *f_localname;
-#define FM_VOLNAME 1
- char *f_volname;
-#define FM_FSTYPE 2
- char *f_fstype;
-#define FM_OPTS 3
- char *f_opts;
-#define FM_FROM 4
- char *f_from;
-};
-#define FM_REQUIRED ((1<<FM_VOLNAME)|(1<<FM_FSTYPE)|(1<<FM_OPTS)|(1<<FM_FROM)|(1<<FM_LOCALNAME))
-#define FM_NETROOT 0x01
-#define FM_NETSWAP 0x02
-#define FM_NETBOOT (FM_NETROOT|FM_NETSWAP)
-
-#define DICTHASH 5
-struct dict_ent {
- dict_ent *de_next;
- char *de_key;
- int de_count;
- qelem de_q;
-};
-
-/*
- * Dictionaries ...
- */
-struct dict_data {
- qelem dd_q;
- char *dd_data;
-};
-
-struct dict {
- dict_ent *de[DICTHASH];
-};
-
-/*
- * Source text location for error reports
- */
-struct ioloc {
- int i_line;
- char *i_file;
-};
diff --git a/usr.sbin/amd/fsinfo/fsi_dict.c b/usr.sbin/amd/fsinfo/fsi_dict.c
deleted file mode 100644
index c265b1262e6..00000000000
--- a/usr.sbin/amd/fsinfo/fsi_dict.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)fsi_dict.c 8.1 (Berkeley) 6/6/93
- * $Id: fsi_dict.c,v 1.2 2003/06/02 23:36:52 millert Exp $
- */
-
-/*
- * Dictionary support
- */
-
-#include "../fsinfo/fsinfo.h"
-
-static int dict_hash(k)
-char *k;
-{
- unsigned int h;
-
- for (h = 0; *k; h += *k++)
- ;
- return h % DICTHASH;
-}
-
-dict *new_dict()
-{
- dict *dp = ALLOC(dict);
- return dp;
-}
-
-static void dict_add_data(de, v)
-dict_ent *de;
-char *v;
-{
- dict_data *dd = ALLOC(dict_data);
- dd->dd_data = v;
- ins_que(&dd->dd_q, de->de_q.q_back);
- de->de_count++;
-}
-
-static dict_ent *new_dict_ent(k)
-char *k;
-{
- dict_ent *de = ALLOC(dict_ent);
- de->de_key = k;
- init_que(&de->de_q);
- return de;
-}
-
-dict_ent *dict_locate(dp, k)
-dict *dp;
-char *k;
-{
- dict_ent *de = dp->de[dict_hash(k)];
- while (de && !STREQ(de->de_key, k))
- de = de->de_next;
-
- return de;
-}
-
-void dict_add(dp, k, v)
-dict *dp;
-char *k, *v;
-{
- dict_ent *de = dict_locate(dp, k);
- if (!de) {
- dict_ent **dep = &dp->de[dict_hash(k)];
- de = new_dict_ent(k);
- de->de_next = *dep;
- *dep = de;
- }
- dict_add_data(de, v);
-}
-
-int dict_iter(dp, fn)
-dict *dp;
-int (*fn)();
-{
- int i;
- int errors = 0;
-
- for (i = 0; i < DICTHASH; i++) {
- dict_ent *de = dp->de[i];
- while (de) {
- errors += (*fn)(&de->de_q);
- de = de->de_next;
- }
- }
- return errors;
-}
diff --git a/usr.sbin/amd/fsinfo/fsi_gram.y b/usr.sbin/amd/fsinfo/fsi_gram.y
deleted file mode 100644
index 533b437ffb4..00000000000
--- a/usr.sbin/amd/fsinfo/fsi_gram.y
+++ /dev/null
@@ -1,388 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)fsi_gram.y 8.1 (Berkeley) 6/6/93
- * $Id: fsi_gram.y,v 1.2 2003/06/02 23:36:52 millert Exp $
- */
-
-%{
-#include "../fsinfo/fsinfo.h"
-#include <stdio.h>
-
-extern qelem *list_of_hosts, *list_of_automounts;
-%}
-
-%union {
- auto_tree *a;
- disk_fs *d;
- ether_if *e;
- host *h;
- qelem *q;
- char *s;
- mount *m;
- fsmount *f;
-}
-
-%token tARCH
-%token tAS
-%token tAUTOMOUNT
-%token tCLUSTER
-%token tCONFIG
-%token tDUMPSET
-%token tEQ
-%token tEXPORTFS
-%token tFREQ
-%token tFROM
-%token tFS
-%token tFSTYPE
-%token tHWADDR
-%token tINADDR
-%token tHOST
-%token tLOCALHOST
-%token tLOG
-%token tMOUNT
-%token tNETMASK
-%token tNETIF
-%token tVOLNAME
-%token tOPTS
-%token tOS
-%token tPASSNO
-%token tSEL
-%token <s> tSTR
-
-%start list_of_hosts
-
-%type <a> automount
-%type <q> automount_tree
-%type <e> ether_attr
-%type <m> dir_tree_info
-%type <d> filesystem fs_info_list
-%type <h> host host_attr host_attr_list
-%type <q> list_of_hosts list_of_filesystems list_of_mounts dir_tree
-%type <f> localinfo_list
-%type <s> opt_auto_opts
-
-%%
-
-list_of_hosts :
- /* empty */
- { $$ = new_que(); }
-
- | list_of_hosts host
- { if ($2) ins_que((qelem *) $2, list_of_hosts->q_back);
- $$ = $1; }
-
- | list_of_hosts automount
- { if ($2) ins_que((qelem *) $2, list_of_automounts->q_back);
- $$ = $1; }
- ;
-
-/*
- * A new host:
- *
- * host foo.domain
- */
-host :
- tHOST host_attr list_of_filesystems list_of_mounts
- { $$ = $2; $$->h_disk_fs = $3; $$->h_mount = $4; }
-
- | error tHOST host_attr list_of_filesystems list_of_mounts
- { $$ = $3; $$->h_disk_fs = $4; $$->h_mount = $5; }
-
- ;
-
-host_attr :
- tSTR
- { $$ = new_host(); set_host($$, HF_HOST, $1); }
-
- | '{' host_attr_list '}' tSTR
- { $$ = $2; set_host($$, HF_HOST, $4); }
-
- ;
-
-host_attr_list :
- /* empty */
- { $$ = new_host(); }
-
- | host_attr_list tNETIF tSTR '{' ether_attr '}'
- { if ($5) {
- $5->e_if = $3;
- $$ = $1; set_host($$, HF_ETHER, $5); }
- }
-
- | host_attr_list tCONFIG tSTR
- { $$ = $1; set_host($$, HF_CONFIG, $3); }
-
- | host_attr_list tARCH '=' tSTR
- { $$ = $1; set_host($$, HF_ARCH, $4); }
-
- | host_attr_list tOS '=' tSTR
- { $$ = $1; set_host($$, HF_OS, $4); }
-
- | host_attr_list tCLUSTER '=' tSTR
- { $$ = $1; set_host($$, HF_CLUSTER, $4); }
-
- | host_attr_list error '=' tSTR
- { yyerror("unknown host attribute"); }
- ;
-
-ether_attr :
- /* empty */
- { $$ = new_ether_if(); }
-
- | ether_attr tINADDR '=' tSTR
- { $$ = $1; set_ether_if($$, EF_INADDR, $4); }
- | ether_attr tNETMASK '=' tSTR
- { $$ = $1; set_ether_if($$, EF_NETMASK, $4); }
- | ether_attr tHWADDR '=' tSTR
- { $$ = $1; set_ether_if($$, EF_HWADDR, $4); }
- ;
-
-/*
- * A new automount tree:
- *
- * automount /mountpoint { ... }
- */
-automount :
- tAUTOMOUNT opt_auto_opts automount_tree
- { if ($3) {
- $$ = new_auto_tree($2, $3);
- } else {
- $$ = 0;
- }
- }
-
- | tAUTOMOUNT error
- { $$ = 0; }
- ;
-
-opt_auto_opts :
- /* empty */
- { $$ = strdup(""); }
-
- | tOPTS tSTR
- { $$ = $2; }
- ;
-
-list_of_filesystems :
- /* empty */
- { $$ = 0; }
-
- | list_of_filesystems filesystem
- { if ($2) {
- if ($1)
- $$ = $1;
- else
- $$ = new_que();
- ins_que(&$2->d_q, $$->q_back);
- } else {
- $$ = $1;
- }
- }
- ;
-
-/*
- * A new filesystem:
- *
- * fs /dev/whatever { ... }
- */
-filesystem :
- tFS tSTR '{' fs_info_list '}'
- { $4->d_dev = $2; $$ = $4; }
-
- | tFS error '}'
- { $$ = (disk_fs *) 0; }
- ;
-
-/*
- * Per-filesystem information:
- *
- * fstype - the type of the filesystem (4.2, nfs, swap, export)
- * opts - the mount options ("rw,grpid")
- * passno - fsck pass number
- * freq - dump frequency
- * dumpset - tape set for filesystem dumps
- * mount - where to mount this filesystem
- * log - log device
- */
-fs_info_list :
- /* empty */
- { $$ = new_disk_fs(); }
-
- | fs_info_list tFSTYPE '=' tSTR
- { $$ = $1; set_disk_fs($$, DF_FSTYPE, $4); }
-
- | fs_info_list tOPTS '=' tSTR
- { $$ = $1; set_disk_fs($$, DF_OPTS, $4); }
-
- | fs_info_list tPASSNO '=' tSTR
- { $$ = $1; set_disk_fs($$, DF_PASSNO, $4); }
-
- | fs_info_list tFREQ '=' tSTR
- { $$ = $1; set_disk_fs($$, DF_FREQ, $4); }
-
- | fs_info_list tMOUNT dir_tree
- { $$ = $1; set_disk_fs($$, DF_MOUNT, (char *) $3); }
-
- | fs_info_list tDUMPSET '=' tSTR
- { $$ = $1; set_disk_fs($$, DF_DUMPSET, $4); }
-
- | fs_info_list tLOG '=' tSTR
- { $$ = $1; set_disk_fs($$, DF_LOG, $4); }
-
- | fs_info_list error '=' tSTR
- { yyerror("unknown filesystem attribute"); }
- ;
-
-/*
- * An automount tree:
- *
- * name = "volname" name is a reference to volname
- * name -> "string" name is a link to "string"
- * name { ... } name is an automount tree
- */
-automount_tree :
- /* empty */
- { $$ = 0; }
-
- | automount_tree tSTR '=' tSTR
- { automount *a = new_automount($2);
- a->a_volname = $4;
- if ($1)
- $$ = $1;
- else
- $$ = new_que();
- ins_que(&a->a_q, $$->q_back);
- }
-
- | automount_tree tSTR tEQ tSTR
- { automount *a = new_automount($2);
- a->a_symlink = $4;
- if ($1)
- $$ = $1;
- else
- $$ = new_que();
- ins_que(&a->a_q, $$->q_back);
- }
-
- | automount_tree tSTR '{' automount_tree '}'
- { automount *a = new_automount($2);
- a->a_mount = $4;
- if ($1)
- $$ = $1;
- else
- $$ = new_que();
- ins_que(&a->a_q, $$->q_back);
- }
- ;
-
-dir_tree :
- /* empty */
- { $$ = 0; }
-
- | dir_tree tSTR '{' dir_tree_info dir_tree '}'
- { $4->m_mount = $5;
- $4->m_name = $2;
- if ($2[0] != '/' && $2[1] && strchr($2+1, '/'))
- yyerror("not allowed '/' in a directory name");
- if ($1)
- $$ = $1;
- else
- $$ = new_que();
- ins_que(&$4->m_q, $$->q_back);
- }
- ;
-
-dir_tree_info :
- /* empty */
- { $$ = new_mount(); }
-
- | dir_tree_info tEXPORTFS tSTR
- { $$ = $1; set_mount($$, DM_EXPORTFS, $3); }
-
- | dir_tree_info tVOLNAME tSTR
- { $$ = $1; set_mount($$, DM_VOLNAME, $3); }
-
- | dir_tree_info tSEL tSTR
- { $$ = $1; set_mount($$, DM_SEL, $3); }
-
- | dir_tree_info error '=' tSTR
- { yyerror("unknown directory attribute"); }
- ;
-
-/*
- * Additional mounts on a host
- *
- * mount "volname" ...
- */
-list_of_mounts :
- /* empty */
- { $$ = 0; }
-
- | list_of_mounts tMOUNT tSTR localinfo_list
- { set_fsmount($4, FM_VOLNAME, $3);
- if ($1)
- $$ = $1;
- else
- $$ = new_que();
- ins_que(&$4->f_q, $$->q_back);
- }
- ;
-
-/*
- * Mount info:
- *
- * from "hostname" - obtain the object from the named host
- * as "string" - where to mount, if different from the volname
- * opts "string" - mount options
- * fstype "type" - type of filesystem mount, if not nfs
- */
-localinfo_list :
- /* empty */
- { $$ = new_fsmount(); }
-
- | localinfo_list tAS tSTR
- { $$ = $1; set_fsmount($$, FM_LOCALNAME, $3); }
-
- | localinfo_list tFROM tSTR
- { $$ = $1; set_fsmount($$, FM_FROM, $3); }
-
- | localinfo_list tFSTYPE tSTR
- { $$ = $1; set_fsmount($$, FM_FSTYPE, $3); }
-
- | localinfo_list tOPTS tSTR
- { $$ = $1; set_fsmount($$, FM_OPTS, $3); }
-
- | localinfo_list error '=' tSTR
- { yyerror("unknown mount attribute"); }
- ;
diff --git a/usr.sbin/amd/fsinfo/fsi_lex.l b/usr.sbin/amd/fsinfo/fsi_lex.l
deleted file mode 100644
index 06507448ac0..00000000000
--- a/usr.sbin/amd/fsinfo/fsi_lex.l
+++ /dev/null
@@ -1,397 +0,0 @@
-%{
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)fsi_lex.l 8.2 (Berkeley) 2/17/94
- * $Id: fsi_lex.l,v 1.5 2003/06/02 23:36:52 millert Exp $
- */
-
-/*
- * Lexical analyzer for fsinfo.
- * TODO: Needs rewriting.
- */
-
-static int xinput();
-static void xunput();
-
-#ifdef FLEX_SCANNER
-static int yylineno;
-/* Flex support with help from Vern Paxson <vern@helios.ee.lbl.gov> */
-#undef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-{ \
- int i; \
- for (i = 0; i < max_size; i++) { \
- int ch = xinput(i == 0); \
- if (ch == 0) \
- break; \
- buf[i] = ch; \
- } \
- result = i; \
-}
-
-#define INIT_STATE { \
- switch ((yy_start - 1) / 2) { \
- case 0: \
- BEGIN F; \
- break; \
- } \
-}
-
-
-#else
-/*
- * Using old lex...
- */
-#undef unput
-#define unput(ch) xunput(ch)
-#undef input
-#define input() xinput(1)
-
-#define INIT_STATE { \
- switch (yybgin - yysvec - 1) { \
- case 0: \
- BEGIN F; \
- break; \
- } \
-}
-
-#endif /* FLEX_SCANNER */
-
-#include "../fsinfo/fsinfo.h"
-#include "fsi_gram.h"
-#include <ctype.h>
-
-static char *filename;
-static char *optr;
-static char ostr[1024];
-static find_resword();
-static unsigned char ibuf[64];
-static unsigned char *iptr = ibuf;
-static int quoted;
-static int lastch, nextch = '\n';
-YYSTYPE yylval;
-
-struct r {
- char *rw;
- int tok;
-} rr[] = {
- { "->", tEQ },
- { "arch", tARCH },
- { "as", tAS },
- { "automount", tAUTOMOUNT },
- { "cluster", tCLUSTER },
- { "config", tCONFIG },
- { "dumpset", tDUMPSET },
- { "exportfs", tEXPORTFS },
- { "freq", tFREQ },
- { "from", tFROM },
- { "fs", tFS },
- { "fstype", tFSTYPE },
- { "host", tHOST },
- { "hwaddr", tHWADDR },
- { "inaddr", tINADDR },
- { "localhost", tLOCALHOST },
- { "log", tLOG },
- { "mount", tMOUNT },
- { "netif", tNETIF },
- { "netmask", tNETMASK },
- { "opts", tOPTS },
- { "os", tOS },
- { "passno", tPASSNO },
- { "sel", tSEL },
- { "volname", tVOLNAME },
- { 0, 0 },
-};
-#define NRES_WORDS (sizeof(rr)/sizeof(rr[0])-1)
-
-%}
-
-%start F Q
-
-%%
- INIT_STATE; /* witchcraft */
-
-<F>[^ \t\n"={}]+ { return find_resword(yytext); }
-<F>[ \t] ;
-<F>"\n" { yylineno++; }
-<F>[={}] { return *yytext; }
-
-<F>\" { BEGIN Q; optr = ostr; quoted = 1; }
-<Q>\n { yylineno++; yyerror("\" expected"); BEGIN F; }
-<Q>\\b { *optr++ = '\b'; /* escape */ }
-<Q>\\t { *optr++ = '\t'; /* escape */ }
-<Q>\\\" { *optr++ = '\"'; /* escape */ }
-<Q>\\\\ { *optr++ = '\\'; /* escape */ }
-<Q>\\\n { yylineno++; /* continue */ }
-<Q>\\r { *optr++ = '\r'; /* escape */ }
-<Q>\\n { *optr++ = '\n'; /* escape */ }
-<Q>\\f { *optr++ = '\f'; /* escape */ }
-<Q>"\\ " { *optr++ = ' '; /* force space */ }
-<Q>\\. { yyerror("Unknown \\ sequence"); }
-<Q>([ \t]|"\\\n"){2,} { char *p = yytext-1; while (p = strchr(p+1, '\n')) yylineno++; }
-<Q>\" { BEGIN F; quoted = 0;
- *optr = '\0';
- yylval.s = strdup(ostr);
- return tSTR;
- }
-<Q>. { *optr++ = *yytext; }
-
-%%
-
-static int find_resword(s)
-char *s;
-{
- int tok = 0;
-
- int l = 0, m = NRES_WORDS/2, h = NRES_WORDS-1;
- int rc = 0;
-
- m = NRES_WORDS/2;
-
-#define FSTRCMP(p, q) ((*(p) == *(q)) ? strcmp((p)+1, (q)+1) : *(p) - *(q))
-
- while ((l <= h) && (rc = FSTRCMP(s, rr[m].rw))) {
- /*fprintf(stderr, "failed to cmp(%s, %s), %d, %d, %d\n", s, rr[m].rw, l, m, h);*/
- if (rc < 0)
- h = m - 1;
- else
- l = m + 1;
- m = (h + l) / 2;
- }
-
- if (rc == 0)
- tok = rr[m].tok;
-
- switch (tok) {
- case tLOCALHOST:
- s = "${host}";
- /* fall through... */
- case 0:
- yylval.s = strdup(s);
- tok = tSTR;
- /* fall through... */
- default:
- return tok;
- }
-
-}
-
-int yyerror(s, s1, s2, s3, s4)
-char *s;
-char *s1, *s2, *s3, *s4;
-{
- col_cleanup(0);
- fprintf(stderr, "%s:%d: ", filename ? filename : "/dev/stdin", yylineno);
- fprintf(stderr, s, s1, s2, s3, s4);
- fputc('\n', stderr);
- parse_errors++;
-}
-
-ioloc *current_location()
-{
- ioloc *ip = ALLOC(ioloc);
- ip->i_line = yylineno;
- ip->i_file = filename;
- return ip;
-}
-
-#ifdef FLEX_SCANNER
-#undef yywrap
-#endif
-
-int yywrap()
-{
-static int first = 1;
- if (first) {
- char prog[16*1024];
- strlcpy(prog, "for file in ", sizeof(prog));
- while (*++g_argv) {
- if (access(*g_argv, 4) < 0) {
- error("\"%s\": Cannot open for reading", *g_argv);
- file_io_errors++;
- } else {
- strlcat(prog, *g_argv, sizeof(prog));
- strlcat(prog, " ", sizeof(prog));
- }
- }
- strlcat(prog, "; do /usr/bin/cpp ", sizeof(prog));
- strlcat(prog, idvbuf, sizeof(prog));
- strlcat(prog, " -DHOSTNAME=\'", sizeof(prog));
- strlcat(prog, hostname, sizeof(prog));
- strlcat(prog, "\' \"$file\"; done", sizeof(prog));
- yyin = popen(prog, "r");
- if (yyin) {
- /*if (filename) free(filename);*/
- filename = strdup("unknown");
- yylineno = 1;
- first = 0;
- return 0;
- } else {
- warn(prog);
- }
- }
-
- if (!first && yyin && pclose(yyin) != 0)
- parse_errors++;
-
- return 1;
-}
-
-#define xgetc(fp) ((iptr > ibuf) ? (*--iptr) : (lastch = nextch, nextch = getc(fp), (nextch == EOF ? nextch = lastch, EOF : nextch)))
-
-static int xinput(need)
-int need;
-{
-static int c_comment = 0;
- int ch, ch2;
-
- do {
- ch = xgetc(yyin);
- /* fprintf(stderr, "ch = %c, %#x, %d\n", ch, ibuf,iptr-ibuf); */
- if (ch == EOF) return 0;
- if (quoted)
- return ch;
- if (c_comment) {
- ch2 = ch;
- do {
- if (ch2 == '\n') {
- nextch = '\n';
- return ch2;
- }
- /* C style comment */
- do {
- ch2 = getc(yyin);
- if (ch2 == '\n') {
- nextch = '\n';
- return ch2;
- }
- } while (ch2 != '*' && ch2 != EOF);
-
- while (ch2 == '*')
- ch2 = getc(yyin);
- } while (ch2 != '/' && ch2 != EOF);
- c_comment = 0;
- if (ch2 == EOF)
- break;
- continue;
- }
-
- if (ch == '#') {
- /*log("lastch = '%c' (%#x)", lastch, lastch);*/
- if (lastch == '\n') {
- char fname[MAXPATHLEN];
- char *fptr;
- if (!need) {
- xunput('#');
- nextch = '\n';
- return 0;
- }
- fname[0] = '\0';
- /* Skip past space */
- do {
- ch2 = getc(yyin);
- } while (ch2 != EOF && ch2 != '\n' && !isdigit(ch2));
- if (isdigit(ch2)) {
- /* Read in line number */
- fptr = fname;
- do {
- *fptr++ = ch2;
- ch2 = getc(yyin);
- } while (isdigit(ch2));
- *fptr = '\0';
- if (fptr != fname)
- yylineno = atoi(fname) - 1;
- }
- /* Skip past space */
- while (ch2 != EOF && ch2 != '\"' && ch2 != '\n')
- ch2 = getc(yyin);
- if (ch2 == '\"') {
- /* Read file name */
- fptr = fname;
- ch2 = getc(yyin);
- while (ch2 != '\"' && ch2 != EOF && ch2 != EOF) {
- *fptr++ = ch2;
- ch2 = getc(yyin);
- }
- *fptr = '\0';
- if (fname[0]) {
- log("Setting filename to \"%s\"", fname);
- /*if (filename) free(filename);*/
- filename = strdup(fname);
- }
- }
- while (ch2 != '\n' && ch2 != EOF)
- ch2 = getc(yyin);
- } else do {
- ch2 = getc(yyin);
- } while (ch2 != '\n' && ch2 != EOF);
- if (ch2 == '\n') {
- nextch = '\n';
- return ch2;
- }
- } else if (ch == '/') {
- ch2 = getc(yyin);
- if (ch2 == '/') {
- /* C++ style comment */
- do {
- ch2 = getc(yyin);
- } while (ch2 != '\n' && ch2 != EOF);
- if (ch2 == '\n') {
- nextch = '\n';
- return ch2;
- }
- } else if (ch2 == '*') {
- c_comment = 1;
- continue;
- } else {
- xunput(ch2);
- return ch;
- }
- } else {
- return ch;
- }
- } while (ch2 != EOF);
- error("End of file within comment");
- return 0;
-}
-
-static void xunput(c)
-int c;
-{
- if (c && c != EOF) {
- if (iptr == ibuf + sizeof(ibuf) - 1)
- fatal("Out of space in lexical pushback");
- *iptr++ = c;
- }
-}
diff --git a/usr.sbin/amd/fsinfo/fsi_util.c b/usr.sbin/amd/fsinfo/fsi_util.c
deleted file mode 100644
index 7a9c45fefb8..00000000000
--- a/usr.sbin/amd/fsinfo/fsi_util.c
+++ /dev/null
@@ -1,568 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 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.
- *
- * from: @(#)fsi_util.c 8.1 (Berkeley) 6/6/93
- * $Id: fsi_util.c,v 1.8 2013/04/17 15:55:46 deraadt Exp $
- */
-
-#include "../fsinfo/fsinfo.h"
-
-/*
- * Lots of ways of reporting errors...
- */
-void error(s, s1, s2, s3, s4)
-char *s, *s1, *s2, *s3, *s4;
-{
- col_cleanup(0);
- fprintf(stderr, "%s: Error, ", __progname);
- fprintf(stderr, s, s1, s2, s3, s4);
- fputc('\n', stderr);
- errors++;
-}
-
-void lerror(l, s, s1, s2, s3, s4)
-ioloc *l;
-char *s, *s1, *s2, *s3, *s4;
-{
- col_cleanup(0);
- fprintf(stderr, "%s:%d: ", l->i_file, l->i_line);
- fprintf(stderr, s, s1, s2, s3, s4);
- fputc('\n', stderr);
- errors++;
-}
-
-void lwarning(l, s, s1, s2, s3, s4)
-ioloc *l;
-char *s, *s1, *s2, *s3, *s4;
-{
- col_cleanup(0);
- fprintf(stderr, "%s:%d: ", l->i_file, l->i_line);
- fprintf(stderr, s, s1, s2, s3, s4);
- fputc('\n', stderr);
-
-}
-
-void fatal(s, s1, s2, s3, s4)
-char *s, *s1, *s2, *s3, *s4;
-{
- col_cleanup(1);
- fprintf(stderr, "%s: Fatal, ", __progname);
- fprintf(stderr, s, s1, s2, s3, s4);
- fputc('\n', stderr);
- exit(1);
-}
-
-#if !(defined(__NetBSD__) || defined(__OpenBSD__))
-/*
- * Dup a string
- */
-char *strdup(s)
-char *s;
-{
- int len = strlen(s);
- char *sp = (char *) xmalloc(len+1);
-
- bcopy(s, sp, len);
- sp[len] = 0;
-
- return sp;
-}
-#endif /* !(defined(__NetBSD__) || defined(__OpenBSD)) */
-
-/*
- * Debug log
- */
-void log(s, s1, s2, s3, s4)
-char *s, *s1, *s2, *s3, *s4;
-{
- if (verbose > 0) {
- fputc('#', stdout);
- fprintf(stdout, "%s: ", __progname);
- fprintf(stdout, s, s1, s2, s3, s4);
- putc('\n', stdout);
- }
-}
-
-void info_hdr(ef, info)
-FILE *ef;
-char *info;
-{
- fprintf(ef, "# *** NOTE: This file contains %s info\n", info);
-}
-
-void gen_hdr(ef, hn)
-FILE *ef;
-char *hn;
-{
- fprintf(ef, "# *** NOTE: Only for use on %s\n", hn);
-}
-
-static void make_banner(fp)
-FILE *fp;
-{
- time_t t = time(NULL);
- char *ctime(), *cp = ctime(&t);
-
- fprintf(fp,
-"\
-# *** This file was automatically generated -- DO NOT EDIT HERE ***\n\
-# \"%s\" run by %s@%s on %s\
-#\n\
-",
- __progname, username, hostname, cp);
-}
-
-static int show_range = 10;
-static int col = 0;
-static int total_shown = 0;
-static int total_mmm = 8;
-
-static int col_output(len)
-int len;
-{
- int wrapped = 0;
- col += len;
- if (col > 77) {
- fputc('\n', stdout);
- col = len;
- wrapped = 1;
- }
- return wrapped;
-}
-
-static void show_total()
-{
- if (total_mmm != -show_range+1) {
- char n[8];
- int len;
- if (total_mmm < 0)
- fputc('*', stdout);
- snprintf(n, sizeof(n), "%d", total_shown);
- len = strlen(n);
- if (col_output(len))
- fputc(' ', stdout);
- fputs(n, stdout); fflush(stdout);
- total_mmm = -show_range;
- }
-}
-
-col_cleanup(eoj)
-int eoj;
-{
- if (verbose < 0) return;
- if (eoj) {
- show_total();
- fputs(")]", stdout);
- }
- if (col) {
- fputc('\n', stdout);
- col = 0;
- }
-}
-
-void show_new(msg)
-char *msg;
-{
- if (verbose < 0) return;
- total_shown++;
- if (total_mmm > show_range) {
- show_total();
- } else if (total_mmm == 0) {
- fputc('*', stdout); fflush(stdout);
- col += 1;
- }
- total_mmm++;
-}
-
-void show_area_being_processed(area, n)
-char *area;
-int n;
-{
-static char *last_area = 0;
- if (verbose < 0) return;
- if (last_area) {
- if (total_shown)
- show_total();
- fputs(")", stdout);
- col += 1;
- }
- if (!last_area || strcmp(area, last_area) != 0) {
- if (last_area) {
- col_cleanup(0);
- total_shown = 0;
- total_mmm = show_range+1;
- }
- (void) col_output(strlen(area)+2);
- fprintf(stdout, "[%s", area);
- last_area = area;
- }
-
- fputs(" (", stdout);
- col += 2;
- show_range = n;
- total_mmm = n + 1;
-
- fflush(stdout);
-}
-
-/*
- * Open a file with the given prefix and name
- */
-FILE *pref_open(pref, hn, hdr, arg)
-char *pref;
-char *hn;
-void (*hdr)();
-char *arg;
-{
- char p[MAXPATHLEN];
- FILE *ef;
- snprintf(p, sizeof(p), "%s%s", pref, hn);
- log("Writing %s info for %s to %s", pref, hn, p);
- ef = fopen(p, "w");
- if (ef) {
- (*hdr)(ef, arg);
- make_banner(ef, hn);
- } else {
- error("can't open %s for writing", p);
- }
-
- return ef;
-}
-
-int pref_close(fp)
-FILE *fp;
-{
- return fclose(fp) == 0;
-}
-
-/*
- * Determine where Amd would automount the host/volname pair
- */
-void compute_automount_point(buf, buflen, hp, vn)
-char *buf;
-size_t buflen;
-host *hp;
-char *vn;
-{
-#ifdef AMD_USES_HOSTPATH
- snprintf(buf, buflen, "%s/%s%s", autodir, hp->h_hostpath, vn);
-#else
- snprintf(buf, buflen, "%s/%s%s", autodir, hp->h_lochost, vn);
-#endif
-}
-
-char *xcalloc(i, s)
-int i;
-int s;
-{
- char *p = (char *) calloc(i, (unsigned) s);
- if (!p)
- fatal("Out of memory");
- return p;
-}
-
-char *xmalloc(i)
-int i;
-{
- char *p = (char *) malloc(i);
- if (!p)
- fatal("Out of memory");
- return p;
-}
-
-/*
- * Data constructors..
- */
-
-automount *new_automount(name)
-char *name;
-{
- automount *ap = ALLOC(automount);
- ap->a_ioloc = current_location();
- ap->a_name = name;
- ap->a_volname = 0;
- ap->a_mount = 0;
- show_new("automount");
- return ap;
-}
-
-auto_tree *new_auto_tree(def, ap)
-char *def;
-qelem *ap;
-{
- auto_tree *tp = ALLOC(auto_tree);
- tp->t_ioloc = current_location();
- tp->t_defaults = def;
- tp->t_mount = ap;
- show_new("auto_tree");
- return tp;
-}
-
-host *new_host()
-{
- host *hp = ALLOC(host);
- hp->h_ioloc = current_location();
- hp->h_mask = 0;
- show_new("host");
- return hp;
-}
-
-void set_host(hp, k, v)
-host *hp;
-int k;
-char *v;
-{
- int m = 1 << k;
- if (hp->h_mask & m) {
- yyerror("host field \"%s\" already set", host_strings[k]);
- return;
- }
-
- hp->h_mask |= m;
-
- switch (k) {
- case HF_HOST: {
- char *p = strdup(v);
- dict_ent *de = dict_locate(dict_of_hosts, v);
- if (de)
- yyerror("duplicate host %s!", v);
- else
- dict_add(dict_of_hosts, v, (char *) hp);
- hp->h_hostname = v;
- domain_strip(p, hostname);
- if (strchr(p, '.') != 0)
- free(p);
- else
- hp->h_lochost = p;
- } break;
- case HF_CONFIG: {
- qelem *q;
- qelem *vq = (qelem *) v;
- hp->h_mask &= ~m;
- if (hp->h_config)
- q = hp->h_config;
- else
- q = hp->h_config = new_que();
- ins_que(vq, q->q_back);
- } break;
- case HF_ETHER: {
- qelem *q;
- qelem *vq = (qelem *) v;
- hp->h_mask &= ~m;
- if (hp->h_ether)
- q = hp->h_ether;
- else
- q = hp->h_ether = new_que();
- ins_que(vq, q->q_back);
- } break;
- case HF_ARCH: hp->h_arch = v; break;
- case HF_OS: hp->h_os = v; break;
- case HF_CLUSTER: hp->h_cluster = v; break;
- default: abort(); break;
- }
-}
-
-ether_if *new_ether_if()
-{
- ether_if *ep = ALLOC(ether_if);
- ep->e_mask = 0;
- ep->e_ioloc = current_location();
- show_new("ether_if");
- return ep;
-}
-
-void set_ether_if(ep,k, v)
-ether_if *ep;
-int k;
-char *v;
-{
- int m = 1 << k;
- if (ep->e_mask & m) {
- yyerror("netif field \"%s\" already set", ether_if_strings[k]);
- return;
- }
-
- ep->e_mask |= m;
-
- switch (k) {
- case EF_INADDR: {
- if (inet_aton(v, &ep->e_inaddr) == 0)
- yyerror("malformed IP dotted quad: %s", v);
- free(v);
- } break;
- case EF_NETMASK: {
- u_int32_t nm = 0;
- if ((sscanf(v, "0x%x", &nm) == 1 || sscanf(v, "%x", &nm) == 1) && nm != 0)
- ep->e_netmask = htonl(nm);
- else
- yyerror("malformed netmask: %s", v);
- free(v);
- } break;
- case EF_HWADDR:
- ep->e_hwaddr = v;
- break;
- default: abort(); break;
- }
-}
-
-void set_disk_fs(dp, k, v)
-disk_fs *dp;
-int k;
-char *v;
-{
- int m = 1 << k;
- if (dp->d_mask & m) {
- yyerror("fs field \"%s\" already set", disk_fs_strings[k]);
- return;
- }
-
- dp->d_mask |= m;
-
- switch (k) {
- case DF_FSTYPE: dp->d_fstype = v; break;
- case DF_OPTS: dp->d_opts = v; break;
- case DF_DUMPSET: dp->d_dumpset = v; break;
- case DF_LOG: dp->d_log = v; break;
- case DF_PASSNO: dp->d_passno = atoi(v); free(v); break;
- case DF_FREQ: dp->d_freq = atoi(v); free(v); break;
- case DF_MOUNT: dp->d_mount = &((mount *) v)->m_q; break;
- default: abort(); break;
- }
-}
-
-disk_fs *new_disk_fs()
-{
- disk_fs *dp = ALLOC(disk_fs);
- dp->d_ioloc = current_location();
- show_new("disk_fs");
- return dp;
-}
-
-void set_mount(mp, k, v)
-mount *mp;
-int k;
-char *v;
-{
- int m = 1 << k;
- if (mp->m_mask & m) {
- yyerror("mount tree field \"%s\" already set", mount_strings[k]);
- return;
- }
-
- mp->m_mask |= m;
-
- switch (k) {
- case DM_VOLNAME:
- dict_add(dict_of_volnames, v, (char *) mp);
- mp->m_volname = v;
- break;
- case DM_EXPORTFS:
- mp->m_exportfs = v;
- break;
- case DM_SEL:
- mp->m_sel = v;
- break;
- default: abort(); break;
- }
-}
-
-mount *new_mount()
-{
- mount *fp = ALLOC(mount);
- fp->m_ioloc = current_location();
- show_new("mount");
- return fp;
-}
-
-void set_fsmount(fp, k, v)
-fsmount *fp;
-int k;
-char *v;
-{
- int m = 1 << k;
- if (fp->f_mask & m) {
- yyerror("mount field \"%s\" already set", fsmount_strings[k]);
- return;
- }
-
- fp->f_mask |= m;
-
- switch (k) {
- case FM_LOCALNAME: fp->f_localname = v; break;
- case FM_VOLNAME: fp->f_volname = v; break;
- case FM_FSTYPE: fp->f_fstype = v; break;
- case FM_OPTS: fp->f_opts = v; break;
- case FM_FROM: fp->f_from = v; break;
- default: abort(); break;
- }
-}
-
-fsmount *new_fsmount()
-{
- fsmount *fp = ALLOC(fsmount);
- fp->f_ioloc = current_location();
- show_new("fsmount");
- return fp;
-}
-
-void init_que(q)
-qelem *q;
-{
- q->q_forw = q->q_back = q;
-}
-
-qelem *new_que()
-{
- qelem *q = ALLOC(qelem);
- init_que(q);
- return q;
-}
-
-void ins_que(elem, pred)
-qelem *elem, *pred;
-{
- qelem *p;
- p = pred->q_forw;
- elem->q_back = pred;
- elem->q_forw = p;
- pred->q_forw = elem;
- p->q_back = elem;
-}
-
-void rem_que(elem)
-qelem *elem;
-{
- qelem *p, *p2;
- p = elem->q_forw;
- p2 = elem->q_back;
-
- p2->q_forw = p;
- p->q_back = p2;
-}
diff --git a/usr.sbin/amd/fsinfo/fsinfo.8 b/usr.sbin/amd/fsinfo/fsinfo.8
deleted file mode 100644
index 65b7b095b66..00000000000
--- a/usr.sbin/amd/fsinfo/fsinfo.8
+++ /dev/null
@@ -1,77 +0,0 @@
-.\" $OpenBSD: fsinfo.8,v 1.8 2007/05/31 19:20:22 jmc Exp $
-.\" Copyright (c) 1993 Jan-Simon Pendry.
-.\" 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.
-.\"
-.\" from: @(#)fsinfo.8 8.1 (Berkeley) 6/28/93
-.\"
-.Dd $Mdocdate: May 31 2007 $
-.Dt FSINFO 8
-.Os
-.Sh NAME
-.Nm fsinfo
-.Nd co-ordinate site-wide filesystem information
-.Sh SYNOPSIS
-.Nm fsinfo
-.Bk -words
-.Op Fl v
-.Op Fl a Ar autodir
-.Op Fl b Ar bootparams
-.Op Fl d Ar dumpsets
-.Op Fl e Ar exports
-.Op Fl f Ar fstabs
-.Op Fl h Ar hostname
-.Op Fl m Ar automounts
-.Op Fl I Ar dir
-.Op Fl D Ar string[=string]]
-.Op Fl U Ar string[=string]]
-.Ar config ...
-.Ek
-.Sh DESCRIPTION
-The
-.Nm fsinfo
-utility takes a set of system configuration information, and generates
-a co-ordinated set of
-.Xr amd 8 ,
-.Xr mount 8
-and
-.Xr mountd 8
-configuration files.
-.Pp
-The
-.Nm fsinfo
-command is fully described in the document
-.%T "Amd - The 4.4BSD Automounter" .
-.Sh SEE ALSO
-.Xr amd 8 ,
-.Xr mount 8 ,
-.Xr mountd 8
-.Sh HISTORY
-The
-.Nm fsinfo
-command first appeared in
-.Bx 4.4 .
diff --git a/usr.sbin/amd/fsinfo/fsinfo.c b/usr.sbin/amd/fsinfo/fsinfo.c
deleted file mode 100644
index b7c3821e3d6..00000000000
--- a/usr.sbin/amd/fsinfo/fsinfo.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)fsinfo.c 8.1 (Berkeley) 6/6/93
- * $Id: fsinfo.c,v 1.9 2009/10/27 23:59:51 deraadt Exp $
- */
-
-/*
- * fsinfo
- */
-
-#include "../fsinfo/fsinfo.h"
-#include "fsi_gram.h"
-#include <pwd.h>
-
-qelem *list_of_hosts;
-qelem *list_of_automounts;
-dict *dict_of_volnames;
-dict *dict_of_hosts;
-char *autodir = "/a";
-char hostname[MAXHOSTNAMELEN+1];
-char *username;
-int file_io_errors;
-int parse_errors;
-int errors;
-int verbose;
-char idvbuf[1024];
-
-char **g_argv;
-
-/*
- * Output file prefixes
- */
-char *exportfs_pref;
-char *fstab_pref;
-char *dumpset_pref;
-char *mount_pref;
-char *bootparams_pref;
-
-/*
- * Argument cracking...
- */
-static void get_args(c, v)
-int c;
-char *v[];
-{
- extern char *optarg;
- extern int optind;
- int ch, n, usage = 0;
- char *iptr = idvbuf;
- int iptr_size = sizeof(idvbuf);
-
- while ((ch = getopt(c, v, "a:b:d:e:f:h:m:D:U:I:qv")) != -1)
- switch (ch) {
- case 'a':
- autodir = optarg;
- break;
- case 'b':
- if (bootparams_pref)
- fatal("-b option specified twice");
- bootparams_pref = optarg;
- break;
- case 'd':
- if (dumpset_pref)
- fatal("-d option specified twice");
- dumpset_pref = optarg;
- break;
- case 'h':
- strlcpy(hostname, optarg, sizeof(hostname));
- break;
- case 'e':
- if (exportfs_pref)
- fatal("-e option specified twice");
- exportfs_pref = optarg;
- break;
- case 'f':
- if (fstab_pref)
- fatal("-f option specified twice");
- fstab_pref = optarg;
- break;
- case 'm':
- if (mount_pref)
- fatal("-m option specified twice");
- mount_pref = optarg;
- break;
- case 'q':
- verbose = -1;
- break;
- case 'v':
- verbose = 1;
- break;
- case 'I': case 'D': case 'U':
- n = snprintf(iptr, iptr_size, "-%c%s ", ch, optarg);
- if (n >= iptr_size || n < 0)
- usage++;
- else {
- iptr_size -= n;
- iptr += n;
- }
- break;
- default:
- usage++;
- break;
- }
-
- if (c != optind) {
- g_argv = v + optind - 1;
- if (yywrap())
- fatal("Cannot read any input files");
- } else {
- usage++;
- }
-
- if (usage) {
- fprintf(stderr,
-"\
-Usage: %s [-v] [-a autodir] [-h hostname] [-b bootparams] [-d dumpsets]\n\
-\t[-e exports] [-f fstabs] [-m automounts]\n\
-\t[-I dir] [-D|-U string[=string]] config ...\n", __progname);
- exit(1);
- }
-
-
- if (g_argv[0])
- log("g_argv[0] = %s", g_argv[0]);
- else
- log("g_argv[0] = (nil)");
-}
-
-/*
- * Determine username of caller
- */
-static char *find_username()
-{
- extern char *getlogin();
- extern char *getenv();
- char *u = getlogin();
- if (!u) {
- struct passwd *pw = getpwuid(getuid());
- if (pw)
- u = pw->pw_name;
- }
- if (!u)
- u = getenv("LOGNAME");
- if (!u)
- u = getenv("USER");
- if (!u)
- u = "root";
-
- return strdup(u);
-}
-
-/*
- * MAIN
- */
-int
-main(argc, argv)
- int argc;
- char *argv[];
-{
- /*
- * Process arguments
- */
- get_args(argc, argv);
-
- /*
- * If no hostname given then use the local name
- */
- if (!*hostname && gethostname(hostname, sizeof(hostname)) < 0)
- err(1, "gethostname");
-
- /*
- * Get the username
- */
- username = find_username();
-
- /*
- * New hosts and automounts
- */
- list_of_hosts = new_que();
- list_of_automounts = new_que();
-
- /*
- * New dictionaries
- */
- dict_of_volnames = new_dict();
- dict_of_hosts = new_dict();
-
- /*
- * Parse input
- */
- show_area_being_processed("read config", 11);
- if (yyparse())
- errors = 1;
- errors += file_io_errors + parse_errors;
-
- if (errors == 0) {
- /*
- * Do semantic analysis of input
- */
- analyze_hosts(list_of_hosts);
- analyze_automounts(list_of_automounts);
- }
-
- /*
- * Give up if errors
- */
- if (errors == 0) {
- /*
- * Output data files
- */
-
- write_atab(list_of_automounts);
- write_bootparams(list_of_hosts);
- write_dumpset(list_of_hosts);
- write_exportfs(list_of_hosts);
- write_fstab(list_of_hosts);
- }
-
- col_cleanup(1);
-
- return (errors);
-}
diff --git a/usr.sbin/amd/fsinfo/fsinfo.h b/usr.sbin/amd/fsinfo/fsinfo.h
deleted file mode 100644
index 91affd9c985..00000000000
--- a/usr.sbin/amd/fsinfo/fsinfo.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)fsinfo.h 8.1 (Berkeley) 6/6/93
- * $Id: fsinfo.h,v 1.6 2003/06/02 23:36:52 millert Exp $
- */
-
-#ifdef __GNUC__
-#define INLINE /* __inline */
-#else
-#define INLINE
-#endif /* __GNUC__ */
-
-/*
- * Pick up target dependent definitions
- */
-#include "os-defaults.h"
-#include OS_HDR
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/param.h>
-
-/*
- * Bogosity to deal with ether { ... }
- */
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <net/if.h>
-#include <netinet/if_ether.h>
-
-#include <string.h>
-#include <stdlib.h>
-#include <err.h>
-
-#include "fsi_data.h"
-
-extern void fatal();
-extern void warning();
-extern void error();
-extern void analyze_automounts(qelem *);
-extern void analyze_hosts(qelem *);
-extern void compute_automount_point(char *, size_t, host *, char *);
-extern automount *new_automount(char *);
-extern auto_tree *new_auto_tree(char *, qelem *);
-extern host *new_host(void);
-extern disk_fs *new_disk_fs(void);
-extern void set_disk_fs(disk_fs *, int, char *);
-extern ether_if *new_ether_if(void);
-extern mount *new_mount(void);
-extern void set_mount(mount *, int, char *);
-extern fsmount *new_fsmount(void);
-extern void set_fsmount(fsmount *, int, char *);
-extern qelem *new_que(void);
-extern void init_que(qelem *);
-extern void ins_que(qelem *, qelem *);
-extern void rem_que(qelem *);
-extern dict *new_dict(void);
-extern dict_ent *dict_locate(dict *, char *);
-extern void dict_add(dict *, char *, char *);
-extern int dict_iter(dict *, int (*)());
-extern void info_hdr();
-extern void gen_hdr();
-extern FILE *pref_open();
-extern int pref_close();
-extern ioloc *current_location();
-
-extern char *disk_fs_strings[];
-extern char *mount_strings[];
-extern char *fsmount_strings[];
-extern char *host_strings[];
-extern char *ether_if_strings[];
-extern char *autodir;
-extern char hostname[];
-extern char *username;
-extern char **g_argv;
-extern char *fstab_pref;
-extern char *exportfs_pref;
-extern char *mount_pref;
-extern char *dumpset_pref;
-extern char *bootparams_pref;
-extern char idvbuf[];
-
-extern int file_io_errors;
-extern int parse_errors;
-extern int errors;
-extern int verbose;
-
-extern dict *dict_of_hosts;
-extern dict *dict_of_volnames;
-extern char __progname;
-
-extern char *xcalloc();
-extern char *xmalloc();
-#define ALLOC(x) ((struct x *) xcalloc(1, sizeof(struct x)))
-#define STREQ(s,t) (*(s) == *(t) && strcmp((s)+1,(t)+1) == 0)
-#define ISSET(m,b) ((m) & (1<<(b)))
-#define BITSET(m,b) ((m) |= (1<<(b)))
-
-#define FIRST(ty, q) ((ty *) ((q)->q_forw))
-#define LAST(ty, q) ((ty *) ((q)->q_back))
-#define NEXT(ty, q) ((ty *) (((qelem *) q)->q_forw))
-#define HEAD(ty, q) ((ty *) q)
-#define ITER(v, ty, q) \
- for ((v) = FIRST(ty,(q)); (v) != HEAD(ty,(q)); (v) = NEXT(ty,(v)))
diff --git a/usr.sbin/amd/fsinfo/wr_atab.c b/usr.sbin/amd/fsinfo/wr_atab.c
deleted file mode 100644
index 8d348afa082..00000000000
--- a/usr.sbin/amd/fsinfo/wr_atab.c
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)wr_atab.c 8.1 (Berkeley) 6/6/93
- * $Id: wr_atab.c,v 1.4 2003/06/02 23:36:52 millert Exp $
- */
-
-#include "../fsinfo/fsinfo.h"
-
-/*
- * Write a sequence of automount mount map entries
- */
-static int write_amount_info(af, ap, sk)
-FILE *af;
-automount *ap;
-int sk;
-{
- int errors = 0;
- if (ap->a_mount) {
- /*
- * A pseudo-directory.
- * This can also be a top-level directory, in which
- * case the type:=auto is not wanted...
- *
- * type:=auto;fs:=${map};pref:=whatever/
- */
- automount *ap2;
- if (strlen(ap->a_name) > sk) {
- fprintf(af, "%s type:=auto;fs:=${map};pref:=%s/\n",
- ap->a_name + sk, ap->a_name + sk);
- }
- ITER(ap2, automount, ap->a_mount)
- errors += write_amount_info(af, ap2, sk);
- } else if (ap->a_mounted) {
- /*
- * A mounted partition
- * type:=link [ link entries ] type:=nfs [ nfs entries ]
- */
- dict_data *dd;
- dict_ent *de = ap->a_mounted;
- int done_type_link = 0;
- char *key = ap->a_name + sk;
-
- /*
- * Output the map key
- */
- fputs(key, af);
-
- /*
- * First output any Link locations that would not
- * otherwise be correctly mounted. These refer
- * to filesystem which are not mounted in the same
- * place which the automounter would use.
- */
- ITER(dd, dict_data, &de->de_q) {
- mount *mp = (mount *) dd->dd_data;
- /*
- * If the mount point and the exported volname are the
- * same then this filesystem will be recognised by
- * the restart code - so we don't need to put out a
- * special rule for it.
- */
- if (mp->m_dk->d_host->h_lochost) {
- char amountpt[1024];
- compute_automount_point(amountpt, sizeof(amountpt), mp->m_dk->d_host, mp->m_exported->m_volname);
- if (strcmp(mp->m_dk->d_mountpt, amountpt) != 0) {
- /*
- * ap->a_volname is the name of the aliased volume
- * mp->m_name is the mount point of the filesystem
- * mp->m_volname is the volume name of the filesystems
- */
-
- /*
- * Find length of key and volume names
- */
- int avlen = strlen(ap->a_volname);
- int mnlen = strlen(mp->m_volname);
- /*
- * Make sure a -type:=link is output once
- */
- if (!done_type_link) {
- done_type_link = 1;
- fputs(" -type:=link", af);
- }
- /*
- * Output a selector for the hostname,
- * the device from which to mount and
- * where to mount. This will correspond
- * to the values output for the fstab.
- */
- if (mp->m_dk->d_host->h_lochost)
- fprintf(af, " host==%s", mp->m_dk->d_host->h_lochost);
- else
- fprintf(af, " hostd==%s", mp->m_dk->d_host->h_hostname);
- fprintf(af, ";fs:=%s", mp->m_name);
- /*
- * ... and a sublink if needed
- */
- if (mnlen < avlen) {
- char *sublink = ap->a_volname + mnlen + 1;
- fprintf(af, "/%s", sublink);
- }
- fputs(" ||", af);
- }
- }
- }
-
- /*
- * Next do the NFS locations
- */
-
- if (done_type_link)
- fputs(" -", af);
-
- ITER(dd, dict_data, &de->de_q) {
- mount *mp = (mount *) dd->dd_data;
- int namelen = mp->m_name_len;
- int exp_namelen = mp->m_exported->m_name_len;
- int volnlen = strlen(ap->a_volname);
- int mvolnlen = strlen(mp->m_volname);
- fputc(' ', af);
-#ifdef notdef
- fprintf(af, "\\\n /* avolname = %s, mname = %s,\n * mvolname = %s, mexp_name = %s,\n * mexp_volname = %s\n */\\\n",
- ap->a_volname, mp->m_name, mp->m_volname, mp->m_exported->m_name, mp->m_exported->m_volname);
-#endif
- /*
- * Output any selectors
- */
- if (mp->m_sel)
- fprintf(af, "%s;", mp->m_sel);
- /*
- * Print host and volname of exported filesystem
- */
- fprintf(af, "rhost:=%s",
- mp->m_dk->d_host->h_lochost ?
- mp->m_dk->d_host->h_lochost :
- mp->m_dk->d_host->h_hostname);
- fprintf(af, ";rfs:=%s", mp->m_exported->m_volname);
- /*
- * Now determine whether a sublink is required.
- */
- if (exp_namelen < namelen || mvolnlen < volnlen) {
- char sublink[1024];
- sublink[0] = '\0';
- if (exp_namelen < namelen) {
- strlcat(sublink,
- mp->m_name + exp_namelen + 1,
- sizeof(sublink));
- if (mvolnlen < volnlen)
- strlcat(sublink, "/",
- sizeof(sublink));
- }
- if (mvolnlen < volnlen)
- strlcat(sublink,
- ap->a_volname + mvolnlen + 1,
- sizeof(sublink));
-
- fprintf(af, ";sublink:=%s", sublink);
- }
- }
- fputc('\n', af);
- } else if (ap->a_symlink) {
- /*
- * A specific link.
- *
- * type:=link;fs:=whatever
- */
- fprintf(af, "%s type:=link;fs:=%s\n", ap->a_name + sk, ap->a_symlink);
- }
- return errors;
-}
-
-/*
- * Write a single automount configuration file
- */
-static int write_amount(q, def)
-qelem *q;
-char *def;
-{
- automount *ap;
- int errors = 0;
- int direct = 0;
-
- /*
- * Output all indirect maps
- */
- ITER(ap, automount, q) {
- FILE *af;
- char *p;
- /*
- * If there is no a_mount node then this is really
- * a direct mount, so just keep a count and continue.
- * Direct mounts are output into a special file during
- * the second pass below.
- */
- if (!ap->a_mount) {
- direct++;
- continue;
- }
- p = strrchr(ap->a_name, '/');
- if (!p) p = ap->a_name;
- else p++;
- af = pref_open(mount_pref, p, gen_hdr, ap->a_name);
- if (af) {
- show_new(ap->a_name);
- fputs("/defaults ", af);
- if (*def)
- fprintf(af, "%s;", def);
- fputs("type:=nfs\n", af);
- errors += write_amount_info(af, ap, strlen(ap->a_name) + 1);
- errors += pref_close(af);
- }
- }
-
- /*
- * Output any direct map entries which were found during the
- * previous pass over the data.
- */
- if (direct) {
- FILE *af = pref_open(mount_pref, "direct.map", info_hdr, "direct mount");
- if (af) {
- show_new("direct mounts");
- fputs("/defaults ", af);
- if (*def)
- fprintf(af, "%s;", def);
- fputs("type:=nfs\n", af);
- ITER(ap, automount, q)
- if (!ap->a_mount)
- errors += write_amount_info(af, ap, 1);
- errors += pref_close(af);
- }
- }
-
- return errors;
-}
-
-/*
- * Write all the needed automount configuration files
- */
-write_atab(q)
-qelem *q;
-{
- int errors = 0;
-
- if (mount_pref) {
- auto_tree *tp;
- show_area_being_processed("write automount", "");
- ITER(tp, auto_tree, q)
- errors += write_amount(tp->t_mount, tp->t_defaults);
- }
-
- return errors;
-}
diff --git a/usr.sbin/amd/fsinfo/wr_bparam.c b/usr.sbin/amd/fsinfo/wr_bparam.c
deleted file mode 100644
index 60efbab92a9..00000000000
--- a/usr.sbin/amd/fsinfo/wr_bparam.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)wr_bparam.c 8.1 (Berkeley) 6/6/93
- * $Id: wr_bparam.c,v 1.2 2003/06/02 23:36:52 millert Exp $
- */
-
-#include "../fsinfo/fsinfo.h"
-
-/*
- * Write a host/path in NFS format
- */
-static int write_nfsname(ef, fp, hn)
-FILE *ef;
-fsmount *fp;
-char *hn;
-{
- int errors = 0;
- char *h = strdup(fp->f_ref->m_dk->d_host->h_hostname);
- domain_strip(h, hn);
- fprintf(ef, "%s:%s", h, fp->f_volname);
- free(h);
- return errors;
-}
-
-/*
- * Write a bootparams entry for a host
- */
-static int write_boot_info(ef, hp)
-FILE *ef;
-host *hp;
-{
- int errors = 0;
- fprintf(ef, "%s\troot=", hp->h_hostname);
- errors += write_nfsname(ef, hp->h_netroot, hp->h_hostname);
- fputs(" swap=", ef);
- errors += write_nfsname(ef, hp->h_netswap, hp->h_hostname);
- fputs("\n", ef);
-
- return 0;
-}
-
-/*
- * Output a bootparams file
- */
-int write_bootparams(q)
-qelem *q;
-{
- int errors = 0;
-
- if (bootparams_pref) {
- FILE *ef = pref_open(bootparams_pref, "bootparams", info_hdr, "bootparams");
- if (ef) {
- host *hp;
- ITER(hp, host, q)
- if (hp->h_netroot && hp->h_netswap)
- errors += write_boot_info(ef, hp);
- errors += pref_close(ef);
- } else {
- errors++;
- }
- }
-
- return errors;
-}
diff --git a/usr.sbin/amd/fsinfo/wr_dumpset.c b/usr.sbin/amd/fsinfo/wr_dumpset.c
deleted file mode 100644
index fe79df69457..00000000000
--- a/usr.sbin/amd/fsinfo/wr_dumpset.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)wr_dumpset.c 8.1 (Berkeley) 6/6/93
- * $Id: wr_dumpset.c,v 1.2 2003/06/02 23:36:52 millert Exp $
- */
-
-#include "../fsinfo/fsinfo.h"
-
-static int write_dumpset_info(ef, q)
-FILE *ef;
-qelem *q;
-{
- int errors = 0;
- disk_fs *dp;
-
- ITER(dp, disk_fs, q) {
- if (dp->d_dumpset) {
- fprintf(ef, "%s\t%s:%-30s\t# %s\n",
- dp->d_dumpset,
- dp->d_host->h_lochost ?
- dp->d_host->h_lochost :
- dp->d_host->h_hostname,
- dp->d_mountpt,
- dp->d_dev);
- }
- }
- return errors;
-}
-
-int write_dumpset(q)
-qelem *q;
-{
- int errors = 0;
-
- if (dumpset_pref) {
- FILE *ef = pref_open(dumpset_pref, "dumpsets", info_hdr, "exabyte dumpset");
- if (ef) {
- host *hp;
- ITER(hp, host, q) {
- if (hp->h_disk_fs) {
- errors += write_dumpset_info(ef, hp->h_disk_fs);
- }
- }
- errors += pref_close(ef);
- } else {
- errors++;
- }
- }
-
- return errors;
-}
diff --git a/usr.sbin/amd/fsinfo/wr_exportfs.c b/usr.sbin/amd/fsinfo/wr_exportfs.c
deleted file mode 100644
index 0901af98d92..00000000000
--- a/usr.sbin/amd/fsinfo/wr_exportfs.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)wr_exportfs.c 8.1 (Berkeley) 6/6/93
- * $Id: wr_exportfs.c,v 1.2 2003/06/02 23:36:52 millert Exp $
- */
-
-#include "../fsinfo/fsinfo.h"
-
-static int write_export_info(ef, q, errors)
-FILE *ef;
-qelem *q;
-int errors;
-{
- mount *mp;
-
- ITER(mp, mount, q) {
- if (mp->m_mask & (1<<DM_EXPORTFS))
- fprintf(ef, "%s\t%s\n", mp->m_volname, mp->m_exportfs);
- if (mp->m_mount)
- errors += write_export_info(ef, mp->m_mount, 0);
- }
-
- return errors;
-}
-
-static int write_dkexports(ef, q)
-FILE *ef;
-qelem *q;
-{
- int errors = 0;
- disk_fs *dp;
-
- ITER(dp, disk_fs, q) {
- if (dp->d_mount)
- errors += write_export_info(ef, dp->d_mount, 0);
- }
- return errors;
-}
-
-int write_exportfs(q)
-qelem *q;
-{
- int errors = 0;
-
- if (exportfs_pref) {
- host *hp;
- show_area_being_processed("write exportfs", "");
- ITER(hp, host, q) {
- if (hp->h_disk_fs) {
- FILE *ef = pref_open(exportfs_pref, hp->h_hostname, gen_hdr, hp->h_hostname);
- if (ef) {
- show_new(hp->h_hostname);
- errors += write_dkexports(ef, hp->h_disk_fs);
- errors += pref_close(ef);
- } else {
- errors++;
- }
- }
- }
- }
-
- return errors;
-}
diff --git a/usr.sbin/amd/fsinfo/wr_fstab.c b/usr.sbin/amd/fsinfo/wr_fstab.c
deleted file mode 100644
index 1d0a9537129..00000000000
--- a/usr.sbin/amd/fsinfo/wr_fstab.c
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)wr_fstab.c 8.1 (Berkeley) 6/6/93
- * $Id: wr_fstab.c,v 1.2 2003/06/02 23:36:52 millert Exp $
- */
-
-#include "../fsinfo/fsinfo.h"
-
-/* ---------- AIX 1 ------------------------------ */
-
-/*
- * AIX 1 format
- */
-static void write_aix1_dkfstab(ef, dp)
-FILE *ef;
-disk_fs *dp;
-{
- char *hp = strdup(dp->d_host->h_hostname);
- char *p = strchr(hp, '.');
- if (p)
- *p = '\0';
-
- fprintf(ef, "\n%s:\n\tdev = %s\n\tvfs = %s\n\ttype = %s\n\tlog = %s\n\tvol = %s\n\topts = %s\n\tmount = true\n\tcheck = true\n\tfree = false\n",
- dp->d_mountpt,
- dp->d_dev,
- dp->d_fstype,
- dp->d_fstype,
- dp->d_log,
- dp->d_mountpt,
- dp->d_opts);
- free(hp);
-}
-
-static void write_aix1_dkrmount(ef, hn, fp)
-FILE *ef;
-char *hn;
-fsmount *fp;
-{
- char *h = strdup(fp->f_ref->m_dk->d_host->h_hostname);
- char *hp = strdup(h);
- char *p = strchr(hp, '.');
- if (p)
- *p = '\0';
- domain_strip(h, hn);
- fprintf(ef, "\n%s:\n\tsite = %s\n\tdev = %s:%s\n\tvfs = %s\n\ttype = %s\n\tvol = %s\n\topts = %s\n\tmount = true\n\tcheck = true\n\tfree = false\n",
- fp->f_localname,
- hp,
- h,
- fp->f_volname,
- fp->f_fstype,
- fp->f_fstype,
- fp->f_localname,
- fp->f_opts);
-
- free(hp);
- free(h);
-}
-
-/* ---------- AIX 3 ------------------------------ */
-
-/*
- * AIX 3 format
- */
-static void write_aix3_dkfstab(ef, dp)
-FILE *ef;
-disk_fs *dp;
-{
- if (strcmp(dp->d_fstype, "jfs") == 0 && strncmp(dp->d_dev, "/dev/", 5) == 0 && !dp->d_log)
- error("aix 3 needs a log device for journalled filesystem (jfs) mounts");
-
- fprintf(ef, "\n%s:\n\tdev = %s\n\tvfs = %s\n\ttype = %s\n\tlog = %s\n\tvol = %s\n\topts = %s\n\tmount = true\n\tcheck = true\n\tfree = false\n",
- dp->d_mountpt,
- dp->d_dev,
- dp->d_fstype,
- dp->d_fstype,
- dp->d_log,
- dp->d_mountpt,
- dp->d_opts);
-}
-
-static void write_aix3_dkrmount(ef, hn, fp)
-FILE *ef;
-char *hn;
-fsmount *fp;
-{
- char *h = strdup(fp->f_ref->m_dk->d_host->h_hostname);
- domain_strip(h, hn);
- fprintf(ef, "\n%s:\n\tdev = %s:%s\n\tvfs = %s\n\ttype = %s\n\tvol = %s\n\topts = %s\n\tmount = true\n\tcheck = true\n\tfree = false\n",
- fp->f_localname,
- h,
- fp->f_volname,
- fp->f_fstype,
- fp->f_fstype,
- fp->f_localname,
- fp->f_opts);
-
- free(h);
-}
-
-/* ---------- Ultrix ----------------------------- */
-
-static void write_ultrix_dkfstab(ef, dp)
-FILE *ef;
-disk_fs *dp;
-{
- fprintf(ef, "%s:%s:%s:%s:%d:%d\n",
- dp->d_dev,
- dp->d_mountpt,
- dp->d_fstype,
- dp->d_opts,
- dp->d_freq,
- dp->d_passno);
-}
-
-static void write_ultrix_dkrmount(ef, hn, fp)
-FILE *ef;
-char *hn;
-fsmount *fp;
-{
- char *h = strdup(fp->f_ref->m_dk->d_host->h_hostname);
- domain_strip(h, hn);
- fprintf(ef, "%s@%s:%s:%s:%s:0:0\n",
- fp->f_volname,
- h,
- fp->f_localname,
- fp->f_fstype,
- fp->f_opts);
- free(h);
-}
-
-/* ---------- Generic ---------------------------- */
-
-/*
- * Generic (BSD, SunOS, HPUX) format
- */
-static void write_generic_dkfstab(ef, dp)
-FILE *ef;
-disk_fs *dp;
-{
- fprintf(ef, "%s %s %s %s %d %d\n",
- dp->d_dev,
- dp->d_mountpt,
- dp->d_fstype,
- dp->d_opts,
- dp->d_freq,
- dp->d_passno);
-}
-
-static void write_generic_dkrmount(ef, hn, fp)
-FILE *ef;
-char *hn;
-fsmount *fp;
-{
- char *h = strdup(fp->f_ref->m_dk->d_host->h_hostname);
- domain_strip(h, hn);
- fprintf(ef, "%s:%s %s %s %s 0 0\n",
- h,
- fp->f_volname,
- fp->f_localname,
- fp->f_fstype,
- fp->f_opts);
- free(h);
-}
-
-/* ----------------------------------------------- */
-
-static struct os_fstab_type {
- char *os_name;
- void (*op_fstab)();
- void (*op_mount)();
-} os_tabs[] = {
- { "aix1", write_aix1_dkfstab, write_aix1_dkrmount }, /* AIX 1 */
- { "aix3", write_aix3_dkfstab, write_aix3_dkrmount }, /* AIX 3 */
- { "generic", write_generic_dkfstab, write_generic_dkrmount }, /* Generic */
- { "u2_0", write_ultrix_dkfstab, write_ultrix_dkrmount }, /* Ultrix */
- { "u3_0", write_ultrix_dkfstab, write_ultrix_dkrmount }, /* Ultrix */
- { "u4_0", write_ultrix_dkfstab, write_ultrix_dkrmount }, /* Ultrix */
- { 0, 0, 0 }
-};
-
-#define GENERIC_OS_NAME "generic"
-
-static struct os_fstab_type *find_fstab_type(hp)
-host *hp;
-{
- struct os_fstab_type *op = 0;
- char *os_name = 0;
-
-again:;
- if (os_name == 0) {
- if (ISSET(hp->h_mask, HF_OS))
- os_name = hp->h_os;
- else
- os_name = GENERIC_OS_NAME;
- }
-
- for (op = os_tabs; op->os_name; op++)
- if (strcmp(os_name, op->os_name) == 0)
- return op;
-
- os_name = GENERIC_OS_NAME;
- goto again;
-}
-
-static int write_dkfstab(ef, q, output)
-FILE *ef;
-qelem *q;
-void (*output)();
-{
- int errors = 0;
- disk_fs *dp;
-
- ITER(dp, disk_fs, q)
- if (strcmp(dp->d_fstype, "export") != 0)
- (*output)(ef, dp);
-
- return errors;
-}
-
-static int write_dkrmount(ef, q, hn, output)
-FILE *ef;
-qelem *q;
-char *hn;
-void (*output)();
-{
- int errors = 0;
- fsmount *fp;
-
- ITER(fp, fsmount, q)
- (*output)(ef, hn, fp);
-
- return errors;
-}
-
-int write_fstab(q)
-qelem *q;
-{
- int errors = 0;
-
- if (fstab_pref) {
- host *hp;
- show_area_being_processed("write fstab", 4);
- ITER(hp, host, q) {
- if (hp->h_disk_fs || hp->h_mount) {
- FILE *ef = pref_open(fstab_pref, hp->h_hostname, gen_hdr, hp->h_hostname);
- if (ef) {
- struct os_fstab_type *op = find_fstab_type(hp);
- show_new(hp->h_hostname);
- if (hp->h_disk_fs)
- errors += write_dkfstab(ef, hp->h_disk_fs, op->op_fstab);
- else
- log("No local disk mounts on %s", hp->h_hostname);
-
- if (hp->h_mount)
- errors += write_dkrmount(ef, hp->h_mount, hp->h_hostname, op->op_mount);
-
- pref_close(ef);
- }
- } else {
- error("no disk mounts on %s", hp->h_hostname);
- }
- }
- }
-
- return errors;
-}
diff --git a/usr.sbin/amd/include/config.h b/usr.sbin/amd/include/config.h
index f744c1b96c9..bb6c6acbd23 100644
--- a/usr.sbin/amd/include/config.h
+++ b/usr.sbin/amd/include/config.h
@@ -32,20 +32,14 @@
* SUCH DAMAGE.
*
* from: @(#)config.h 8.1 (Berkeley) 6/6/93
- * $Id: config.h,v 1.7 2005/12/21 01:40:24 millert Exp $
+ * $Id: config.h,v 1.8 2014/10/20 00:20:04 guenther Exp $
*/
-#ifdef __GNUC__
-#define INLINE /* __inline */
-#else
-#define INLINE
-#endif /* __GNUC__ */
-
/*
* Pick up target dependent definitions
*/
#include "os-defaults.h"
-#include OS_HDR
+#include "os-bsd44.h"
#include <errno.h>
#include <stdio.h>
@@ -59,9 +53,7 @@ extern char *__progname;
extern char hostname[]; /* "kiska" */
extern pid_t mypid; /* Current process id */
-#ifdef HAS_SYSLOG
extern int syslogging; /* Really using syslog */
-#endif /* HAS_SYSLOG */
extern FILE *logfp; /* Log file */
extern int xlog_level; /* Logging level */
extern int xlog_level_init;
diff --git a/usr.sbin/amd/include/uwait.h b/usr.sbin/amd/include/uwait.h
deleted file mode 100644
index 9c397f9048d..00000000000
--- a/usr.sbin/amd/include/uwait.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1989 Jan-Simon Pendry
- * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)uwait.h 8.1 (Berkeley) 6/6/93
- * $Id: uwait.h,v 1.2 2003/06/02 23:36:52 millert Exp $
- */
-
-#if defined(mc68k) || defined(mc68000) || defined(mc68020) || defined(sparc) || defined(hp9000s300) || defined(hp9000s800)
-#define BITS_BIGENDIAN
-#endif
-#if defined(vax) || defined(i386)
-#define BITS_LITTLENDIAN
-#endif
-#if !defined BITS_BIGENDIAN && !defined BITS_LITTLENDIAN
- #error Do not know my byte ordering
-#endif
-
-/*
- * Structure of the information in the first word returned by both
- * wait and wait3. If w_stopval==WSTOPPED, then the second structure
- * describes the information returned, else the first. See WUNTRACED below.
- */
-union wait {
- int w_status; /* used in syscall */
- /*
- * Terminated process status.
- */
- struct {
-#ifdef BITS_LITTLENDIAN
- unsigned short w_Termsig:7; /* termination signal */
- unsigned short w_Coredump:1; /* core dump indicator */
- unsigned short w_Retcode:8; /* exit code if w_termsig==0 */
-#endif
-#ifdef BITS_BIGENDIAN
- unsigned short w_Fill1:16; /* high 16 bits unused */
- unsigned short w_Retcode:8; /* exit code if w_termsig==0 */
- unsigned short w_Coredump:1; /* core dump indicator */
- unsigned short w_Termsig:7; /* termination signal */
-#endif
- } w_U;
-};
-#define w_termsig w_U.w_Termsig
-#define w_coredump w_U.w_Coredump
-#define w_retcode w_U.w_Retcode
-
-#define WIFSIGNALED(x) ((x).w_termsig != 0)
-#define WIFEXITED(x) ((x).w_termsig == 0)
diff --git a/usr.sbin/amd/mk-amd-map/Makefile b/usr.sbin/amd/mk-amd-map/Makefile
deleted file mode 100644
index b22812aac96..00000000000
--- a/usr.sbin/amd/mk-amd-map/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-# from: @(#)Makefile 8.1 (Berkeley) 6/28/93
-# $Id: Makefile,v 1.1 1995/10/18 08:47:22 deraadt Exp $
-
-.include "../config/Makefile.config"
-
-PROG= mk-amd-map
-CFLAGS+=-I${.CURDIR}/../include
-CFLAGS+=-I${.CURDIR}/../rpcx
-CFLAGS+=-I${.CURDIR}/../config
-CFLAGS+=-DOS_HDR=\"os-${OS}.h\"
-MAN= mk-amd-map.8
-
-.include "../../Makefile.inc"
-.include <bsd.prog.mk>
diff --git a/usr.sbin/amd/mk-amd-map/mk-amd-map.8 b/usr.sbin/amd/mk-amd-map/mk-amd-map.8
deleted file mode 100644
index dd30911fabb..00000000000
--- a/usr.sbin/amd/mk-amd-map/mk-amd-map.8
+++ /dev/null
@@ -1,57 +0,0 @@
-.\" Copyright (c) 1993 Jan-Simon Pendry
-.\" 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.
-.\"
-.\" from: @(#)mk-amd-map.8 8.1 (Berkeley) 6/28/93
-.\" $Id: mk-amd-map.8,v 1.8 2007/05/31 19:20:22 jmc Exp $
-.\"
-.Dd $Mdocdate: May 31 2007 $
-.Dt MK-AMD-MAP 8
-.Os
-.Sh NAME
-.Nm mk-amd-map
-.Nd create database maps for Amd
-.Sh SYNOPSIS
-.Nm mk-amd-map
-.Op Fl p
-.Ar mapname
-.Sh DESCRIPTION
-.Nm
-creates the database maps used by the keyed map lookups in
-.Xr amd 8 .
-It reads input from the named file
-and outputs them to a correspondingly named
-hashed database.
-.Pp
-The options are as follows:
-.Bl -tag -width Ds
-.It Fl p
-Print the map on standard output instead of generating a database.
-This is usually used to merge continuation lines into one physical line.
-.El
-.Sh SEE ALSO
-.Xr amd 8
diff --git a/usr.sbin/amd/mk-amd-map/mk-amd-map.c b/usr.sbin/amd/mk-amd-map/mk-amd-map.c
deleted file mode 100644
index 1735a7772e5..00000000000
--- a/usr.sbin/amd/mk-amd-map/mk-amd-map.c
+++ /dev/null
@@ -1,366 +0,0 @@
-/*
- * Copyright (c) 1990, 1993 Jan-Simon Pendry
- * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry at Imperial College, London.
- *
- * 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.
- *
- * from: @(#)mk-amd-map.c 8.1 (Berkeley) 6/28/93
- * $Id: mk-amd-map.c,v 1.11 2013/12/03 02:14:58 deraadt Exp $
- */
-
-/*
- * Convert a file map into an ndbm map
- */
-
-#include "am.h"
-
-#ifndef SIGINT
-#include <signal.h>
-#endif
-#include <unistd.h>
-
-#ifdef OS_HAS_NDBM
-#define HAS_DATABASE
-#include <ndbm.h>
-
-#ifdef DBM_SUFFIX
-#define USING_DB
-#endif
-
-#define create_database(name) dbm_open(name, O_RDWR|O_CREAT, 0644)
-
-static int
-store_data(void *db, char *k, char *v)
-{
- datum key, val;
-
- key.dptr = k; val.dptr = v;
- key.dsize = strlen(k) + 1;
- val.dsize = strlen(v) + 1;
- return dbm_store((DBM *) db, key, val, DBM_INSERT);
-}
-
-#endif /* OS_HAS_NDBM */
-
-#ifdef HAS_DATABASE
-#include <fcntl.h>
-#include <ctype.h>
-
-static int
-read_line(char *buf, int size, FILE *fp)
-{
- int done = 0;
-
- do {
- while (fgets(buf, size, fp)) {
- int len = strlen(buf);
- done += len;
- if (len > 1 && buf[len-2] == '\\' &&
- buf[len-1] == '\n') {
- int ch;
- buf += len - 2;
- size -= len - 2;
- *buf = '\n'; buf[1] = '\0';
- /*
- * Skip leading white space on next line
- */
- while ((ch = getc(fp)) != EOF &&
- isascii(ch) && isspace(ch))
- ;
- (void) ungetc(ch, fp);
- } else {
- return done;
- }
- }
- } while (size > 0 && !feof(fp));
-
- return done;
-}
-
-/*
- * Read through a map
- */
-static int
-read_file(FILE *fp, char *map, void *db)
-{
- char key_val[2048];
- int chuck = 0;
- int line_no = 0;
- int errs = 0;
-
- while (read_line(key_val, sizeof(key_val), fp)) {
- char *kp;
- char *cp;
- char *hash;
- int len = strlen(key_val);
- line_no++;
-
- /*
- * Make sure we got the whole line
- */
- if (key_val[len-1] != '\n') {
- fprintf(stderr, "line %d in \"%s\" is too long", line_no, map);
- chuck = 1;
- } else {
- key_val[len-1] = '\0';
- }
-
- /*
- * Strip comments
- */
- hash = strchr(key_val, '#');
- if (hash)
- *hash = '\0';
-
- /*
- * Find start of key
- */
- for (kp = key_val;
- isascii((unsigned char)*kp) && isspace((unsigned char)*kp);
- kp++)
- ;
-
- /*
- * Ignore blank lines
- */
- if (!*kp)
- goto again;
-
- /*
- * Find end of key
- */
- for (cp = kp; *cp &&
- (!isascii((unsigned char)*cp) || !isspace((unsigned char)*cp));
- cp++)
- ;
-
- /*
- * Check whether key matches, or whether
- * the entry is a wildcard entry.
- */
- if (*cp)
- *cp++ = '\0';
- while (isascii((unsigned char)*cp) && isspace((unsigned char)*cp))
- cp++;
- if (*kp == '+') {
- fprintf(stderr, "Can't interpolate %s\n", kp);
- errs++;
- } else if (*cp) {
- if (db) {
- if (store_data(db, kp, cp) < 0) {
- fprintf(stderr, "Could store %s -> %s\n", kp, cp);
- errs++;
- }
- } else {
- printf("%s\t%s\n", kp, cp);
- }
- } else {
- fprintf(stderr, "%s: line %d has no value field", map, line_no);
- errs++;
- }
-
-again:
- /*
- * If the last read didn't get a whole line then
- * throw away the remainder before continuing...
- */
- if (chuck) {
- while (fgets(key_val, sizeof(key_val), fp) &&
- !strchr(key_val, '\n'))
- ;
- chuck = 0;
- }
- }
- return errs;
-}
-
-static int
-remove_file(char *f)
-{
- if (unlink(f) < 0 && errno != ENOENT)
- return -1;
- return 0;
-}
-
-int
-main(int argc, char *argv[])
-{
- FILE *mapf;
- char *map;
- int rc = 0;
- DBM *mapd;
- static char maptmp[] = "dbmXXXXXXXXXX";
- char maptpag[16];
- char *mappag;
-#ifndef USING_DB
- char maptdir[16];
- char *mapdir;
-#endif
- int len;
- char *sl;
- int printit = 0;
- int usage = 0;
- int ch;
- extern int optind;
-
- while ((ch = getopt(argc, argv, "p")) != -1)
- switch (ch) {
- case 'p':
- printit = 1;
- break;
- default:
- usage++;
- break;
- }
-
- if (usage || optind != (argc - 1)) {
- fputs("Usage: mk-amd-map [-p] file-map\n", stderr);
- exit(1);
- }
-
- map = argv[optind];
- sl = strrchr(map, '/');
- if (sl) {
- *sl = '\0';
- if (chdir(map) < 0) {
- fputs("Can't chdir to ", stderr);
- perror(map);
- exit(1);
- }
- map = sl + 1;
- }
-
- if (!printit) {
-#ifdef USING_DB
- len = strlen(map) + 4;
- mappag = (char *) malloc(len);
- if (!mappag) {
- perror("mk-amd-map: malloc");
- exit(1);
- }
- mktemp(maptmp);
- snprintf(maptpag, sizeof(maptpag), "%s.db", maptmp);
- if (remove_file(maptpag) < 0) {
- fprintf(stderr, "Can't remove existing temporary file");
- perror(maptpag);
- exit(1);
- }
-#else
- len = strlen(map) + 5;
- mappag = (char *) malloc(len);
- mapdir = (char *) malloc(len);
- if (!mappag || !mapdir) {
- perror("mk-amd-map: malloc");
- exit(1);
- }
- mktemp(maptmp);
- snprintf(maptpag, sizeof(maptpag), "%s.pag", maptmp);
- snprintf(maptdir, sizeof(maptdir), "%s.dir", maptmp);
- if (remove_file(maptpag) < 0 || remove_file(maptdir) < 0) {
- fprintf(stderr, "Can't remove existing temporary files; %s and", maptpag);
- perror(maptdir);
- exit(1);
- }
-#endif
- }
-
- mapf = fopen(map, "r");
- if (mapf && !printit)
- mapd = create_database(maptmp);
- else
- mapd = 0;
-
-#ifndef DEBUG
- signal(SIGINT, SIG_IGN);
-#endif
-
- if (mapd || printit) {
- int error = read_file(mapf, map, mapd);
- if (mapd)
- dbm_close(mapd);
- (void) fclose(mapf);
- if (printit) {
- if (error) {
- fprintf(stderr, "Error creating ndbm map for %s\n", map);
- rc = 1;
- }
- } else {
- if (error) {
- fprintf(stderr, "Error reading source file %s\n", map);
- rc = 1;
- } else {
-#ifdef USING_DB
- snprintf(mappag, len, "%s.db", map);
- if (rename(maptpag, mappag) < 0) {
- fprintf(stderr, "Couldn't rename %s to ", maptpag);
- perror(mappag);
- /* Throw away the temporary map */
- unlink(maptpag);
- rc = 1;
- }
-#else
- snprintf(mappag, len, "%s.pag", map);
- snprintf(mapdir, len, "%s.dir", map);
- if (rename(maptpag, mappag) < 0) {
- fprintf(stderr, "Couldn't rename %s to ", maptpag);
- perror(mappag);
- /* Throw away the temporary map */
- unlink(maptpag);
- unlink(maptdir);
- rc = 1;
- } else if (rename(maptdir, mapdir) < 0) {
- fprintf(stderr, "Couldn't rename %s to ", maptdir);
- perror(mapdir);
- /* Put the .pag file back */
- rename(mappag, maptpag);
- /* Throw away remaining part of original map */
- unlink(mapdir);
- fprintf(stderr,
- "WARNING: existing map \"%s.{dir,pag}\" destroyed\n",
- map);
- rc = 1;
- }
-#endif
- }
- }
- } else {
- fprintf(stderr, "Can't open \"%s.{dir,pag}\" for ", map);
- perror("writing");
- rc = 1;
- }
- exit(rc);
-}
-#else
-main()
-{
- fputs("mk-amd-map: This system does not support hashed database files\n", stderr);
- exit(1);
-}
-#endif /* HAS_DATABASE */