xref: /original-bsd/usr.sbin/amd/config/os-aix3.h (revision baf24c0d)
1 /* $Id: os-aix3.h,v 5.2 90/06/23 22:20:33 jsp Rel $ */
2 
3 /*
4  * AIX 3.1 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-aix3.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_4
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_AIX3
37 
38 /*
39  * Does this OS have NDBM support?
40  */
41 #define OS_HAS_NDBM
42 
43 /*
44  * The mount table is obtained from the kernel
45  */
46 #undef	UPDATE_MTAB
47 
48 /*
49  * Pick up BSD bits from include files
50  */
51 #define	_BSD
52 
53 /*
54  * No mntent info on AIX 3
55  */
56 #undef	MNTENT_HDR
57 #define	MNTENT_HDR <sys/mntctl.h>
58 
59 /*
60  * Name of filesystem types
61  */
62 #define	MOUNT_TYPE_NFS	MNT_NFS
63 #define	MOUNT_TYPE_UFS	MNT_JFS
64 #undef MTAB_TYPE_UFS
65 #define	MTAB_TYPE_UFS	"jfs"
66 
67 /*
68  * How to unmount filesystems
69  */
70 #undef MOUNT_TRAP
71 #define	MOUNT_TRAP(type, mnt, flag, mnt_data) \
72 	aix3_mount(mnt->mnt_fsname, mnt->mnt_dir, flag, type, mnt_data, mnt->mnt_opts)
73 #undef	UNMOUNT_TRAP
74 #define	UNMOUNT_TRAP(mnt)	uvmount(mnt->mnt_passno, 0)
75 
76 
77 /*
78  * Byte ordering
79  */
80 #ifndef BYTE_ORDER
81 #include <sys/machine.h>
82 #endif /* BYTE_ORDER */
83 
84 #undef ARCH_ENDIAN
85 #if BYTE_ORDER == LITTLE_ENDIAN
86 #define ARCH_ENDIAN "little"
87 #else
88 #if BYTE_ORDER == BIG_ENDIAN
89 #define ARCH_ENDIAN "big"
90 #else
91 XXX - Probably no hope of running Amd on this machine!
92 #endif /* BIG */
93 #endif /* LITTLE */
94 
95 /*
96  * Miscellaneous AIX 3 bits
97  */
98 #define	NEED_MNTOPT_PARSER
99 #define	SHORT_MOUNT_NAME
100 
101 #define	MNTMAXSTR       128
102 
103 #define	MNTTYPE_UFS	"jfs"		/* Un*x file system */
104 #define	MNTTYPE_NFS	"nfs"		/* network file system */
105 #define	MNTTYPE_IGNORE	"ignore"	/* No type specified, ignore this entry */
106 
107 struct mntent {
108 	char	*mnt_fsname;	/* name of mounted file system */
109 	char	*mnt_dir;	/* file system path prefix */
110 	char	*mnt_type;	/* MNTTYPE_* */
111 	char	*mnt_opts;	/* MNTOPT* */
112 	int	mnt_freq;	/* dump frequency, in days */
113 	int	mnt_passno;	/* pass number on parallel fsck */
114 };
115 
116 #define	NFS_HDR "misc-aix3.h"
117 #define	UFS_HDR "misc-aix3.h"
118 #undef NFS_FH_DREF
119 #define	NFS_FH_DREF(dst, src) { (dst).addr = *(src); }
120 #undef NFS_SA_DREF
121 #define	NFS_SA_DREF(dst, src) { (dst).addr = *(src); }
122 #define	M_RDONLY MNT_READONLY
123 
124 /*
125  * How to get a mount list
126  */
127 #undef	READ_MTAB_FROM_FILE
128 #define	READ_MTAB_AIX3_STYLE
129 
130 /*
131  * The data for the mount syscall needs the path in addition to the
132  * host name since that is the only source of information about the
133  * mounted filesystem.
134 #define	NFS_ARGS_NEEDS_PATH
135  */
136 
137 #define	NFS_LOMAP	34
138 #define	NFS_HIMAP	99
139 #define NFS_ERROR_MAPPING \
140 static nfs_errormap[] = {	     0,75,77,99,99,99, \
141 			99,99,99,99,99,78,99,99,99,79, \
142 			99,99,70,99,35,36,37,38,39,40, \
143 			41,42,43,44,45,46,47,48,49,50, \
144 			51,52,53,54,55,56,57,58,60,61, \
145 			64,65,99,67,68,62,63,66,69,68, \
146 			99,99,99,71,99,99,99,99,99,99 \
147 			};
148 
149 #define	MOUNT_AIX3
150 
151 /*
152  * Need this too
153  */
154 #include <time.h>
155