xref: /csrg-svn/usr.sbin/amd/config/os-dgux.h (revision 61785)
147511Spendry /*
247511Spendry  * Copyright (c) 1990 Jan-Simon Pendry
347511Spendry  * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
4*61785Sbostic  * Copyright (c) 1990, 1993
5*61785Sbostic  *	The Regents of the University of California.  All rights reserved.
647511Spendry  *
747511Spendry  * This code is derived from software contributed to Berkeley by
847511Spendry  * Jan-Simon Pendry at Imperial College, London.
947511Spendry  *
1047534Spendry  * %sccs.include.redist.c%
1147511Spendry  *
12*61785Sbostic  *	@(#)os-dgux.h	8.1 (Berkeley) 06/06/93
1349685Spendry  *
1452452Spendry  * $Id: os-dgux.h,v 5.2.2.1 1992/02/09 15:10:18 jsp beta $
1549685Spendry  *
1649685Spendry  * dg/ux definitions for Amd (automounter)
1747511Spendry  */
1847511Spendry 
1947511Spendry /*
2047511Spendry  * Does the compiler grok void *
2147511Spendry  */
2247511Spendry #define VOIDP
2347511Spendry 
2447511Spendry /*
2547511Spendry  * Which version of the Sun RPC library we are using
2647511Spendry  * This is the implementation release number, not
2747511Spendry  * the protocol revision number.
2847511Spendry  */
2947511Spendry #define RPC_4
3047511Spendry 
3147511Spendry /*
3247511Spendry  * Which version of the NFS interface are we using.
3347511Spendry  * This is the implementation release number, not
3447511Spendry  * the protocol revision number.
3547511Spendry  */
3647511Spendry #define NFS_4
3747511Spendry 
3847511Spendry /*
3947511Spendry  * Name of filesystem types
4047511Spendry  */
4147511Spendry #define MOUNT_TYPE_NFS	"nfs"
4247511Spendry #define MOUNT_TYPE_UFS	"dg/ux"
4347511Spendry #undef MTAB_TYPE_UFS
4447511Spendry #define MTAB_TYPE_UFS	"dg/ux"
4547511Spendry 
4647511Spendry /*
4747511Spendry  * Need the following in more places than just NFS_HDR
4847511Spendry  */
4947511Spendry #include <sys/dg_mount.h>
5047511Spendry /*
5147511Spendry  * This is braindead
5247511Spendry  * dg/ux has nfs 4.0 but doesn't have the following options
5347511Spendry  */
5447511Spendry #define NFSMNT_HOSTNAME 0x0
5547511Spendry #define NFSMNT_INT 0x0
5647511Spendry #define M_NEWTYPE 0
5747511Spendry 
5847511Spendry /*
5947511Spendry  * DG have their own filesystem.
6047511Spendry  */
6147511Spendry #define ufs_args dgux_args
6247511Spendry 
6347511Spendry /*
6447511Spendry  * Byte ordering
6547511Spendry  */
6647511Spendry 
6747511Spendry #undef ARCH_ENDIAN
6847511Spendry #define ARCH_ENDIAN "big"
6947511Spendry 
7047511Spendry #define _BSD_WAIT_FLAVOR
7147511Spendry #define _BSD_TTY_FLAVOR
7247511Spendry #define _BSD_SIGNAL_FLAVOR
7347511Spendry #define _DGUX_SOURCE
7447511Spendry 
7547511Spendry /*
7647511Spendry  * Use fcntl() rather than flock()
7747511Spendry  */
7847511Spendry #define LOCK_FCNTL
7947511Spendry 
8047511Spendry #define bzero(ptr, len) memset(ptr, 0, len)
8147511Spendry #define bcopy(from, to, len) memcpy(to, from, len)
8247511Spendry #undef MOUNT_TRAP
8347511Spendry #define MOUNT_TRAP(type, mnt, flags, mnt_data) \
8447511Spendry 	((struct nfs_args *)mnt_data)->version = !strcmp(type, MOUNT_TYPE_UFS)?\
8547511Spendry 	     DG_MOUNT_DGUX_VERSION:DG_MOUNT_NFS_VERSION, \
8647511Spendry 	dg_mount(type, mnt->mnt_dir, flags, mnt_data)
8747511Spendry #undef UNMOUNT_TRAP
8847511Spendry #define UNMOUNT_TRAP(mnt)	umount(mnt->mnt_dir)
89