sparc-sun-solaris2.9)
AFS_SYSNAME="sun4x_59"
;;
+ sparc-sun-solaris2.10)
+ AFS_SYSNAME="sun4x_510"
+ ;;
sparc-sun-sunos4*)
AFS_SYSNAME="sun4_413"
enable_login="yes"
i386-pc-solaris2.9)
AFS_SYSNAME="sunx86_59"
;;
+ i386-pc-solaris2.10)
+ AFS_SYSNAME="sunx86_510"
+ ;;
alpha*-dec-osf4.0*)
AFS_SYSNAME="alpha_dux40"
;;
* The only time a flag is used (ATTR_UTIME) is when we're changing the time
*/
AFS_GUNLOCK();
+#ifdef AFS_SUN510_ENV
+ {
+ caller_context_t ct;
+
+ code = VOP_SETATTR(afile->vnode, &tvattr, 0, &afs_osi_cred, &ct);
+ }
+#else
code = VOP_SETATTR(afile->vnode, &tvattr, 0, &afs_osi_cred);
+#endif
AFS_GLOCK();
MReleaseWriteLock(&afs_xosi);
return code;
* Don't call dnlc for the cm inodes since it's a big performance
* penalty there!
*/
+#ifdef AFS_SUN510_ENV
+ dnlc_enter(ITOV(ip), "a", ITOV(ip));
+#else
dnlc_enter(ITOV(ip), "a", ITOV(ip), (struct AFS_UCRED *)0);
+#endif
}
*ipp = ip;
#endif
newip->i_nlink = 1;
newip->i_mode = IFREG;
+#ifdef AFS_SUN510_ENV
+ newip->i_vnode->v_type = VREG;
+#else
newip->i_vnode.v_type = VREG;
+#endif
newip->i_vicep1 = param1;
if (param2 == 0x1fffffff /*INODESPECIAL*/) {
}
+#ifdef AFS_SUN510_ENV
+struct fs_operation_def afs_vfsops_template[] = {
+ { VFSNAME_MOUNT, afs_mount },
+ { VFSNAME_UNMOUNT, afs_unmount },
+ { VFSNAME_ROOT, afs_root },
+ { VFSNAME_STATVFS, afs_statvfs },
+ { VFSNAME_SYNC, afs_sync },
+ { VFSNAME_VGET, afs_vget },
+ { VFSNAME_MOUNTROOT, afs_mountroot },
+ { VFSNAME_FREEVFS, fs_freevfs },
+};
+struct vfsops *afs_vfsopsp;
+#else
struct vfsops Afs_vfsops = {
afs_mount,
afs_unmount,
fs_freevfs,
#endif
};
+#endif
/*
int (*afs_orig_setgroups) (), (*afs_orig_setgroups32) ();
struct streamtab *udp_infop = 0;
+#ifndef AFS_SUN510_ENV
struct ill_s *ill_g_headp = 0;
+#endif
int afs_sinited = 0;
+extern struct fs_operation_def afs_vnodeops_template[];
+
#if !defined(AFS_NONFSTRANS)
int (*nfs_rfsdisptab_v2) ();
int (*nfs_rfsdisptab_v3) ();
extern Afs_syscall();
+#ifdef AFS_SUN510_ENV
+afsinit(int fstype, char *dummy)
+#else
afsinit(struct vfssw *vfsswp, int fstype)
+#endif
{
extern int afs_xioctl();
extern int afs_xsetgroups();
sysent32[SYS_ioctl].sy_call = afs_xioctl;
#endif
+#ifdef AFS_SUN510_ENV
+ vfs_setfsops(fstype, afs_vfsops_template, &afs_vfsopsp);
+ afsfstype = fstype;
+ vn_make_ops("afs", afs_vnodeops_template, &afs_ops);
+#else
vfsswp->vsw_vfsops = &Afs_vfsops;
afsfstype = fstype;
+#endif
#if !defined(AFS_NONFSTRANS)
ufs_igetp = (int (*)())modlookup("ufs", "ufs_iget");
ufs_itimes_nolockp = (void (*)())modlookup("ufs", "ufs_itimes_nolock");
udp_infop = (struct streamtab *)modlookup("udp", "udpinfo");
+#ifdef AFS_SUN510_ENV
+ if (!ufs_iallocp || !ufs_iupdatp || !ufs_itimes_nolockp || !ufs_igetp
+ || !udp_infop)
+ afs_warn("AFS to UFS mapping cannot be fully initialised\n");
+#else
ill_g_headp = (struct ill_s *)modlookup("ip", "ill_g_head");
if (!ufs_iallocp || !ufs_iupdatp || !ufs_itimes_nolockp || !ufs_igetp
|| !udp_infop || !ill_g_headp)
afs_warn("AFS to UFS mapping cannot be fully initialised\n");
+#endif
afs_sinited = 1;
return 0;
}
+#ifdef AFS_SUN510_ENV
+static struct vfsdef_v3 afs_vfsdef = {
+ VFSDEF_VERSION,
+ "afs",
+ afsinit,
+ 0
+};
+#else
static struct vfssw afs_vfw = {
"afs",
afsinit,
&Afs_vfsops,
0
};
+#endif
static struct sysent afssysent = {
6,
static struct modlfs afsmodlfs = {
&mod_fsops,
"afs filesystem",
+#ifdef AFS_SUN510_ENV
+ &afs_vfsdef
+#else
&afs_vfw
+#endif
};
static struct modlsys afsmodlsys = {
return (0);
}
+#ifdef AFS_SUN510_ENV
+int
+afs_vmread(avp, auio, ioflag, acred, ct)
+ register struct vnode *avp;
+ struct uio *auio;
+ int ioflag;
+ struct AFS_UCRED *acred;
+ caller_context_t *ct;
+#else
int
afs_vmread(avp, auio, ioflag, acred)
register struct vnode *avp;
struct uio *auio;
int ioflag;
struct AFS_UCRED *acred;
+#endif
{
register int code;
}
+#ifdef AFS_SUN510_ENV
+int
+afs_vmwrite(avp, auio, ioflag, acred, ct)
+ register struct vnode *avp;
+ struct uio *auio;
+ int ioflag;
+ struct AFS_UCRED *acred;
+ caller_context_t *ct;
+#else
int
afs_vmwrite(avp, auio, ioflag, acred)
register struct vnode *avp;
struct uio *auio;
int ioflag;
struct AFS_UCRED *acred;
+#endif
{
register int code;
extern int afs_lockctl();
extern void gafs_inactive();
+#ifdef AFS_SUN510_ENV
+struct fs_operation_def afs_vnodeops_template[] = {
+ { VOPNAME_OPEN, gafs_open },
+ { VOPNAME_CLOSE, gafs_close },
+ { VOPNAME_READ, afs_vmread },
+ { VOPNAME_WRITE, afs_vmwrite },
+ { VOPNAME_IOCTL, afs_ioctl },
+ { VOPNAME_SETFL, fs_setfl },
+ { VOPNAME_GETATTR, gafs_getattr },
+ { VOPNAME_SETATTR, gafs_setattr },
+ { VOPNAME_ACCESS, gafs_access },
+ { VOPNAME_LOOKUP, gafs_lookup },
+ { VOPNAME_CREATE, gafs_create },
+ { VOPNAME_REMOVE, gafs_remove },
+ { VOPNAME_LINK, gafs_link },
+ { VOPNAME_RENAME, gafs_rename },
+ { VOPNAME_MKDIR, gafs_mkdir },
+ { VOPNAME_RMDIR, gafs_rmdir },
+ { VOPNAME_READDIR, gafs_readdir },
+ { VOPNAME_SYMLINK, gafs_symlink },
+ { VOPNAME_READLINK, gafs_readlink },
+ { VOPNAME_FSYNC, gafs_fsync },
+ { VOPNAME_INACTIVE, gafs_inactive },
+ { VOPNAME_FID, gafs_fid },
+ { VOPNAME_RWLOCK, afs_rwlock },
+ { VOPNAME_RWUNLOCK, afs_rwunlock },
+ { VOPNAME_SEEK, afs_seek },
+ { VOPNAME_CMP, afs_cmp },
+ { VOPNAME_FRLOCK, afs_frlock },
+ { VOPNAME_SPACE, afs_space },
+ { VOPNAME_REALVP, afs_realvp },
+ { VOPNAME_GETPAGE, afs_getpage },
+ { VOPNAME_PUTPAGE, afs_putpage },
+ { VOPNAME_MAP, afs_map },
+ { VOPNAME_ADDMAP, afs_addmap },
+ { VOPNAME_DELMAP, afs_delmap },
+ { VOPNAME_POLL, fs_poll },
+ { VOPNAME_DUMP, afs_dump },
+ { VOPNAME_PATHCONF, afs_pathconf },
+ { VOPNAME_PAGEIO, afs_pageio },
+ { VOPNAME_DUMPCTL, afs_dumpctl },
+ { VOPNAME_DISPOSE, afs_dispose },
+ { VOPNAME_GETSECATTR, afs_getsecattr },
+ { VOPNAME_SETSECATTR, afs_setsecattr },
+ { VOPNAME_SHRLOCK, fs_shrlock },
+ NULL,
+};
+struct vnodeops *afs_ops;
+#else
struct vnodeops Afs_vnodeops = {
gafs_open,
gafs_close,
#endif
};
struct vnodeops *afs_ops = &Afs_vnodeops;
+#endif
#include "afs/afs_cbqueue.h"
#include "afs/nfsclient.h"
#include "afs/afs_osidnlc.h"
+#include "afs/afs_osi.h"
extern char afs_zeros[AFS_ZEROS];
&tuio, NULL, NULL, -1);
#elif defined(AFS_SUN5_ENV)
AFS_GUNLOCK();
+#ifdef AFS_SUN510_ENV
+ {
+ caller_context_t ct;
+
+ VOP_RWLOCK(tfile->vnode, 0, &ct);
+ code = VOP_READ(tfile->vnode, &tuio, 0, afs_osi_credp, &ct);
+ VOP_RWUNLOCK(tfile->vnode, 0, &ct);
+ }
+#else
VOP_RWLOCK(tfile->vnode, 0);
code = VOP_READ(tfile->vnode, &tuio, 0, afs_osi_credp);
VOP_RWUNLOCK(tfile->vnode, 0);
+#endif
AFS_GLOCK();
#elif defined(AFS_SGI_ENV)
AFS_GUNLOCK();
&tuio, NULL, NULL, -1);
#elif defined(AFS_SUN5_ENV)
AFS_GUNLOCK();
+#ifdef AFS_SUN510_ENV
+ {
+ caller_context_t ct;
+
+ VOP_RWLOCK(tfile->vnode, 1, &ct);
+ code = VOP_WRITE(tfile->vnode, &tuio, 0, afs_osi_credp, &ct);
+ VOP_RWUNLOCK(tfile->vnode, 1, &ct);
+ }
+#else
VOP_RWLOCK(tfile->vnode, 1);
code = VOP_WRITE(tfile->vnode, &tuio, 0, afs_osi_credp);
VOP_RWUNLOCK(tfile->vnode, 1);
+#endif
AFS_GLOCK();
if (code == ENOSPC)
afs_warnuser
rx_extraPackets = AFS_NRXPACKETS; /* smaller # of packets */
code = rx_Init(htons(7001));
if (code) {
- printf("AFS: RX failed to initialize.\n");
+ printf("AFS: RX failed to initialize %d).\n", code);
return code;
}
rx_SetRxDeadTime(afs_rx_deadtime);
*/
-#if defined(AFS_HPUX_ENV) || defined(AFS_SUN57_ENV) || defined(AFS_LINUX_64BIT_KERNEL) || (defined(AFS_SGI61_ENV) && defined(KERNEL) && defined(_K64U64))
+#if defined(AFS_HPUX_ENV) || (defined(AFS_SUN57_ENV) && !defined(AFS_SUN510_ENV)) || defined(AFS_LINUX_64BIT_KERNEL) || (defined(AFS_SGI61_ENV) && defined(KERNEL) && defined(_K64U64))
typedef struct {
afs_int32 tv_sec;
afs_int32 tv_usec;
}
#else /* AFS_USERSPACE_IP_ADDR */
#if defined(AFS_SUN5_ENV)
+#ifdef AFS_SUN510_ENV
+ ill_walk_context_t ctx;
+#else
extern struct ill_s *ill_g_headp;
+ long *addr = (long *)ill_g_headp;
+#endif
ill_t *ill;
ipif_t *ipif;
int subnet, subnetmask, net, netmask;
- long *addr = (long *)ill_g_headp;
if (sa)
sa->sa_iprank = 0;
+#ifdef AFS_SUN510_ENV
+ for (ill = ILL_START_WALK_ALL(&ctx) ; ill ; ill = ill_next(&ctx, ill)) {
+#else
for (ill = (struct ill_s *)*addr /*ill_g_headp */ ; ill;
ill = ill->ill_next) {
+#endif
#ifdef AFS_SUN58_ENV
/* Make sure this is an IPv4 ILL */
if (ill->ill_isv6)
#include "h/stream.h" /* stops SUN56 socketvar.h errors */
#endif
+#ifdef AFS_SUN510_ENV
+#include <sys/cred_impl.h>
+#endif
+
#include "h/socket.h"
#include "h/socketvar.h"
#include "h/protosw.h"
SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
;;
- sunx86_57)
+ sun4x_510)
CC="/opt/SUNWspro/bin/cc"
CCOBJ="/opt/SUNWspro/bin/cc"
LEX="lex"
SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
;;
+ sunx86_57)
+ CC="/opt/SUNWspro/bin/cc"
+ CCOBJ="/opt/SUNWspro/bin/cc"
+ LEX="lex"
+ LD="/usr/ccs/bin/ld"
+ MT_CC="/opt/SUNWspro/bin/cc"
+ MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
+ MT_LIBS="-lpthread -lsocket"
+ PAM_CFLAGS="-KPIC"
+ PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
+ SHLIB_CFLAGS="-KPIC"
+ SHLIB_LDFLAGS="-G -Bsymbolic"
+ TXLIBS="-lcurses"
+ XCFLAGS64='${XCFLAGS} -xarch=v9'
+ XCFLAGS="-dy -Bdynamic"
+ XLIBELFA="-lelf"
+ XLIBKVM="-lkvm"
+ XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
+ SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
+ ;;
sunx86_58)
CC="/opt/SUNWspro/bin/cc"
SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
;;
-
+ sunx86_510)
+ CC="/opt/SUNWspro/bin/cc"
+ CCOBJ="/opt/SUNWspro/bin/cc"
+ LEX="lex"
+ LD="/usr/ccs/bin/ld"
+ MT_CC="/opt/SUNWspro/bin/cc"
+ MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
+ MT_LIBS="-lpthread -lsocket"
+ PAM_CFLAGS="-KPIC"
+ PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
+ SHLIB_CFLAGS="-KPIC"
+ SHLIB_LDFLAGS="-G -Bsymbolic"
+ TXLIBS="-lcurses"
+ XCFLAGS64='${XCFLAGS} -xarch=v9'
+ XCFLAGS="-dy -Bdynamic"
+ XLIBELFA="-lelf"
+ XLIBKVM="-lkvm"
+ XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
+ SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
+ ;;
esac
#
#define SYS_NAME_ID_hp_ux102 414
#define SYS_NAME_ID_hp_ux110 415
#define SYS_NAME_ID_hp_ux11i 416
-#define SYS_NAME_ID_ia64_hpux1122 417
-#define SYS_NAME_ID_ia64_hpux1123 418
+#define SYS_NAME_ID_ia64_hpux1122 417
+#define SYS_NAME_ID_ia64_hpux1123 418
#define SYS_NAME_ID_mac2_51 500
#define SYS_NAME_ID_mac_aux10 501
#define SYS_NAME_ID_sun4x_57 938
#define SYS_NAME_ID_sun4x_58 939
#define SYS_NAME_ID_sun4x_59 940
+#define SYS_NAME_ID_sun4x_510 941
/* Sigh. If I leave a gap here IBM will do this sequentially. If I don't
they won't allocate sunx86 IDs at all. So leave a gap and pray. */
-#define SYS_NAME_ID_sunx86_57 950
-#define SYS_NAME_ID_sunx86_58 951
-#define SYS_NAME_ID_sunx86_59 952
+#define SYS_NAME_ID_sunx86_57 950
+#define SYS_NAME_ID_sunx86_58 951
+#define SYS_NAME_ID_sunx86_59 952
+#define SYS_NAME_ID_sunx86_510 953
#define SYS_NAME_ID_vax_ul4 1003
#define SYS_NAME_ID_vax_ul40 1004
--- /dev/null
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+#define AFS_VFS_ENV 1
+/* Used only in vfsck code; is it needed any more???? */
+
+#define AFS_VFSINCL_ENV 1 /* NOBODY uses this.... */
+#define AFS_GREEDY43_ENV 1 /* Used only in rx/rx_user.c */
+#define AFS_ENV 1
+#define AFS_SUN_ENV 1
+#define AFS_SUN5_ENV 1
+#define AFS_SUN52_ENV 1
+#define AFS_SUN53_ENV 1
+#define AFS_SUN54_ENV 1
+#define AFS_SUN55_ENV 1
+#define AFS_SUN56_ENV 1
+#define AFS_SUN57_ENV 1
+#define AFS_SUN58_ENV 1
+#define AFS_SUN59_ENV 1
+#define AFS_SUN510_ENV 1
+
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
+
+#define AFS_HAVE_FLOCK_SYSID 1
+
+#ifdef AFS_NAMEI_ENV
+#define AFS_64BIT_IOPS_ENV 1 /* needed for NAMEI... */
+#else /* AFS_NAMEI_ENV */
+#define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */
+#endif /* AFS_NAMEI_ENV */
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_GLOBAL_SUNLOCK 1 /* For global locking */
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 1 /* if nonzero, garbage collect PAGs */
+
+#define AFS_SYSCALL 65
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS "afs"
+
+/* Machine / Operating system information */
+#define sys_sun4x_510 1
+#define SYS_NAME "sun4x_510"
+#define SYS_NAME_ID SYS_NAME_ID_sun4x_510
+#define AFSBIG_ENDIAN 1
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+#define AFS_HAVE_VXFS 1 /* Support cache on Veritas vxfs file system */
+#define AFS_HAVE_STATVFS 1 /* System supports statvfs */
+#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
+#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
+
+#define NEARINODE_HINT 1 /* hint to ufs module to scatter inodes on disk */
+#define nearInodeHash(volid, hval) { \
+ unsigned char* ts = (unsigned char*)&(volid)+sizeof(volid)-1;\
+ for ( (hval)=0; ts >= (unsigned char*)&(volid); ts--){\
+ (hval) *= 173; \
+ (hval) += *ts; \
+ } \
+ }
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef KERNEL
+/* sun definitions here */
+#define AFS_UIOFMODE 1 /* Only in afs/afs_vnodeops.c (afs_ustrategy) */
+#define AFS_SYSVLOCK 1 /* sys v locking supported */
+/*#define AFS_USEBUFFERS 1*/
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_fmode uio_fmode
+#define afsio_resid uio_resid
+#define AFS_UIOSYS UIO_SYSSPACE
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES MCLBYTES
+#define AFS_MINCHANGE 2
+#define osi_GetTime(x) uniqtime(x)
+
+/**
+ * These defines are for the 64 bit Solaris 7 port
+ * AFS_SYSCALL32 is used to protect the ILP32 syscall interface
+ * AFS_64BIT_ENV is for use of 64 bit inode numbers
+ */
+#if defined(__sparcv9)
+#define AFS_SUN57_64BIT_ENV 1
+#define AFS_64BIT_INO 1
+#endif
+
+/**
+ * Solaris 7 64 bit has two versions of uniqtime. Since we consistently
+ * use 32 bit quantities for time in afs, we now use uniqtime32
+ */
+#if defined(AFS_SUN57_64BIT_ENV)
+#undef osi_GetTime
+#define osi_GetTime(x) uniqtime32(x)
+#endif
+
+
+
+#define AFS_KALLOC(n) kmem_alloc(n, KM_SLEEP)
+#define AFS_KALLOC_NOSLEEP(n) kmem_alloc(n, KM_NOSLEEP)
+#define AFS_KFREE kmem_free
+#define VATTR_NULL vattr_null
+#define memset(A, B, S) bzero(A, S)
+#define memcpy(B, A, S) bcopy(A, B, S)
+#define memcmp(A, B, S) bcmp(A, B, S)
+#endif /* KERNEL */
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+#define ROOTINO UFSROOTINO
+
+#endif /* AFS_PARAM_H */
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+#define AFS_VFS_ENV 1
+/* Used only in vfsck code; is it needed any more???? */
+#define RXK_LISTENER_ENV 1
+#define AFS_USERSPACE_IP_ADDR 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+
+#define UKERNEL 1 /* user space kernel */
+#define AFS_GREEDY43_ENV 1 /* Used only in rx/rx_user.c */
+#define AFS_ENV 1
+#define AFS_USR_SUN5_ENV 1
+#define AFS_USR_SUN6_ENV 1
+#define AFS_USR_SUN7_ENV 1
+#define AFS_USR_SUN8_ENV 1
+#define AFS_USR_SUN9_ENV 1
+
+#define AFS_64BIT_ENV 1
+
+#include <afs/afs_sysnames.h>
+
+#if 0
+#define AFS_GLOBAL_SUNLOCK 1 /* For global locking */
+#endif
+
+#define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */
+#define AFS_SYSCALL 65
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS 1
+
+/* Machine / Operating system information */
+#define sys_sun4x_59 1
+#define SYS_NAME "sun4x_59"
+#define SYS_NAME_ID SYS_NAME_ID_sun4x_59
+#define AFSBIG_ENDIAN 1
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+#define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef KERNEL
+#define AFS_UIOFMODE 1 /* Only in afs/afs_vnodeops.c (afs_ustrategy) */
+#define AFS_SYSVLOCK 1 /* sys v locking supported */
+/*#define AFS_USEBUFFERS 1*/
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_fmode uio_fmode
+#define afsio_resid uio_resid
+#define AFS_UIOSYS 1
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES MCLBYTES
+#define AFS_MINCHANGE 2
+#define VATTR_NULL usr_vattr_null
+#endif /* KERNEL */
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+#define ROOTINO UFSROOTINO
+
+#endif /* AFS_PARAM_H */
+
+#endif /* !defined(UKERNEL) */
--- /dev/null
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+/*
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ *
+ * This software has been released under the terms of the IBM Public
+ * License. For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
+ */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+#define AFS_VFS_ENV 1
+/* Used only in vfsck code; is it needed any more???? */
+
+#define AFS_VFSINCL_ENV 1 /* NOBODY uses this.... */
+#define AFS_GREEDY43_ENV 1 /* Used only in rx/rx_user.c */
+#define AFS_ENV 1
+#define AFS_SUN_ENV 1
+#define AFS_SUN5_ENV 1
+#define AFS_SUN52_ENV 1
+#define AFS_SUN53_ENV 1
+#define AFS_SUN54_ENV 1
+#define AFS_SUN55_ENV 1
+#define AFS_SUN56_ENV 1
+#define AFS_SUN57_ENV 1
+#define AFS_SUN58_ENV 1
+#define AFS_SUN59_ENV 1
+#define AFS_SUN510_ENV 1
+#define AFS_X86_ENV 1
+
+#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
+
+#define AFS_HAVE_FLOCK_SYSID 1
+
+#include <afs/afs_sysnames.h>
+
+#define AFS_GLOBAL_SUNLOCK 1 /* For global locking */
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS 1 /* if nonzero, garbage collect PAGs */
+
+#ifdef AFS_NAMEI_ENV
+#define AFS_64BIT_IOPS_ENV 1 /* needed for NAMEI... */
+#else /* AFS_NAMEI_ENV */
+#define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */
+#endif /* AFS_NAMEI_ENV */
+
+#define AFS_SYSCALL 65
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS "afs"
+
+/* Machine / Operating system information */
+#define sys_sunx86_510 1
+#define SYS_NAME "sunx86_510"
+#define SYS_NAME_ID SYS_NAME_ID_sunx86_510
+#define AFSLITTLE_ENDIAN 1
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+#define AFS_HAVE_VXFS 1 /* Support cache on Veritas vxfs file system */
+#define AFS_HAVE_STATVFS 1 /* System supports statvfs */
+#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
+#define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */
+
+#define NEARINODE_HINT 1 /* hint to ufs module to scatter inodes on disk */
+#define nearInodeHash(volid, hval) { \
+ unsigned char* ts = (unsigned char*)&(volid)+sizeof(volid)-1;\
+ for ( (hval)=0; ts >= (unsigned char*)&(volid); ts--){\
+ (hval) *= 173; \
+ (hval) += *ts; \
+ } \
+ }
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef KERNEL
+/* sun definitions here */
+#define AFS_UIOFMODE 1 /* Only in afs/afs_vnodeops.c (afs_ustrategy) */
+#define AFS_SYSVLOCK 1 /* sys v locking supported */
+/*#define AFS_USEBUFFERS 1*/
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_fmode uio_fmode
+#define afsio_resid uio_resid
+#define AFS_UIOSYS UIO_SYSSPACE
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES MCLBYTES
+#define AFS_MINCHANGE 2
+#define osi_GetTime(x) uniqtime(x)
+
+/**
+ * These defines are for the 64 bit Solaris 7 port
+ * AFS_SYSCALL32 is used to protect the ILP32 syscall interface
+ * AFS_64BIT_ENV is for use of 64 bit inode numbers
+ */
+#if defined(__sparcv9)
+#define AFS_SUN57_64BIT_ENV 1
+#define AFS_64BIT_INO 1
+#endif
+
+/**
+ * Solaris 7 64 bit has two versions of uniqtime. Since we consistently
+ * use 32 bit quantities for time in afs, we now use uniqtime32
+ */
+#if defined(AFS_SUN57_64BIT_ENV)
+#undef osi_GetTime
+#define osi_GetTime(x) uniqtime32(x)
+#endif
+
+
+
+#define AFS_KALLOC(n) kmem_alloc(n, KM_SLEEP)
+#define AFS_KALLOC_NOSLEEP(n) kmem_alloc(n, KM_NOSLEEP)
+#define AFS_KFREE kmem_free
+#define VATTR_NULL vattr_null
+#define memset(A, B, S) bzero(A, S)
+#define memcpy(B, A, S) bcopy(A, B, S)
+#define memcmp(A, B, S) bcmp(A, B, S)
+#endif /* KERNEL */
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+#define ROOTINO UFSROOTINO
+
+#endif /* AFS_PARAM_H */
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+/*
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ *
+ * This software has been released under the terms of the IBM Public
+ * License. For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
+ */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+#define AFS_VFS_ENV 1
+/* Used only in vfsck code; is it needed any more???? */
+#define RXK_LISTENER_ENV 1
+#define AFS_USERSPACE_IP_ADDR 1
+#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
+
+#define UKERNEL 1 /* user space kernel */
+#define AFS_GREEDY43_ENV 1 /* Used only in rx/rx_user.c */
+#define AFS_ENV 1
+#define AFS_USR_SUN5_ENV 1
+#define AFS_USR_SUN6_ENV 1
+
+#include <afs/afs_sysnames.h>
+
+#if 0
+#define AFS_GLOBAL_SUNLOCK 1 /* For global locking */
+#endif
+
+#define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */
+#define AFS_SYSCALL 65
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+#define AFS_MOUNT_AFS 1
+
+/* Machine / Operating system information */
+#define sys_sun4x_55 1
+#define SYS_NAME "sun4x_55"
+#define SYS_NAME_ID SYS_NAME_ID_sun4x_55
+#define AFSLITTLE_ENDIAN 1
+#define AFS_HAVE_FFS 1 /* Use system's ffs. */
+#define AFS_HAVE_STATVFS 0 /* System doesn't support statvfs */
+
+/* Extra kernel definitions (from kdefs file) */
+#ifdef KERNEL
+#define AFS_UIOFMODE 1 /* Only in afs/afs_vnodeops.c (afs_ustrategy) */
+#define AFS_SYSVLOCK 1 /* sys v locking supported */
+/*#define AFS_USEBUFFERS 1*/
+#define afsio_iov uio_iov
+#define afsio_iovcnt uio_iovcnt
+#define afsio_offset uio_offset
+#define afsio_seg uio_segflg
+#define afsio_fmode uio_fmode
+#define afsio_resid uio_resid
+#define AFS_UIOSYS 1
+#define AFS_UIOUSER UIO_USERSPACE
+#define AFS_CLBYTES MCLBYTES
+#define AFS_MINCHANGE 2
+#define VATTR_NULL usr_vattr_null
+#endif /* KERNEL */
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+#define ROOTINO UFSROOTINO
+
+#endif /* AFS_PARAM_H */
+
+#endif /* !defined(UKERNEL) */
KDEFS= -Dsun4c -DSUN4C_60 -DNFSCLIENT -DSYSACCT -DOLDSCSI -DVDDRV -D_KERNEL \
-DSYSV -dn ${ARCH_DEFS}
-<sun4x_57 sun4x_58 sun4x_59 sunx86_57 sunx86_58 sunx86_59>
+<sun4x_57 sun4x_58 sun4x_59 sun4x_510 sunx86_57 sunx86_58 sunx86_59 sunx86_510>
KDEFS_32 =
KDEFS_64 = -xarch=v9
# Name of directory to hold object files and libraries.
<all -sun4x_57 -sun4x_58 -sun4x_59 -sunx86_57 -sunx86_58 -sunx86_59>
KOBJ = MODLOAD
-<sun4x_57 sun4x_58 sun4x_59 sunx86_57 sunx86_58 sunx86_59>
+<sun4x_57 sun4x_58 sun4x_59 sun4x_510 sunx86_57 sunx86_58 sunx86_59 sunx86_510>
KOBJ = MODLOAD32 MODLOAD64
INSTDIRS = single_instdir
DESTDIRS = single_destdir
-<sun4x_57 sun4x_58 sun4x_59 sunx86_57 sunx86_58 sunx86_59>
+<sun4x_57 sun4x_58 sun4x_59 sun4x_510 sunx86_57 sunx86_58 sunx86_59 sunx86_510>
COMPDIRS = solaris_compdirs
INSTDIRS = solaris_instdirs
DESTDIRS = solaris_destdirs
## This is the target for a Solaris 7. Here we build both the 32 bit and
## the 64 bit libafs in MODLOAD32 and MODLOAD64 directories respectively
-<sun4x_57 sun4x_58 sun4x_59 sunx86_57 sunx86_58 sunx86_59>
+<sun4x_57 sun4x_58 sun4x_59 sun4x_510 sunx86_57 sunx86_58 sunx86_59 sunx86_510>
${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
for t in ${KOBJ} ; do \
echo Building directory: $$t ; \
DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFS}
DEST_LIBAFSNONFS = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFSNONFS}
-<sun4x_57 sun4x_58 sun4x_59 sunx86_57 sunx86_58 sunx86_59>
+<sun4x_57 sun4x_58 sun4x_59 sun4x_510 sunx86_57 sunx86_58 sunx86_59 sunx86_510>
INST_LIBAFSNONFS = ${DESTDIR}${afskerneldir}/libafs${BITS}.nonfs.o
INST_LIBAFS = ${DESTDIR}${afskerneldir}/libafs${BITS}.o
${AS} process.ss -o process.o ; \
$(RM) -f process.S ;;\
ncrx86_* | sunx86_*) \
- /usr/ccs/lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.i386.s process.ss; \
+ /usr/ccs/lib/cpp -P -D__i386 -DIGNORE_STDS_H -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s process.ss; \
${AS} -o process.o process.ss; \
$(RM) process.ss ;; \
alpha_nbsd* ) \
ia64_hpux11* | hp_ux11* ) \
${CC} ${CFLAGS} -c ${srcdir}/process.c;; \
i386_*) \
- /lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.i386.s process.ss; \
+ /lib/cpp -P -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s process.ss; \
${AS} process.ss -o process.o; \
$(RM) process.ss ;; \
*) \
*
* $Id$
*/
+#include <afs/param.h>
#ifndef _C_LABEL
#if !defined(SYSV) && !defined(__ELF__) && !defined(AFS_SUN5_ENV)
(struct sonode *, struct nmsghdr *, struct uio *) = NULL;
int (*sockfs_sosetsockopt)
(struct sonode *, int, int, void *, int) = NULL;
+#ifndef AFS_SUN510_ENV
int (*sockfs_sounbind)
(struct sonode *, int);
void (*sockfs_sockfree)
(struct sonode *);
+#endif
static afs_uint32 myNetAddrs[ADDRSPERSITE];
static int myNetMTUs[ADDRSPERSITE];
ill_t *ill;
ipif_t *ipif;
int rxmtu, maxmtu;
+#ifdef AFS_SUN510_ENV
+ ill_walk_context_t ctx;
+#endif
int mtus[ADDRSPERSITE];
afs_uint32 addrs[ADDRSPERSITE];
memset(mtus, 0, sizeof(mtus));
memset(addrs, 0, sizeof(addrs));
+#ifdef AFS_SUN510_ENV
+ for (ill = ILL_START_WALK_ALL(&ctx) ; ill ; ill = ill_next(&ctx, ill)) {
+#else
for (ill = ill_g_head; ill; ill = ill->ill_next) {
+#endif
#ifdef AFS_SUN58_ENV
/* Make sure this is an IPv4 ILL */
if (ill->ill_isv6)
afs_uint32 myAddr, netMask;
int match_value = 0;
int mtu = -1;
+#ifdef AFS_SUN510_ENV
+ ill_walk_context_t ctx;
+#endif
if (numMyNetAddrs == 0)
rxi_GetIFInfo();
else
netMask = 0;
+#ifdef AFS_SUN510_ENV
+ for (ill = ILL_START_WALK_ALL(&ctx) ; ill ; ill = ill_next(&ctx, ill)) {
+#else
for (ill = ill_g_head; ill; ill = ill->ill_next) {
+#endif
#ifdef AFS_SUN58_ENV
/* Make sure this is an IPv4 ILL */
if (ill->ill_isv6)
return NULL;
}
}
+#ifndef AFS_SUN510_ENV
if (sockfs_sounbind == NULL) {
sockfs_sounbind = (int (*)())modlookup("sockfs", "sounbind");
if (sockfs_sounbind == NULL)
if (sockfs_sockfree == NULL)
return NULL;
}
+#endif
accessvp = sockfs_solookup(AF_INET, SOCK_DGRAM, 0, "/dev/udp", &error);
if (accessvp == NULL) {
struct sockaddr_in taddr;
struct iovec dvec;
char c;
+ vnode_t *vp;
AFS_STATCNT(osi_FreeSocket);
afs_osi_Sleep(&rxk_ListenerPid);
}
+#ifdef AFS_SUN510_ENV
+ vp = SOTOV(so);
+ VOP_CLOSE(vp, FREAD|FWRITE, 1, (offset_t)0, CRED());
+ VN_RELE(vp);
+#else
sockfs_sounbind(so, 0);
sockfs_sockfree(so);
+#endif
return 0;
}
syscall.o: syscall.s
case "$(SYS_NAME)" in \
- sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53 | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5? | sunx86_5?) \
+ sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53 | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5? | sun4x_5?? | sunx86_5? | sunx86_5?? ) \
/usr/ccs/lib/cpp ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \
as -o syscall.o syscall.ss; \
$(RM) syscall.ss;; \
case ${SYS_NAME} in \
sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53 | sun4_53 | sun4_54 | sun4c_54 | sun4m_54 | sunx86_5? ) \
${CC} -o kdump kdump.o ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a /usr/lib/libkvm.a -lelf ${XLIBS} ;; \
- sun*_5? ) \
+ sun*_5? | sun*_5?? ) \
${CC} -o kdump kdump.o ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a ${XLIBELFA} ${XLIBKVM} ${XLIBS} ;; \
sgi_6? ) \
for f in ../libafs/STATIC.IP*/CPU_KDEFS; \
return (-1);
#endif
#ifdef AFS_NEWCG_ENV
+# ifndef AFS_SUN510_ENV
if (sblock.fs_interleave < 1) {
pwarn("IMPOSSIBLE INTERLEAVE=%d IN SUPERBLOCK", sblock.fs_interleave);
sblock.fs_interleave = 1;
dirty(&asblk);
}
}
+# endif /* AFS_SUN510_ENV */
#endif /* AFS_NEWCG_ENV */
#ifdef AFS_NEWCG_ENV
if (sblock.fs_npsect < sblock.fs_nsect) {
#if defined(AFS_SUN_ENV) && !defined(AFS_SUN3_ENV)
#ifdef AFS_SUN5_ENV
sblock.fs_npsect = 0;
+# ifndef AFS_SUN510_ENV
sblock.fs_interleave = 0;
+# endif
sblock.fs_state = FSOKAY - sblock.fs_time; /* make mountable */
#else
fs_set_state(&sblock, FSOKAY - sblock.fs_time);
*/
altsblock.fs_fsbtodb = sblock.fs_fsbtodb;
#ifdef AFS_NEWCG_ENV
+# ifndef AFS_SUN510_ENV
altsblock.fs_interleave = sblock.fs_interleave;
+# endif
altsblock.fs_npsect = sblock.fs_npsect;
altsblock.fs_nrpos = sblock.fs_nrpos;
#endif /* AFS_NEWCG_ENV */