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*49685Spendry * @(#)os-aix3.h 5.3 (Berkeley) 05/12/91 13*49685Spendry * 14*49685Spendry * $Id: os-aix3.h,v 5.2.1.2 91/05/07 22:19:25 jsp Alpha $ 15*49685Spendry * 16*49685Spendry * AIX 3.1 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 */ 2944630Smckusick #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_AIX3 3744630Smckusick 3844630Smckusick /* 3944630Smckusick * Does this OS have NDBM support? 4044630Smckusick */ 4144630Smckusick #define OS_HAS_NDBM 4244630Smckusick 4344630Smckusick /* 4444630Smckusick * The mount table is obtained from the kernel 4544630Smckusick */ 4644630Smckusick #undef UPDATE_MTAB 4744630Smckusick 4844630Smckusick /* 4944630Smckusick * Pick up BSD bits from include files 5044630Smckusick */ 5144630Smckusick #define _BSD 5244630Smckusick 5344630Smckusick /* 5444630Smckusick * No mntent info on AIX 3 5544630Smckusick */ 5644630Smckusick #undef MNTENT_HDR 5744630Smckusick #define MNTENT_HDR <sys/mntctl.h> 5844630Smckusick 5944630Smckusick /* 6044630Smckusick * Name of filesystem types 6144630Smckusick */ 6244630Smckusick #define MOUNT_TYPE_NFS MNT_NFS 6344630Smckusick #define MOUNT_TYPE_UFS MNT_JFS 6444630Smckusick #undef MTAB_TYPE_UFS 6544630Smckusick #define MTAB_TYPE_UFS "jfs" 6644630Smckusick 6744630Smckusick /* 6844630Smckusick * How to unmount filesystems 6944630Smckusick */ 7044630Smckusick #undef MOUNT_TRAP 7144630Smckusick #define MOUNT_TRAP(type, mnt, flag, mnt_data) \ 7244630Smckusick aix3_mount(mnt->mnt_fsname, mnt->mnt_dir, flag, type, mnt_data, mnt->mnt_opts) 7344630Smckusick #undef UNMOUNT_TRAP 7444630Smckusick #define UNMOUNT_TRAP(mnt) uvmount(mnt->mnt_passno, 0) 7544630Smckusick 7644630Smckusick 7744630Smckusick /* 7844630Smckusick * Byte ordering 7944630Smckusick */ 8044630Smckusick #ifndef BYTE_ORDER 8144630Smckusick #include <sys/machine.h> 8244630Smckusick #endif /* BYTE_ORDER */ 8344630Smckusick 8444630Smckusick #undef ARCH_ENDIAN 8544630Smckusick #if BYTE_ORDER == LITTLE_ENDIAN 8644630Smckusick #define ARCH_ENDIAN "little" 8744630Smckusick #else 8844630Smckusick #if BYTE_ORDER == BIG_ENDIAN 8944630Smckusick #define ARCH_ENDIAN "big" 9044630Smckusick #else 9144630Smckusick XXX - Probably no hope of running Amd on this machine! 9244630Smckusick #endif /* BIG */ 9344630Smckusick #endif /* LITTLE */ 9444630Smckusick 9544630Smckusick /* 9644630Smckusick * Miscellaneous AIX 3 bits 9744630Smckusick */ 9844630Smckusick #define NEED_MNTOPT_PARSER 9944630Smckusick #define SHORT_MOUNT_NAME 10044630Smckusick 10144630Smckusick #define MNTMAXSTR 128 10244630Smckusick 10344630Smckusick #define MNTTYPE_UFS "jfs" /* Un*x file system */ 10444630Smckusick #define MNTTYPE_NFS "nfs" /* network file system */ 10544630Smckusick #define MNTTYPE_IGNORE "ignore" /* No type specified, ignore this entry */ 10644630Smckusick 10744630Smckusick struct mntent { 10844630Smckusick char *mnt_fsname; /* name of mounted file system */ 10944630Smckusick char *mnt_dir; /* file system path prefix */ 11044630Smckusick char *mnt_type; /* MNTTYPE_* */ 11144630Smckusick char *mnt_opts; /* MNTOPT* */ 11244630Smckusick int mnt_freq; /* dump frequency, in days */ 11344630Smckusick int mnt_passno; /* pass number on parallel fsck */ 11444630Smckusick }; 11544630Smckusick 11644630Smckusick #define NFS_HDR "misc-aix3.h" 11744630Smckusick #define UFS_HDR "misc-aix3.h" 11844630Smckusick #undef NFS_FH_DREF 11947534Spendry #define NFS_FH_DREF(dst, src) { (dst) = *(src); } 12044630Smckusick #undef NFS_SA_DREF 12144630Smckusick #define NFS_SA_DREF(dst, src) { (dst).addr = *(src); } 12244630Smckusick #define M_RDONLY MNT_READONLY 12344630Smckusick 12444630Smckusick /* 12544630Smckusick * How to get a mount list 12644630Smckusick */ 12744630Smckusick #undef READ_MTAB_FROM_FILE 12844630Smckusick #define READ_MTAB_AIX3_STYLE 12944630Smckusick 13044630Smckusick /* 13144630Smckusick * The data for the mount syscall needs the path in addition to the 13244630Smckusick * host name since that is the only source of information about the 13344630Smckusick * mounted filesystem. 13444630Smckusick #define NFS_ARGS_NEEDS_PATH 13544630Smckusick */ 13644630Smckusick 13744630Smckusick #define NFS_LOMAP 34 13844630Smckusick #define NFS_HIMAP 99 13944630Smckusick #define NFS_ERROR_MAPPING \ 14044630Smckusick static nfs_errormap[] = { 0,75,77,99,99,99, \ 14144630Smckusick 99,99,99,99,99,78,99,99,99,79, \ 14244630Smckusick 99,99,70,99,35,36,37,38,39,40, \ 14344630Smckusick 41,42,43,44,45,46,47,48,49,50, \ 14444630Smckusick 51,52,53,54,55,56,57,58,60,61, \ 14544630Smckusick 64,65,99,67,68,62,63,66,69,68, \ 14644630Smckusick 99,99,99,71,99,99,99,99,99,99 \ 14744630Smckusick }; 14844630Smckusick 14947534Spendry #define MOUNT_HELPER_SOURCE "mount_aix.c" 15044630Smckusick 15144630Smckusick /* 15244630Smckusick * Need this too 15344630Smckusick */ 15444630Smckusick #include <time.h> 155