xref: /original-bsd/usr.sbin/amd/config/os-bsd44.h (revision 92ab646d)
1 /* $Id: os-bsd44.h,v 5.2 90/06/23 22:20:38 jsp Rel $ */
2 
3 /*
4  * 4.4 BSD definitions for Amd (automounter)
5  *
6  * Copyright (c) 1990 Jan-Simon Pendry
7  * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
8  * Copyright (c) 1990 The Regents of the University of California.
9  * All rights reserved.
10  *
11  * This code is derived from software contributed to Berkeley by
12  * Jan-Simon Pendry at Imperial College, London.
13  *
14  * %sccs.include.redist.c%
15  *
16  *	@(#)os-bsd44.h	5.1 (Berkeley) 06/29/90
17  */
18 
19 /*
20  * Does the compiler grok void *
21  */
22 #define	VOIDP
23 
24 /*
25  * Which version of the Sun RPC library we are using
26  * This is the implementation release number, not
27  * the protocol revision number.
28  */
29 #define	RPC_3
30 
31 /*
32  * Which version of the NFS interface are we using.
33  * This is the implementation release number, not
34  * the protocol revision number.
35  */
36 #define	NFS_44
37 #define HAS_TCP_NFS
38 
39 /*
40  * Does this OS have NDBM support?
41  */
42 #define OS_HAS_NDBM
43 
44 /*
45  * The mount table is obtained from the kernel
46  */
47 #undef	UPDATE_MTAB
48 
49 /*
50  * No mntent info on 4.4 BSD
51  */
52 #undef	MNTENT_HDR
53 
54 /*
55  * Name of filesystem types
56  */
57 #define	MOUNT_TYPE_NFS	MOUNT_NFS
58 #define	MOUNT_TYPE_UFS	MOUNT_UFS
59 #undef MTAB_TYPE_UFS
60 #define	MTAB_TYPE_UFS	"ufs"
61 #define	MTAB_TYPE_MFS	"mfs"
62 
63 /*
64  * How to unmount filesystems
65  */
66 #undef UNMOUNT_TRAP
67 #undef	NEED_UMOUNT_FS
68 #define	NEED_UMOUNT_BSD
69 
70 /*
71  * How to copy an address into an NFS filehandle
72  */
73 #undef NFS_SA_DREF
74 #define	NFS_SA_DREF(dst, src) { \
75 		(dst).addr = (struct sockaddr *) (src); \
76 		(dst).sotype = SOCK_DGRAM; \
77 		(dst).proto = 0; \
78 	}
79 
80 /*
81  * Byte ordering
82  */
83 #ifndef BYTE_ORDER
84 #include <machine/endian.h>
85 #endif /* BYTE_ORDER */
86 
87 #undef ARCH_ENDIAN
88 #if BYTE_ORDER == LITTLE_ENDIAN
89 #define ARCH_ENDIAN "little"
90 #else
91 #if BYTE_ORDER == BIG_ENDIAN
92 #define ARCH_ENDIAN "big"
93 #else
94 XXX - Probably no hope of running Amd on this machine!
95 #endif /* BIG */
96 #endif /* LITTLE */
97 
98 /*
99  * Miscellaneous 4.4 BSD bits
100  */
101 #define MISC_RPC
102 #define	NEED_MNTOPT_PARSER
103 #define	SHORT_MOUNT_NAME
104 
105 #define	MNTMAXSTR       128
106 
107 #define	MNTTYPE_UFS	"ufs"		/* Un*x file system */
108 #define	MNTTYPE_NFS	"nfs"		/* network file system */
109 #define	MNTTYPE_MFS	"mfs"		/* memory file system */
110 #define	MNTTYPE_IGNORE	"ignore"	/* No type specified, ignore this entry */
111 
112 #define	M_RDONLY	MNT_RDONLY
113 #define	M_SYNC		MNT_SYNCHRONOUS
114 #define	M_NOEXEC	MNT_NOEXEC
115 #define	M_NOSUID	MNT_NOSUID
116 #define	M_NODEV		MNT_NODEV
117 
118 #define	MNTOPT_SOFT	"soft"		/* soft mount */
119 #define	MNTOPT_INTR	"intr"		/* interrupts allowed */
120 
121 struct mntent {
122 	char	*mnt_fsname;	/* name of mounted file system */
123 	char	*mnt_dir;	/* file system path prefix */
124 	char	*mnt_type;	/* MNTTYPE_* */
125 	char	*mnt_opts;	/* MNTOPT* */
126 	int	mnt_freq;	/* dump frequency, in days */
127 	int	mnt_passno;	/* pass number on parallel fsck */
128 };
129 
130 /*
131  * Type of a file handle
132  */
133 #undef NFS_FH_TYPE
134 #define	NFS_FH_TYPE	nfsv2fh_t *
135 
136 /*
137  * How to get a mount list
138  */
139 #undef	READ_MTAB_FROM_FILE
140 #define	READ_MTAB_BSD_STYLE
141 
142 /*
143  * The data for the mount syscall needs the path in addition to the
144  * host name since that is the only source of information about the
145  * mounted filesystem.
146  */
147 #define	NFS_ARGS_NEEDS_PATH
148