xref: /csrg-svn/usr.sbin/amd/config/os-dgux.h (revision 47534)
147511Spendry /* $Id: os-dgux.h,v 5.2.1.1 90/10/21 22:30:50 jsp Exp $ */
247511Spendry 
347511Spendry /*
447511Spendry  * dg/ux definitions for Amd (automounter)
547511Spendry  *
647511Spendry  * Copyright (c) 1990 Jan-Simon Pendry
747511Spendry  * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
847511Spendry  * Copyright (c) 1990 The Regents of the University of California.
947511Spendry  * All rights reserved.
1047511Spendry  *
1147511Spendry  * This code is derived from software contributed to Berkeley by
1247511Spendry  * Jan-Simon Pendry at Imperial College, London.
1347511Spendry  *
14*47534Spendry  * %sccs.include.redist.c%
1547511Spendry  *
16*47534Spendry  *	@(#)os-dgux.h	5.2 (Berkeley) 03/17/91
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