xref: /csrg-svn/usr.sbin/amd/config/os-dgux.h (revision 47511)
1*47511Spendry /* $Id: os-dgux.h,v 5.2.1.1 90/10/21 22:30:50 jsp Exp $ */
2*47511Spendry 
3*47511Spendry /*
4*47511Spendry  * dg/ux definitions for Amd (automounter)
5*47511Spendry  *
6*47511Spendry  * Copyright (c) 1990 Jan-Simon Pendry
7*47511Spendry  * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
8*47511Spendry  * Copyright (c) 1990 The Regents of the University of California.
9*47511Spendry  * All rights reserved.
10*47511Spendry  *
11*47511Spendry  * This code is derived from software contributed to Berkeley by
12*47511Spendry  * Jan-Simon Pendry at Imperial College, London.
13*47511Spendry  *
14*47511Spendry  * Redistribution and use in source and binary forms are permitted provided
15*47511Spendry  * that: (1) source distributions retain this entire copyright notice and
16*47511Spendry  * comment, and (2) distributions including binaries display the following
17*47511Spendry  * acknowledgement:  ``This product includes software developed by the
18*47511Spendry  * University of California, Berkeley and its contributors'' in the
19*47511Spendry  * documentation or other materials provided with the distribution and in
20*47511Spendry  * all advertising materials mentioning features or use of this software.
21*47511Spendry  * Neither the name of the University nor the names of its contributors may
22*47511Spendry  * be used to endorse or promote products derived from this software without
23*47511Spendry  * specific prior written permission.
24*47511Spendry  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
25*47511Spendry  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
26*47511Spendry  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27*47511Spendry  *
28*47511Spendry  *	@(#)os-dgux.h	5.1 (Berkeley) 03/17/91
29*47511Spendry  */
30*47511Spendry 
31*47511Spendry /*
32*47511Spendry  * Does the compiler grok void *
33*47511Spendry  */
34*47511Spendry #define VOIDP
35*47511Spendry 
36*47511Spendry /*
37*47511Spendry  * Which version of the Sun RPC library we are using
38*47511Spendry  * This is the implementation release number, not
39*47511Spendry  * the protocol revision number.
40*47511Spendry  */
41*47511Spendry #define RPC_4
42*47511Spendry 
43*47511Spendry /*
44*47511Spendry  * Which version of the NFS interface are we using.
45*47511Spendry  * This is the implementation release number, not
46*47511Spendry  * the protocol revision number.
47*47511Spendry  */
48*47511Spendry #define NFS_4
49*47511Spendry 
50*47511Spendry /*
51*47511Spendry  * Name of filesystem types
52*47511Spendry  */
53*47511Spendry #define MOUNT_TYPE_NFS	"nfs"
54*47511Spendry #define MOUNT_TYPE_UFS	"dg/ux"
55*47511Spendry #undef MTAB_TYPE_UFS
56*47511Spendry #define MTAB_TYPE_UFS	"dg/ux"
57*47511Spendry 
58*47511Spendry /*
59*47511Spendry  * Need the following in more places than just NFS_HDR
60*47511Spendry  */
61*47511Spendry #include <sys/dg_mount.h>
62*47511Spendry /*
63*47511Spendry  * This is braindead
64*47511Spendry  * dg/ux has nfs 4.0 but doesn't have the following options
65*47511Spendry  */
66*47511Spendry #define NFSMNT_HOSTNAME 0x0
67*47511Spendry #define NFSMNT_INT 0x0
68*47511Spendry #define M_NEWTYPE 0
69*47511Spendry 
70*47511Spendry /*
71*47511Spendry  * DG have their own filesystem.
72*47511Spendry  */
73*47511Spendry #define ufs_args dgux_args
74*47511Spendry 
75*47511Spendry /*
76*47511Spendry  * Byte ordering
77*47511Spendry  */
78*47511Spendry 
79*47511Spendry #undef ARCH_ENDIAN
80*47511Spendry #define ARCH_ENDIAN "big"
81*47511Spendry 
82*47511Spendry #define _BSD_WAIT_FLAVOR
83*47511Spendry #define _BSD_TTY_FLAVOR
84*47511Spendry #define _BSD_SIGNAL_FLAVOR
85*47511Spendry #define _DGUX_SOURCE
86*47511Spendry 
87*47511Spendry /*
88*47511Spendry  * Use fcntl() rather than flock()
89*47511Spendry  */
90*47511Spendry #define LOCK_FCNTL
91*47511Spendry 
92*47511Spendry #define bzero(ptr, len) memset(ptr, 0, len)
93*47511Spendry #define bcopy(from, to, len) memcpy(to, from, len)
94*47511Spendry #undef MOUNT_TRAP
95*47511Spendry #define MOUNT_TRAP(type, mnt, flags, mnt_data) \
96*47511Spendry 	((struct nfs_args *)mnt_data)->version = !strcmp(type, MOUNT_TYPE_UFS)?\
97*47511Spendry 	     DG_MOUNT_DGUX_VERSION:DG_MOUNT_NFS_VERSION, \
98*47511Spendry 	dg_mount(type, mnt->mnt_dir, flags, mnt_data)
99*47511Spendry #undef UNMOUNT_TRAP
100*47511Spendry #define UNMOUNT_TRAP(mnt)	umount(mnt->mnt_dir)
101