#include <afsconfig.h>
#include "afs/param.h"
-RCSID
- ("$Header$");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
getinode(vfsp, dev, inode, ipp, credp, perror)
struct vfs *vfsp;
- struct AFS_UCRED *credp;
+ afs_ucred_t *credp;
struct inode **ipp;
dev_t dev;
ino_t inode;
int *perror;
{
struct inode *ip;
- register afs_int32 code;
+ afs_int32 code;
struct vnode *vp;
struct fs *fs;
struct inode *pip;
*perror = 0;
- if (!vfsp
-#if !defined(AFS_SUN58_ENV)
- && !(vfsp = vfs_devsearch(dev))
-#else
- && !(vfsp = vfs_dev2vfsp(dev))
-#endif
- ) {
+ if (!vfsp && !(vfsp = vfs_dev2vfsp(dev))) {
return (ENODEV);
}
ufsvfsp = (struct ufsvfs *)vfsp->vfs_data;
/* get an existing inode. Common code for iopen, iread/write, iinc/dec. */
igetinode(vfsp, dev, inode, ipp, credp, perror)
- struct AFS_UCRED *credp;
+ afs_ucred_t *credp;
struct inode **ipp;
struct vfs *vfsp;
dev_t dev;
{
struct inode *pip, *ip;
extern struct osi_dev cacheDev;
- register int code = 0;
+ int code = 0;
*perror = 0;
#ifdef AFS_SUN510_ENV
dnlc_enter(ITOV(ip), "a", ITOV(ip));
#else
- dnlc_enter(ITOV(ip), "a", ITOV(ip), (struct AFS_UCRED *)0);
+ dnlc_enter(ITOV(ip), "a", ITOV(ip), (afs_ucred_t *)0);
#endif
}
afs_syscall_icreate(dev, near_inode, param1, param2, param3, param4, rvp,
credp)
rval_t *rvp;
- struct AFS_UCRED *credp;
+ afs_ucred_t *credp;
long near_inode, param1, param2, param3, param4;
dev_t dev;
{
int dummy, err = 0;
struct inode *ip, *newip;
- register int code;
+ int code;
dev_t newdev;
struct ufsvfs *ufsvfsp;
* This conversion is needed only for the 64 bit OS.
*/
-#ifdef AFS_SUN57_64BIT_ENV
+#ifdef AFS_SUN5_64BIT_ENV
newdev = expldev((dev32_t) dev);
#else
newdev = dev;
rw_enter(&newip->i_contents, RW_WRITER);
newip->i_flag |= IACC | IUPD | ICHG;
-#if defined(AFS_SUN56_ENV)
newip->i_vicemagic = VICEMAGIC;
-#else
- newip->i_uid = 0;
- newip->i_gid = -2;
-#endif
newip->i_nlink = 1;
newip->i_mode = IFREG;
#ifdef AFS_SUN510_ENV
(((param4 >> 16) & 0x1f) << 22) + (param3 & 0x3fffff);
newip->i_vicep3 = ((param4 << 16) + (param2 & 0xffff));
}
-#ifdef AFS_SUN57_64BIT_ENV
+#ifdef AFS_SUN5_64BIT_ENV
rvp->r_vals = newip->i_number;
#else
rvp->r_val1 = newip->i_number;
afs_syscall_iopen(dev, inode, usrmod, rvp, credp)
rval_t *rvp;
- struct AFS_UCRED *credp;
+ afs_ucred_t *credp;
int inode, usrmod;
dev_t dev;
{
struct vnode *vp = NULL;
int dummy;
int fd;
- register int code;
+ int code;
dev_t newdev;
AFS_STATCNT(afs_syscall_iopen);
* This conversion is needed only for the 64 bit OS.
*/
-#ifdef AFS_SUN57_64BIT_ENV
+#ifdef AFS_SUN5_64BIT_ENV
newdev = expldev((dev32_t) dev);
#else
newdev = dev;
* XXX We should set the fp to null since we don't need it in the icalls
*/
setf(fd, fp);
-#ifdef AFS_SUN57_64BIT_ENV
+
+ /* rvp->r_val{1,2} are really members into a union and are re-extracted
+ * later by solaris. If we're not 64-bit, they appear to just be the same
+ * thing, but on 64-bit they point to two different 32-bit locations that
+ * make up one 64-bit int; so on 64-bit big-endian we need to set the
+ * second one. */
+#if defined(AFS_SUN5_64BIT_ENV) && !defined(AFSLITTLE_ENDIAN)
rvp->r_val2 = fd;
#else
rvp->r_val1 = fd;
afs_syscall_iincdec(dev, inode, inode_p1, amount, rvp, credp)
rval_t *rvp;
- struct AFS_UCRED *credp;
+ afs_ucred_t *credp;
int inode, inode_p1, amount;
dev_t dev;
{
int dummy;
struct inode *ip;
- register afs_int32 code;
+ afs_int32 code;
dev_t newdev;
if (!afs_osi_suser(credp))
* This conversion is needed only for the 64 bit OS.
*/
-#ifdef AFS_SUN57_64BIT_ENV
+#ifdef AFS_SUN5_64BIT_ENV
newdev = expldev((dev32_t) dev);
#else
newdev = dev;