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