xref: /csrg-svn/usr.sbin/amd/config/os-bsd44.h (revision 60218)
144630Smckusick /*
244630Smckusick  * Copyright (c) 1990 Jan-Simon Pendry
344630Smckusick  * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
444630Smckusick  * Copyright (c) 1990 The Regents of the University of California.
544630Smckusick  * All rights reserved.
644630Smckusick  *
744630Smckusick  * This code is derived from software contributed to Berkeley by
844630Smckusick  * Jan-Simon Pendry at Imperial College, London.
944630Smckusick  *
1044630Smckusick  * %sccs.include.redist.c%
1144630Smckusick  *
12*60218Spendry  *	@(#)os-bsd44.h	5.5 (Berkeley) 05/22/93
1349685Spendry  *
1452452Spendry  * $Id: os-bsd44.h,v 5.2.2.1 1992/02/09 15:10:11 jsp beta $
1549685Spendry  *
1649685Spendry  * 4.4 BSD definitions for Amd (automounter)
1744630Smckusick  */
1844630Smckusick 
1944630Smckusick /*
2044630Smckusick  * Does the compiler grok void *
2144630Smckusick  */
2244630Smckusick #define	VOIDP
2344630Smckusick 
2444630Smckusick /*
2544630Smckusick  * Which version of the Sun RPC library we are using
2644630Smckusick  * This is the implementation release number, not
2744630Smckusick  * the protocol revision number.
2844630Smckusick  */
2947534Spendry #define	RPC_4
3044630Smckusick 
3144630Smckusick /*
3244630Smckusick  * Which version of the NFS interface are we using.
3344630Smckusick  * This is the implementation release number, not
3444630Smckusick  * the protocol revision number.
3544630Smckusick  */
3644630Smckusick #define	NFS_44
3744630Smckusick #define HAS_TCP_NFS
3844630Smckusick 
3944630Smckusick /*
4044630Smckusick  * Does this OS have NDBM support?
4144630Smckusick  */
4244630Smckusick #define OS_HAS_NDBM
4344630Smckusick 
4444630Smckusick /*
4547534Spendry  * 4.4 doesn't provide NIS.
4647534Spendry  */
4747534Spendry #undef HAS_NIS_MAPS
4847534Spendry 
4947534Spendry /*
50*60218Spendry  * OS provides strerror()
51*60218Spendry  */
52*60218Spendry #define HAS_STRERROR
53*60218Spendry 
54*60218Spendry /*
5544630Smckusick  * The mount table is obtained from the kernel
5644630Smckusick  */
5744630Smckusick #undef	UPDATE_MTAB
5844630Smckusick 
5944630Smckusick /*
6044630Smckusick  * No mntent info on 4.4 BSD
6144630Smckusick  */
6244630Smckusick #undef	MNTENT_HDR
6344630Smckusick 
6444630Smckusick /*
6544630Smckusick  * Name of filesystem types
6644630Smckusick  */
6744630Smckusick #define	MOUNT_TYPE_NFS	MOUNT_NFS
6844630Smckusick #define	MOUNT_TYPE_UFS	MOUNT_UFS
6944630Smckusick #undef MTAB_TYPE_UFS
7044630Smckusick #define	MTAB_TYPE_UFS	"ufs"
7144630Smckusick #define	MTAB_TYPE_MFS	"mfs"
7244630Smckusick 
7344630Smckusick /*
7444630Smckusick  * How to unmount filesystems
7544630Smckusick  */
7644630Smckusick #undef UNMOUNT_TRAP
7744630Smckusick #undef	NEED_UMOUNT_FS
7844630Smckusick #define	NEED_UMOUNT_BSD
7944630Smckusick 
8044630Smckusick /*
8144630Smckusick  * How to copy an address into an NFS filehandle
8244630Smckusick  */
8344630Smckusick #undef NFS_SA_DREF
8444630Smckusick #define	NFS_SA_DREF(dst, src) { \
8544630Smckusick 		(dst).addr = (struct sockaddr *) (src); \
8652452Spendry 		(dst).addrlen = sizeof(*src); \
8744630Smckusick 		(dst).sotype = SOCK_DGRAM; \
8844630Smckusick 		(dst).proto = 0; \
8944630Smckusick 	}
9044630Smckusick 
9144630Smckusick /*
9244630Smckusick  * Byte ordering
9344630Smckusick  */
9444630Smckusick #ifndef BYTE_ORDER
9544630Smckusick #include <machine/endian.h>
9644630Smckusick #endif /* BYTE_ORDER */
9744630Smckusick 
9844630Smckusick #undef ARCH_ENDIAN
9944630Smckusick #if BYTE_ORDER == LITTLE_ENDIAN
10044630Smckusick #define ARCH_ENDIAN "little"
10144630Smckusick #else
10244630Smckusick #if BYTE_ORDER == BIG_ENDIAN
10344630Smckusick #define ARCH_ENDIAN "big"
10444630Smckusick #else
10544630Smckusick XXX - Probably no hope of running Amd on this machine!
10644630Smckusick #endif /* BIG */
10744630Smckusick #endif /* LITTLE */
10844630Smckusick 
10944630Smckusick /*
11044630Smckusick  * Miscellaneous 4.4 BSD bits
11144630Smckusick  */
11244630Smckusick #define	NEED_MNTOPT_PARSER
11344630Smckusick #define	SHORT_MOUNT_NAME
11444630Smckusick 
11544630Smckusick #define	MNTMAXSTR       128
11644630Smckusick 
11744630Smckusick #define	MNTTYPE_UFS	"ufs"		/* Un*x file system */
11844630Smckusick #define	MNTTYPE_NFS	"nfs"		/* network file system */
11944630Smckusick #define	MNTTYPE_MFS	"mfs"		/* memory file system */
12044630Smckusick #define	MNTTYPE_IGNORE	"ignore"	/* No type specified, ignore this entry */
12144630Smckusick 
12244630Smckusick #define	M_RDONLY	MNT_RDONLY
12344630Smckusick #define	M_SYNC		MNT_SYNCHRONOUS
12444630Smckusick #define	M_NOEXEC	MNT_NOEXEC
12544630Smckusick #define	M_NOSUID	MNT_NOSUID
12644630Smckusick #define	M_NODEV		MNT_NODEV
12744630Smckusick 
12844630Smckusick #define	MNTOPT_SOFT	"soft"		/* soft mount */
12944630Smckusick #define	MNTOPT_INTR	"intr"		/* interrupts allowed */
13044630Smckusick 
13152452Spendry #define NFSMNT_HOSTNAME	0		/* hostname on 4.4 is not optional */
13252452Spendry 
13344630Smckusick struct mntent {
13444630Smckusick 	char	*mnt_fsname;	/* name of mounted file system */
13544630Smckusick 	char	*mnt_dir;	/* file system path prefix */
13644630Smckusick 	char	*mnt_type;	/* MNTTYPE_* */
13744630Smckusick 	char	*mnt_opts;	/* MNTOPT* */
13844630Smckusick 	int	mnt_freq;	/* dump frequency, in days */
13944630Smckusick 	int	mnt_passno;	/* pass number on parallel fsck */
14044630Smckusick };
14144630Smckusick 
14244630Smckusick /*
14344630Smckusick  * Type of a file handle
14444630Smckusick  */
14544630Smckusick #undef NFS_FH_TYPE
14644630Smckusick #define	NFS_FH_TYPE	nfsv2fh_t *
14744630Smckusick 
14844630Smckusick /*
14944630Smckusick  * How to get a mount list
15044630Smckusick  */
15144630Smckusick #undef	READ_MTAB_FROM_FILE
15244630Smckusick #define	READ_MTAB_BSD_STYLE
15344630Smckusick 
15444630Smckusick /*
15544630Smckusick  * The data for the mount syscall needs the path in addition to the
15644630Smckusick  * host name since that is the only source of information about the
15744630Smckusick  * mounted filesystem.
15844630Smckusick  */
15944630Smckusick #define	NFS_ARGS_NEEDS_PATH
16047534Spendry 
16147534Spendry /*
16247534Spendry  * 4.4 has RE support built in
16347534Spendry  */
16447534Spendry #undef RE_HDR
16547534Spendry #define RE_HDR <regexp.h>
166