in soviet compilers, compiler optimizes you.
stop providing dated (and annoying for debugging) register keywords.
Change-Id: Ibcac0aa3f353fe531b9be0beedca919fb947bfab
Reviewed-on: http://gerrit.openafs.org/2436
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
}
VN_RELE(vp)
- register struct vnode *vp;
+ struct vnode *vp;
{
VNOP_RELE(vp);
}
VN_HOLD(vp)
- register struct vnode *vp;
+ struct vnode *vp;
{
VNOP_HOLD(vp);
*/
kluge_init()
{
- register struct k_func *kf;
- register struct k_var *kv;
+ struct k_func *kf;
+ struct k_var *kv;
#ifdef __64BIT__
- register afs_uint64 toc;
+ afs_uint64 toc;
#else
- register afs_uint32 toc;
+ afs_uint32 toc;
#endif
- register err = 0;
+ int err = 0;
toc = get_toc();
for (kf = kfuncs; !err && kf->name; ++kf) {
osi_UFSOpen(afs_dcache_id_t *ainode)
{
struct inode *ip;
- register struct osi_file *afile = NULL;
+ struct osi_file *afile = NULL;
struct vnode *vp = NULL;
extern int cacheDiskType;
afs_int32 code = 0;
}
int
-afs_osi_Stat(register struct osi_file *afile, register struct osi_stat *astat)
+afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat)
{
- register afs_int32 code;
+ afs_int32 code;
struct vattr tvattr;
AFS_STATCNT(osi_Stat);
ObtainWriteLock(&afs_xosi, 320);
}
int
-osi_UFSClose(register struct osi_file *afile)
+osi_UFSClose(struct osi_file *afile)
{
AFS_STATCNT(osi_Close);
if (afile->vnode) {
}
int
-osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize)
+osi_UFSTruncate(struct osi_file *afile, afs_int32 asize)
{
afs_ucred_t *oldCred;
struct vattr tvattr;
- register afs_int32 code;
+ afs_int32 code;
struct osi_stat tstat;
afs_int32 mode = FWRITE | FSYNC;
AFS_STATCNT(osi_Truncate);
/* Generic read interface */
int
-afs_osi_Read(register struct osi_file *afile, int offset, void *aptr,
+afs_osi_Read(struct osi_file *afile, int offset, void *aptr,
afs_int32 asize)
{
afs_ucred_t *oldCred;
unsigned int resid;
- register afs_int32 code;
- register afs_int32 cnt1 = 0;
+ afs_int32 code;
+ afs_int32 cnt1 = 0;
AFS_STATCNT(osi_Read);
/**
/* Generic write interface */
int
-afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
+afs_osi_Write(struct osi_file *afile, afs_int32 offset, void *aptr,
afs_int32 asize)
{
afs_ucred_t *oldCred;
unsigned int resid;
- register afs_int32 code;
+ afs_int32 code;
AFS_STATCNT(osi_Write);
if (!afile)
osi_Panic("afs_osi_Write called with null param");
This routine written from the RT NFS port strategy routine.
It has been generalized a bit, but should still be pretty clear. */
int
-afs_osi_MapStrategy(int (*aproc) (), register struct buf *bp)
+afs_osi_MapStrategy(int (*aproc) (), struct buf *bp)
{
afs_int32 returnCode;
int *perror;
{
struct inode *ip;
- register was_locked;
+ int was_locked;
struct vfs *nvfsp = NULL;
int code;
*perror = 0;
SYSENT(icreate, (dev, near_inode, param1, param2, param3, param4), (long dev, long near_inode, long param1, long param2, long param3, long param4))
{
struct inode *ip, *newip, *pip;
- register int err, rval1, rc = 0;
+ int err, rval1, rc = 0;
struct vnode *vp = NULL;
- register struct vfs *vfsp;
+ struct vfs *vfsp;
struct vfs *nvfsp = NULL;
char error;
ino_t ino = near_inode;
SYSENT(iopen, (dev, inode, usrmod),(int dev, int inode, int usrmod))
{
struct file *fp;
- register struct inode *ip;
+ struct inode *ip;
struct vnode *vp = NULL;
extern struct fileops vnodefops;
- register struct vfs *vfsp;
+ struct vfs *vfsp;
int fd;
char error;
struct ucred *credp;
SYSENT(iincdec, (dev, inode, inode_p1, amount),(int dev, int inode, int inode_p1, int amount))
{
- register struct inode *ip;
+ struct inode *ip;
char error;
struct vnode *vp = NULL;
int dummy;
{
struct uio uio_struct;
struct iovec uiovector;
- register int code;
+ int code;
AFS_STATCNT(gop_rdwr);
/* Set up the uio structure */
aix_gnode_rele(vp)
struct vnode *vp;
{
- register struct vnode *tvp;
- register struct vfs *vfsp = vp->v_vfsp;
+ struct vnode *tvp;
+ struct vfs *vfsp = vp->v_vfsp;
/* Unlink the vnode from the list the vfs has hanging of it */
tvp = vfsp->vfs_vnodes;
afs_suser(void *credp)
{
- register rc;
+ int rc;
char err;
rc = suser(&err);
extern void i_enable(int);
void
-timeout(register void (*func) (), /* function to call at timeout */
- register caddr_t arg, /* It's argument. */
- register int ticks, /* when to set timeout for */
- register int type, register char *p1)
+timeout(void (*func) (), /* function to call at timeout */
+ caddr_t arg, /* It's argument. */
+ int ticks, /* when to set timeout for */
+ int type, char *p1)
{
- register int ipri; /* caller's interrupt priority */
- register struct tos *tos; /* tos to use for timeout */
- register struct trb *trb; /* trb in the tos being used */
+ int ipri; /* caller's interrupt priority */
+ struct tos *tos; /* tos to use for timeout */
+ struct trb *trb; /* trb in the tos being used */
struct itimerstruc_t tv; /* timeout interval */
tv.it_value.tv_sec = ticks / HZ;
void
-untimeout(register void (*func) (), register ulong arg)
+untimeout(void (*func) (), ulong arg)
{
- register int ipri; /* caller's interrupt priority */
- register struct tos *tos; /* tos to walk callout table */
- register struct trb *trb; /* trb for this tos */
+ int ipri; /* caller's interrupt priority */
+ struct tos *tos; /* tos to walk callout table */
+ struct trb *trb; /* trb for this tos */
untimeout_retry:
static void
timeout_end(struct trb *trb)
{ /* trb of the current timeout */
- register void (*func) (); /* function to call at timeout */
+ void (*func) (); /* function to call at timeout */
int ipri;
ipri = AFS_DISABLE_LOCK(INTMAX, &afs_callout_lock);
int
-timeoutcf(register int cocnt)
+timeoutcf(int cocnt)
{ /* # entries to change callout table by */
- register int ipri; /* caller's interrupt priority */
- register int rv; /* return value to the caller */
- register struct tos *tos; /* tos to add to/remove from table */
- register struct trb *trb; /* trb in the tos to be added/removed */
+ int ipri; /* caller's interrupt priority */
+ int rv; /* return value to the caller */
+ struct tos *tos; /* tos to add to/remove from table */
+ struct trb *trb; /* trb in the tos to be added/removed */
rv = 0;
extern struct afs_exporter *afs_nfsexporter;
#endif
-#define AFS_VFSLOCK_DECL register int glockOwner = ISAFS_GLOCK()
+#define AFS_VFSLOCK_DECL int glockOwner = ISAFS_GLOCK()
#define AFS_VFSLOCK() if (!glockOwner) AFS_GLOCK()
#define AFS_VFSUNLOCK() if (!glockOwner) AFS_GUNLOCK()
static int
afs_root_nolock(struct vfs *afsp, struct vnode **avpp)
{
- register afs_int32 code = 0;
+ afs_int32 code = 0;
struct vrequest treq;
- register struct vcache *tvp = 0;
+ struct vcache *tvp = 0;
AFS_STATCNT(afs_root);
if (afs_globalVp && (afs_globalVp->f.states & CStatd)) {
{
struct vnode *vp;
struct vattr va;
- register struct osi_file *afile = NULL;
+ struct osi_file *afile = NULL;
extern int cacheDiskType;
afs_int32 code = 0;
int dummy;
}
int
-afs_osi_Stat(register struct osi_file *afile, register struct osi_stat *astat)
+afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat)
{
- register afs_int32 code;
+ afs_int32 code;
struct vattr tvattr;
AFS_STATCNT(osi_Stat);
ObtainWriteLock(&afs_xosi, 320);
}
int
-osi_UFSClose(register struct osi_file *afile)
+osi_UFSClose(struct osi_file *afile)
{
AFS_STATCNT(osi_Close);
if (afile->vnode) {
}
int
-osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize)
+osi_UFSTruncate(struct osi_file *afile, afs_int32 asize)
{
afs_ucred_t *oldCred;
struct vattr tvattr;
- register afs_int32 code;
+ afs_int32 code;
struct osi_stat tstat;
AFS_STATCNT(osi_Truncate);
/* Generic read interface */
int
-afs_osi_Read(register struct osi_file *afile, int offset, void *aptr,
+afs_osi_Read(struct osi_file *afile, int offset, void *aptr,
afs_int32 asize)
{
afs_ucred_t *oldCred;
afs_size_t resid;
- register afs_int32 code;
+ afs_int32 code;
#ifdef AFS_DARWIN80_ENV
uio_t uio;
#endif
/* Generic write interface */
int
-afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
+afs_osi_Write(struct osi_file *afile, afs_int32 offset, void *aptr,
afs_int32 asize)
{
afs_ucred_t *oldCred;
afs_size_t resid;
- register afs_int32 code;
+ afs_int32 code;
#ifdef AFS_DARWIN80_ENV
uio_t uio;
#endif
{
vnode_t pvp, vp;
extern struct osi_dev cacheDev;
- register int code = 0;
+ int code = 0;
*perror = 0;
*vpp = 0;
*perror = 0;
if (!fs) {
- register struct ufsmount *ump;
+ struct ufsmount *ump;
#ifdef VFSTOHFS
- register struct hfsmount *hmp;
+ struct hfsmount *hmp;
#endif
- register struct vnode *vp;
- register struct mount *mp;
+ struct vnode *vp;
+ struct mount *mp;
extern struct mount *rootfs;
if (mp = rootfs)
do {
{
struct vnode *pvp, *vp;
extern struct osi_dev cacheDev;
- register int code = 0;
+ int code = 0;
*perror = 0;
void *mdata = vfs_fsprivate(mp);
int error;
struct vrequest treq;
- register struct vcache *tvp = 0;
+ struct vcache *tvp = 0;
#ifdef AFS_DARWIN80_ENV
struct ucred *cr = vfs_context_ucred(ctx);
int needref=0;
int error;
struct vcache *vcp;
struct vnode *vp, *dvp;
- register int flags = ap->a_cnp->cn_flags;
+ int flags = ap->a_cnp->cn_flags;
int lockparent; /* 1 => lockparent flag is set */
int wantparent; /* 1 => wantparent or lockparent flag */
struct proc *p;
{
int error = 0;
struct vcache *vcp;
- register struct vnode *dvp = ap->a_dvp;
+ struct vnode *dvp = ap->a_dvp;
struct proc *p;
GETNAME();
p = vop_cn_proc;
* int a_flags;
* } */ *ap;
{
- register struct vnode *vp = ap->a_vp;
+ struct vnode *vp = ap->a_vp;
upl_t pl = ap->a_pl;
size_t size = ap->a_size;
off_t f_offset = ap->a_f_offset;
* int a_flags
* } */ *ap;
{
- register struct vnode *vp = ap->a_vp;
+ struct vnode *vp = ap->a_vp;
upl_t pl = ap->a_pl;
size_t size = ap->a_size;
off_t f_offset = ap->a_f_offset;
{
int wait = ap->a_waitfor == MNT_WAIT;
int error;
- register struct vnode *vp = ap->a_vp;
+ struct vnode *vp = ap->a_vp;
int haveGlock = ISAFS_GLOCK();
/* afs_vop_lookup glocks, can call us through vinvalbuf from GetVCache */
* } */ *ap;
{
int error = 0;
- register struct vnode *vp = ap->a_vp;
- register struct vnode *dvp = ap->a_dvp;
+ struct vnode *vp = ap->a_vp;
+ struct vnode *dvp = ap->a_dvp;
#ifdef AFS_DARWIN80_ENV
if (ap->a_flags & VNODE_REMOVE_NODELETEBUSY) {
* } */ *ap;
{
int error = 0;
- register struct vnode *dvp = ap->a_tdvp;
- register struct vnode *vp = ap->a_vp;
+ struct vnode *dvp = ap->a_tdvp;
+ struct vnode *vp = ap->a_vp;
struct proc *p;
GETNAME();
struct componentname *tcnp = ap->a_tcnp;
char *tname;
struct vnode *tvp = ap->a_tvp;
- register struct vnode *tdvp = ap->a_tdvp;
+ struct vnode *tdvp = ap->a_tdvp;
struct vnode *fvp = ap->a_fvp;
- register struct vnode *fdvp = ap->a_fdvp;
+ struct vnode *fdvp = ap->a_fdvp;
struct proc *p;
p = cn_proc(fcnp);
* struct vattr *a_vap;
* } */ *ap;
{
- register struct vnode *dvp = ap->a_dvp;
- register struct vattr *vap = ap->a_vap;
+ struct vnode *dvp = ap->a_dvp;
+ struct vattr *vap = ap->a_vap;
int error = 0;
struct vcache *vcp;
struct proc *p;
* } */ *ap;
{
int error = 0;
- register struct vnode *vp = ap->a_vp;
- register struct vnode *dvp = ap->a_dvp;
+ struct vnode *vp = ap->a_vp;
+ struct vnode *dvp = ap->a_dvp;
GETNAME();
if (dvp == vp) {
* char *a_target;
* } */ *ap;
{
- register struct vnode *dvp = ap->a_dvp;
+ struct vnode *dvp = ap->a_dvp;
int error = 0;
/* NFS ignores a_vpp; so do we. */
* struct proc *a_p;
* } */ *ap;
{
- register struct vnode *vp = ap->a_vp;
+ struct vnode *vp = ap->a_vp;
struct vcache *tvc = VTOAFS(vp);
#ifndef AFS_DARWIN80_ENV
if (prtactive && vp->v_usecount != 0)
{
int error = 0;
int sl, writelocked;
- register struct vnode *vp = ap->a_vp;
+ struct vnode *vp = ap->a_vp;
struct vcache *tvc = VTOAFS(vp);
osi_Assert(!ISAFS_GLOCK());
* struct vnode *a_vp;
* } */ *ap;
{
- register struct vnode *vp = ap->a_vp;
- register struct vcache *avc = VTOAFS(vp);
+ struct vnode *vp = ap->a_vp;
+ struct vcache *avc = VTOAFS(vp);
if (vp->v_tag == VT_NON)
return (ENOENT);
* struct vnode *a_vp;
* } */ *ap;
{
- register struct vnode *vp = ap->a_vp;
- register struct vcache *vc = VTOAFS(ap->a_vp);
+ struct vnode *vp = ap->a_vp;
+ struct vcache *vc = VTOAFS(ap->a_vp);
int s = vc->f.states;
printf("tag %d, fid: %ld.%x.%x.%x, opens %d, writers %d", vp->v_tag,
vc->f.fid.Cell, vc->f.fid.Fid.Volume, vc->f.fid.Fid.Vnode,
}
int
-afs_osi_Stat(register struct osi_file *afile, register struct osi_stat *astat)
+afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat)
{
- register afs_int32 code;
+ afs_int32 code;
struct vattr tvattr;
AFS_STATCNT(osi_Stat);
ObtainWriteLock(&afs_xosi, 320);
}
int
-osi_UFSClose(register struct osi_file *afile)
+osi_UFSClose(struct osi_file *afile)
{
AFS_STATCNT(osi_Close);
if (afile->vnode) {
}
int
-osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize)
+osi_UFSTruncate(struct osi_file *afile, afs_int32 asize)
{
struct vattr tvattr;
struct vnode *vp;
- register afs_int32 code, glocked;
+ afs_int32 code, glocked;
AFS_STATCNT(osi_Truncate);
ObtainWriteLock(&afs_xosi, 321);
/* Generic read interface */
int
-afs_osi_Read(register struct osi_file *afile, int offset, void *aptr,
+afs_osi_Read(struct osi_file *afile, int offset, void *aptr,
afs_int32 asize)
{
unsigned int resid;
- register afs_int32 code;
+ afs_int32 code;
AFS_STATCNT(osi_Read);
/**
/* Generic write interface */
int
-afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
+afs_osi_Write(struct osi_file *afile, afs_int32 offset, void *aptr,
afs_int32 asize)
{
unsigned int resid;
- register afs_int32 code;
+ afs_int32 code;
AFS_STATCNT(osi_Write);
if (!afile)
osi_Panic("afs_osi_Write called with null param");
This routine written from the RT NFS port strategy routine.
It has been generalized a bit, but should still be pretty clear. */
int
-afs_osi_MapStrategy(int (*aproc) (), register struct buf *bp)
+afs_osi_MapStrategy(int (*aproc) (), struct buf *bp)
{
afs_int32 returnCode;
*ipp = 0;
*perror = 0;
if (!fs) {
- register struct ufsmount *ump;
- register struct mount *mp;
+ struct ufsmount *ump;
+ struct mount *mp;
mtx_lock(&mountlist_mtx);
if ((mp = TAILQ_FIRST(&mountlist)) != NULL)
int *perror;
{
struct inode *ip;
- register int code = 0;
+ int code = 0;
*perror = 0;
{
int dummy, err = 0;
struct inode *ip, *newip;
- register int code;
+ int code;
struct vnode *vp;
AFS_STATCNT(afs_syscall_icreate);
int dummy;
int fd;
extern struct fileops vnops;
- register int code;
+ int code;
AFS_STATCNT(afs_syscall_iopen);
{
int dummy;
struct inode *ip;
- register int code;
+ int code;
if (!afs_suser(NULL))
return (EPERM);
{
int error;
struct vrequest treq;
- register struct vcache *tvp = 0;
+ struct vcache *tvp = 0;
#if !defined(AFS_FBSD53_ENV) || defined(AFS_FBSD80_ENV)
struct thread *td = curthread;
#endif
int error;
struct vcache *vcp;
struct vnode *vp, *dvp;
- register int flags = ap->a_cnp->cn_flags;
+ int flags = ap->a_cnp->cn_flags;
int lockparent; /* 1 => lockparent flag is set */
int wantparent; /* 1 => wantparent or lockparent flag */
struct thread *p = ap->a_cnp->cn_thread;
{
int error = 0;
struct vcache *vcp;
- register struct vnode *dvp = ap->a_dvp;
+ struct vnode *dvp = ap->a_dvp;
struct thread *p = ap->a_cnp->cn_thread;
GETNAME();
* } */ *ap;
{
int error;
- register struct vnode *vp = ap->a_vp;
+ struct vnode *vp = ap->a_vp;
AFS_GLOCK();
/*vflushbuf(vp, wait); */
* } */ *ap;
{
int error = 0;
- register struct vnode *vp = ap->a_vp;
- register struct vnode *dvp = ap->a_dvp;
+ struct vnode *vp = ap->a_vp;
+ struct vnode *dvp = ap->a_dvp;
GETNAME();
AFS_GLOCK();
* } */ *ap;
{
int error = 0;
- register struct vnode *dvp = ap->a_tdvp;
- register struct vnode *vp = ap->a_vp;
+ struct vnode *dvp = ap->a_tdvp;
+ struct vnode *vp = ap->a_vp;
struct thread *p = ap->a_cnp->cn_thread;
GETNAME();
struct componentname *tcnp = ap->a_tcnp;
char *tname;
struct vnode *tvp = ap->a_tvp;
- register struct vnode *tdvp = ap->a_tdvp;
+ struct vnode *tdvp = ap->a_tdvp;
struct vnode *fvp = ap->a_fvp;
- register struct vnode *fdvp = ap->a_fdvp;
+ struct vnode *fdvp = ap->a_fdvp;
struct thread *p = fcnp->cn_thread;
/*
* struct vattr *a_vap;
* } */ *ap;
{
- register struct vnode *dvp = ap->a_dvp;
- register struct vattr *vap = ap->a_vap;
+ struct vnode *dvp = ap->a_dvp;
+ struct vattr *vap = ap->a_vap;
int error = 0;
struct vcache *vcp;
struct thread *p = ap->a_cnp->cn_thread;
* } */ *ap;
{
int error = 0;
- register struct vnode *dvp = ap->a_dvp;
+ struct vnode *dvp = ap->a_dvp;
GETNAME();
AFS_GLOCK();
* struct thread *td;
* } */ *ap;
{
- register struct vnode *vp = ap->a_vp;
+ struct vnode *vp = ap->a_vp;
if (prtactive && vp->v_usecount != 0)
vprint("afs_vop_inactive(): pushing active", vp);
* struct vnode *a_vp;
* } */ *ap;
{
- register struct vnode *vp = ap->a_vp;
- register struct vcache *vc = VTOAFS(ap->a_vp);
+ struct vnode *vp = ap->a_vp;
+ struct vcache *vc = VTOAFS(ap->a_vp);
int s = vc->f.states;
printf("tag %s, fid: %d.%d.%d.%d, opens %d, writers %d", vp->v_tag,
osi_UFSOpen(afs_dcache_id_t *ainode)
{
struct inode *ip;
- register struct osi_file *afile = NULL;
+ struct osi_file *afile = NULL;
extern int cacheDiskType;
afs_int32 code = 0;
int dummy;
}
int
-afs_osi_Stat(register struct osi_file *afile, register struct osi_stat *astat)
+afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat)
{
- register afs_int32 code;
+ afs_int32 code;
struct vattr tvattr;
AFS_STATCNT(osi_Stat);
ObtainWriteLock(&afs_xosi, 320);
}
int
-osi_UFSClose(register struct osi_file *afile)
+osi_UFSClose(struct osi_file *afile)
{
AFS_STATCNT(osi_Close);
if (afile->vnode) {
}
int
-osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize)
+osi_UFSTruncate(struct osi_file *afile, afs_int32 asize)
{
afs_ucred_t *oldCred;
struct vattr tvattr;
- register afs_int32 code;
+ afs_int32 code;
struct osi_stat tstat;
AFS_STATCNT(osi_Truncate);
/* Generic read interface */
int
-afs_osi_Read(register struct osi_file *afile, int offset, void *aptr,
+afs_osi_Read(struct osi_file *afile, int offset, void *aptr,
afs_int32 asize)
{
afs_ucred_t *oldCred;
long resid;
- register afs_int32 code;
- register afs_int32 cnt1 = 0;
+ afs_int32 code;
+ afs_int32 cnt1 = 0;
AFS_STATCNT(osi_Read);
/**
/* Generic write interface */
int
-afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
+afs_osi_Write(struct osi_file *afile, afs_int32 offset, void *aptr,
afs_int32 asize)
{
afs_ucred_t *oldCred;
long resid;
- register afs_int32 code;
+ afs_int32 code;
AFS_STATCNT(osi_Write);
if (!afile)
osi_Panic("afs_osi_Write called with null param");
void
afs_osi_TraverseProcTable(void)
{
- register proc_t *p;
+ proc_t *p;
int endchain = 0;
MP_SPINLOCK(activeproc_lock);
struct ucred *newcr;
ulong_t s;
#if defined(AFS_HPUX110_ENV)
- register ulong_t context;
+ ulong_t context;
#endif
AFS_STATCNT(afs_setgroups);
{
struct inode *pip, *ip;
extern struct osi_dev cacheDev;
- register int code = 0;
+ int code = 0;
*perror = 0;
AFS_STATCNT(igetinode);
struct vnode *vp = NULL;
int dummy;
extern struct fileops vnodefops;
- register int code;
+ int code;
int fd;
AFS_STATCNT(afs_syscall_iopen);
{
int dummy;
struct inode *ip;
- register afs_int32 code;
+ afs_int32 code;
if (!afs_suser(NULL)) {
u.u_error = EPERM;
#endif
/* Uses splnet only in the SP case */
-#define SPLVAR register ulong_t splvar
+#define SPLVAR ulong_t splvar
#define NETPRI NET_SPLNET(splvar)
#define USERPRI NET_SPLX(splvar)
/* call procedure aproc with arock as an argument, in ams milliseconds */
static int
afs_osi_CallProc(aproc, arock, ams)
- register void (*aproc) ();
- register char *arock;
+ void (*aproc) ();
+ char *arock;
afs_int32 ams;
{
int code;
/* cancel a timeout, whether or not it has already occurred */
static int
afs_osi_CancelProc(aproc, arock)
- register void (*aproc) ();
- register char *arock;
+ void (*aproc) ();
+ char *arock;
{
int code = 0;
AFS_STATCNT(osi_CancelProc);
{
int code = 0;
struct vrequest treq;
- register struct vcache *tvp = 0;
+ struct vcache *tvp = 0;
AFS_GLOCK();
AFS_STATCNT(afs_root);
}
int
-afs_statfs(register struct vfs *afsp, struct k_statvfs *abp)
+afs_statfs(struct vfs *afsp, struct k_statvfs *abp)
{
AFS_GLOCK();
AFS_STATCNT(afs_statfs);
void
osi_InitGlock()
{
- register ulong_t context;
+ ulong_t context;
SPINLOCK_USAV(sched_lock, context);
if (!afs_Starting) {
*/
int
m_cpytoc(m, off, len, cp)
- register struct mbuf *m;
- register int off, len;
- register caddr_t cp;
+ struct mbuf *m;
+ int off, len;
+ caddr_t cp;
{
- register int ml;
+ int ml;
if (m == NULL || off < 0 || len < 0 || cp == NULL)
osi_Panic("m_cpytoc");
afs_bmap(avc, abn, anvp, anbn)
- register struct vcache *avc;
+ struct vcache *avc;
kern_daddr_t abn, *anbn;
struct vcache **anvp;
{
}
afs_inactive(avc, acred)
- register struct vcache *avc;
+ struct vcache *avc;
afs_ucred_t *acred;
{
struct vnode *vp = AFSTOV(avc);
int
-mp_afs_open(register struct vnode **avcp, int aflags, afs_ucred_t *acred)
+mp_afs_open(struct vnode **avcp, int aflags, afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_open(avcp, aflags, acred);
}
int
-mp_afs_close(register struct vnode *avcp, int aflags, afs_ucred_t *acred)
+mp_afs_close(struct vnode *avcp, int aflags, afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_close(avcp, aflags, acred);
}
int
-mp_afs_rdwr(register struct vnode *avcp, struct uio *uio, enum uio_rw arw,
+mp_afs_rdwr(struct vnode *avcp, struct uio *uio, enum uio_rw arw,
int aio, afs_ucred_t *acred)
{
- register int code;
+ int code;
long save_resid;
AFS_GLOCK();
}
int
-mp_afs_getattr(register struct vnode *avcp, struct vattr *attrs,
+mp_afs_getattr(struct vnode *avcp, struct vattr *attrs,
afs_ucred_t *acred, enum vsync unused1)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_getattr(avcp, attrs, acred);
}
int
-mp_afs_setattr(register struct vnode *avcp, register struct vattr *attrs,
+mp_afs_setattr(struct vnode *avcp, struct vattr *attrs,
afs_ucred_t *acred, int unused1)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_setattr(avcp, attrs, acred);
}
int
-mp_afs_access(register struct vnode *avcp, int mode, afs_ucred_t *acred)
+mp_afs_access(struct vnode *avcp, int mode, afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_access(avcp, mode, acred);
}
int
-mp_afs_lookup(register struct vnode *adp, char *aname,
- register struct vnode **avcp, afs_ucred_t *acred,
+mp_afs_lookup(struct vnode *adp, char *aname,
+ struct vnode **avcp, afs_ucred_t *acred,
struct vnode *unused1)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_lookup(adp, aname, avcp, acred);
}
int
-mp_afs_create(register struct vnode *adp, char *aname, struct vattr *attrs,
+mp_afs_create(struct vnode *adp, char *aname, struct vattr *attrs,
enum vcexcl aexcl, int amode, struct vnode **avcp,
afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_create(adp, aname, attrs, aexcl, amode, avcp, acred);
int
-mp_afs_remove(register struct vnode *adp, char *aname,
+mp_afs_remove(struct vnode *adp, char *aname,
afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_remove(adp, aname, acred);
}
int
-mp_afs_link(register struct vnode *avc, register struct vnode *adp,
+mp_afs_link(struct vnode *avc, struct vnode *adp,
char *aname, afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_link(avc, adp, aname, acred);
}
int
-mp_afs_rename(register struct vnode *aodp, char *aname1,
- register struct vnode *andp, char *aname2,
+mp_afs_rename(struct vnode *aodp, char *aname1,
+ struct vnode *andp, char *aname2,
afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_rename(aodp, aname1, andp, aname2, acred);
}
int
-mp_afs_mkdir(register struct vnode *adp, char *aname, struct vattr *attrs,
- register struct vnode **avcp, afs_ucred_t *acred)
+mp_afs_mkdir(struct vnode *adp, char *aname, struct vattr *attrs,
+ struct vnode **avcp, afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_mkdir(adp, aname, attrs, avcp, acred);
int
-mp_afs_rmdir(register struct vnode *adp, char *aname, afs_ucred_t *acred)
+mp_afs_rmdir(struct vnode *adp, char *aname, afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_rmdir(adp, aname, acred);
int
-mp_afs_readdir(register struct vnode *avc, struct uio *auio,
+mp_afs_readdir(struct vnode *avc, struct uio *auio,
afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_readdir(avc, auio, acred);
}
int
-mp_afs_symlink(register struct vnode *adp, char *aname, struct vattr *attrs,
+mp_afs_symlink(struct vnode *adp, char *aname, struct vattr *attrs,
char *atargetName, afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_symlink(adp, aname, attrs, atargetName, acred);
int
-mp_afs_readlink(register struct vnode *avc, struct uio *auio,
+mp_afs_readlink(struct vnode *avc, struct uio *auio,
afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_readlink(avc, auio, acred);
}
int
-mp_afs_fsync(register struct vnode *avc, afs_ucred_t *acred, int unused1)
+mp_afs_fsync(struct vnode *avc, afs_ucred_t *acred, int unused1)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_fsync(avc, acred);
}
int
-mp_afs_bread(register struct vnode *avc, kern_daddr_t lbn, struct buf **bpp,
+mp_afs_bread(struct vnode *avc, kern_daddr_t lbn, struct buf **bpp,
struct vattr *unused1, struct ucred *unused2)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_bread(avc, lbn, bpp);
}
int
-mp_afs_brelse(register struct vnode *avc, struct buf *bp)
+mp_afs_brelse(struct vnode *avc, struct buf *bp)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_brelse(avc, bp);
int
-mp_afs_inactive(register struct vnode *avc, afs_ucred_t *acred)
+mp_afs_inactive(struct vnode *avc, afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_inactive(avc, acred);
afs_ucred_t *acred, struct file *unused1, off_t unused2,
off_t unused3)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_lockctl(avc, af, cmd, acred);
int
mp_afs_fid(struct vnode *avc, struct fid **fidpp)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_fid(avc, fidpp);
}
int
-mp_afs_readdir2(register struct vnode *avc, struct uio *auio,
+mp_afs_readdir2(struct vnode *avc, struct uio *auio,
afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_readdir2(avc, auio, acred);
* if pageiodone() will not be called automatically.
*/
if (!(bp->b_flags & B_CALL) && steal) {
- register ulong_t context;
+ ulong_t context;
SPINLOCK_USAV(pfdat_lock, context);
parolemem += btorp(nbytes);
afs_hp_strategy(bp)
- register struct buf *bp;
+ struct buf *bp;
{
- register afs_int32 code;
+ afs_int32 code;
struct uio tuio;
struct iovec tiovec[1];
extern caddr_t hdl_kmap_bp();
- register struct kthread *t = u.u_kthreadp;
+ struct kthread *t = u.u_kthreadp;
AFS_STATCNT(afs_hp_strategy);
/*
osi_UFSOpen(afs_dcache_id_t *ainode)
{
struct inode *ip;
- register struct osi_file *afile = NULL;
+ struct osi_file *afile = NULL;
extern int cacheDiskType;
afs_int32 code = 0;
int dummy;
}
int
-afs_osi_Stat(register struct osi_file *afile, register struct osi_stat *astat)
+afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat)
{
- register afs_int32 code;
+ afs_int32 code;
struct vattr tvattr;
AFS_STATCNT(osi_Stat);
ObtainWriteLock(&afs_xosi, 320);
}
int
-osi_UFSClose(register struct osi_file *afile)
+osi_UFSClose(struct osi_file *afile)
{
AFS_STATCNT(osi_Close);
if (afile->vnode) {
}
int
-osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize)
+osi_UFSTruncate(struct osi_file *afile, afs_int32 asize)
{
afs_ucred_t *oldCred;
struct vattr tvattr;
- register afs_int32 code;
+ afs_int32 code;
struct osi_stat tstat;
mon_state_t ms;
AFS_STATCNT(osi_Truncate);
/* Generic read interface */
int
-afs_osi_Read(register struct osi_file *afile, int offset, void *aptr,
+afs_osi_Read(struct osi_file *afile, int offset, void *aptr,
afs_int32 asize)
{
afs_ucred_t *oldCred;
ssize_t resid;
- register afs_int32 code;
- register afs_int32 cnt1 = 0;
+ afs_int32 code;
+ afs_int32 cnt1 = 0;
AFS_STATCNT(osi_Read);
/**
/* Generic write interface */
int
-afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
+afs_osi_Write(struct osi_file *afile, afs_int32 offset, void *aptr,
afs_int32 asize)
{
afs_ucred_t *oldCred;
ssize_t resid;
- register afs_int32 code;
+ afs_int32 code;
AFS_STATCNT(osi_Write);
if (!afile)
osi_Panic("afs_osi_Write called with null param");
This routine written from the RT NFS port strategy routine.
It has been generalized a bit, but should still be pretty clear. */
int
-afs_osi_MapStrategy(int (*aproc) (), register struct buf *bp)
+afs_osi_MapStrategy(int (*aproc) (), struct buf *bp)
{
afs_int32 returnCode;
* debugging routine - invoked by calling kp vnode xx
*/
static void
-printflags(register unsigned int flags, register char **strings)
+printflags(unsigned int flags, char **strings)
{
- register int mask = 1;
+ int mask = 1;
while (flags != 0) {
if (mask & flags) {
idbg_afsvfslist()
{
struct vcache *tvc;
- register struct afs_q *tq;
+ struct afs_q *tq;
struct afs_q *uq;
afs_int32 nodeid; /* what ls prints as 'inode' */
#undef AFS_MUTEX_ENTER
#define AFS_MUTEX_ENTER(mp) \
MACRO_BEGIN \
- register struct kthread *_kthreadP; \
+ struct kthread *_kthreadP; \
while(mutex_tryenter(mp) == 0) { \
_kthreadP = (struct kthread*)mutex_owner(mp); \
if (_kthreadP != NULL && _kthreadP->k_sonproc == CPU_NONE) { \
#define AFS_MUTEX_ENTER(mp) \
MACRO_BEGIN \
- register struct proc *_procP; \
+ struct proc *_procP; \
while(mutex_tryenter(mp) == 0) { \
_procP = mutex_owner(mp); \
if (_procP != NULL && _procP->p_sonproc == CPU_NONE) { \
#define AFS_GUNLOCK()
#define ISAFS_GLOCK() 1
-#define SPLVAR register int splvar
+#define SPLVAR int splvar
#define NETPRI splvar=splnet()
#define USERPRI splx(splvar)
{
struct vcache *tvc;
vnode_t *vp, *rootvp = NULL;
- register struct afs_q *tq;
+ struct afs_q *tq;
struct afs_q *uq;
int error, fv_slept;
OSI_VFS_CONVERT(afsp);
OSI_VFS_DECL(afsp);
struct vnode **avpp;
{
- register afs_int32 code = 0;
+ afs_int32 code = 0;
struct vrequest treq;
- register struct vcache *tvp = 0;
+ struct vcache *tvp = 0;
OSI_VFS_CONVERT(afsp);
AFS_STATCNT(afs_root);
struct vcache *tvc;
struct vnode *vp;
afs_uint32 lvcachegen;
- register struct afs_q *tq;
+ struct afs_q *tq;
struct afs_q *uq;
int s;
OSI_VFS_CONVERT(afsp);
{
struct VenusFid vfid;
struct vrequest treq;
- register struct cell *tcell;
- register afs_int32 code = 0;
+ struct cell *tcell;
+ afs_int32 code = 0;
afs_int32 ret;
#if defined(AFS_SGI64_ENV) && defined(CKPT) && !defined(_R5000_CVT_WAR)
extern int afs_fid2();
-static int afsrwvp(register struct vcache *avc, register struct uio *uio,
+static int afsrwvp(struct vcache *avc, struct uio *uio,
enum uio_rw rw, int ioflag,
#ifdef AFS_SGI64_ENV
struct cred *cr, struct flid *flp);
static int acdrop = 0;
static int
-afsrwvp(register struct vcache *avc, register struct uio *uio, enum uio_rw rw,
+afsrwvp(struct vcache *avc, struct uio *uio, enum uio_rw rw,
int ioflag,
#ifdef AFS_SGI64_ENV
struct cred *cr, struct flid *flp)
struct cred *cr)
#endif
{
- register struct vnode *vp = AFSTOV(avc);
+ struct vnode *vp = AFSTOV(avc);
struct buf *bp;
daddr_t bn;
off_t acnt, cnt;
{
OSI_VC_CONVERT(avc);
struct vnode *vp = AFSTOV(avc);
- register struct brequest *tb;
+ struct brequest *tb;
struct vrequest treq;
afs_int32 code;
}
int
-afs_osi_Stat(register struct osi_file *afile, register struct osi_stat *astat)
+afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat)
{
AFS_STATCNT(osi_Stat);
ObtainWriteLock(&afs_xosi, 320);
}
int
-osi_UFSClose(register struct osi_file *afile)
+osi_UFSClose(struct osi_file *afile)
{
AFS_STATCNT(osi_Close);
if (afile) {
}
int
-osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize)
+osi_UFSTruncate(struct osi_file *afile, afs_int32 asize)
{
- register afs_int32 code;
+ afs_int32 code;
struct osi_stat tstat;
struct iattr newattrs;
struct inode *inode = OSIFILE_INODE(afile);
/* Generic read interface */
int
-afs_osi_Read(register struct osi_file *afile, int offset, void *aptr,
+afs_osi_Read(struct osi_file *afile, int offset, void *aptr,
afs_int32 asize)
{
struct uio auio;
/* Generic write interface */
int
-afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
+afs_osi_Write(struct osi_file *afile, afs_int32 offset, void *aptr,
afs_int32 asize)
{
struct uio auio;
This routine written from the RT NFS port strategy routine.
It has been generalized a bit, but should still be pretty clear. */
int
-afs_osi_MapStrategy(int (*aproc) (struct buf * bp), register struct buf *bp)
+afs_osi_MapStrategy(int (*aproc) (struct buf * bp), struct buf *bp)
{
afs_int32 returnCode;
static int
afs_root(struct super_block *afsp)
{
- register afs_int32 code = 0;
+ afs_int32 code = 0;
struct vrequest treq;
- register struct vcache *tvp = 0;
+ struct vcache *tvp = 0;
AFS_STATCNT(afs_root);
if (afs_globalVp && (afs_globalVp->f.states & CStatd)) {
{
struct vcache *avc = VTOAFS(FILE_INODE(fp));
struct vrequest treq;
- register struct dcache *tdc;
+ struct dcache *tdc;
int code;
int offset;
int dirpos;
void *
osi_UFSOpen(afs_dcache_id_t *ainode)
{
- register struct osi_file *afile = NULL;
+ struct osi_file *afile = NULL;
extern int cacheDiskType;
afs_int32 code = 0;
struct inode *tip = NULL;
}
int
-afs_osi_Stat(register struct osi_file *afile, register struct osi_stat *astat)
+afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat)
{
- register afs_int32 code;
+ afs_int32 code;
AFS_STATCNT(osi_Stat);
ObtainWriteLock(&afs_xosi, 320);
astat->size = i_size_read(OSIFILE_INODE(afile));
}
int
-osi_UFSClose(register struct osi_file *afile)
+osi_UFSClose(struct osi_file *afile)
{
AFS_STATCNT(osi_Close);
if (afile) {
}
int
-osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize)
+osi_UFSTruncate(struct osi_file *afile, afs_int32 asize)
{
- register afs_int32 code;
+ afs_int32 code;
struct osi_stat tstat;
struct iattr newattrs;
struct inode *inode = OSIFILE_INODE(afile);
/* Generic read interface */
int
-afs_osi_Read(register struct osi_file *afile, int offset, void *aptr,
+afs_osi_Read(struct osi_file *afile, int offset, void *aptr,
afs_int32 asize)
{
struct uio auio;
/* Generic write interface */
int
-afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
+afs_osi_Write(struct osi_file *afile, afs_int32 offset, void *aptr,
afs_int32 asize)
{
struct uio auio;
This routine written from the RT NFS port strategy routine.
It has been generalized a bit, but should still be pretty clear. */
int
-afs_osi_MapStrategy(int (*aproc) (struct buf * bp), register struct buf *bp)
+afs_osi_MapStrategy(int (*aproc) (struct buf * bp), struct buf *bp)
{
afs_int32 returnCode;
static int
afs_root(struct super_block *afsp)
{
- register afs_int32 code = 0;
+ afs_int32 code = 0;
struct vrequest treq;
- register struct vcache *tvp = 0;
+ struct vcache *tvp = 0;
AFS_STATCNT(afs_root);
if (afs_globalVp && (afs_globalVp->f.states & CStatd)) {
{
struct vcache *avc = VTOAFS(FILE_INODE(fp));
struct vrequest treq;
- register struct dcache *tdc;
+ struct dcache *tdc;
int code;
int offset;
int dirpos;
int
afs_mount(mp, path, data, ndp, p)
- register struct mount *mp;
+ struct mount *mp;
char *path;
caddr_t data;
struct nameidata *ndp;
osi_VxfsOpen(afs_dcache_id_t *ainode)
{
struct vnode *vp;
- register struct osi_file *afile = NULL;
+ struct osi_file *afile = NULL;
afs_int32 code = 0;
int dummy;
afile = (struct osi_file *)osi_AllocSmallSpace(sizeof(struct osi_file));
#else
struct inode *ip;
#endif
- register struct osi_file *afile = NULL;
+ struct osi_file *afile = NULL;
afs_int32 code = 0;
int dummy;
#ifdef AFS_CACHE_VNODE_PATH
}
int
-afs_osi_Stat(register struct osi_file *afile, register struct osi_stat *astat)
+afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat)
{
- register afs_int32 code;
+ afs_int32 code;
struct vattr tvattr;
AFS_STATCNT(osi_Stat);
ObtainWriteLock(&afs_xosi, 320);
}
int
-osi_UFSClose(register struct osi_file *afile)
+osi_UFSClose(struct osi_file *afile)
{
AFS_STATCNT(osi_Close);
if (afile->vnode) {
}
int
-osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize)
+osi_UFSTruncate(struct osi_file *afile, afs_int32 asize)
{
afs_ucred_t *oldCred;
struct vattr tvattr;
- register afs_int32 code;
+ afs_int32 code;
struct osi_stat tstat;
AFS_STATCNT(osi_Truncate);
/* Generic read interface */
int
-afs_osi_Read(register struct osi_file *afile, int offset, void *aptr,
+afs_osi_Read(struct osi_file *afile, int offset, void *aptr,
afs_int32 asize)
{
afs_ucred_t *oldCred;
#else
int resid;
#endif
- register afs_int32 code;
- register afs_int32 cnt1 = 0;
+ afs_int32 code;
+ afs_int32 cnt1 = 0;
AFS_STATCNT(osi_Read);
/**
/* Generic write interface */
int
-afs_osi_Write(register struct osi_file *afile, afs_int32 offset, void *aptr,
+afs_osi_Write(struct osi_file *afile, afs_int32 offset, void *aptr,
afs_int32 asize)
{
afs_ucred_t *oldCred;
#else
int resid;
#endif
- register afs_int32 code;
+ afs_int32 code;
AFS_STATCNT(osi_Write);
if (!afile)
osi_Panic("afs_osi_Write called with null param");
This routine written from the RT NFS port strategy routine.
It has been generalized a bit, but should still be pretty clear. */
int
-afs_osi_MapStrategy(int (*aproc) (), register struct buf *bp)
+afs_osi_MapStrategy(int (*aproc) (), struct buf *bp)
{
afs_int32 returnCode;
int *perror;
{
struct inode *ip;
- register afs_int32 code;
+ afs_int32 code;
struct vnode *vp;
struct fs *fs;
struct inode *pip;
{
struct inode *pip, *ip;
extern struct osi_dev cacheDev;
- register int code = 0;
+ int code = 0;
*perror = 0;
{
int dummy, err = 0;
struct inode *ip, *newip;
- register int code;
+ int code;
dev_t newdev;
struct ufsvfs *ufsvfsp;
struct vnode *vp = NULL;
int dummy;
int fd;
- register int code;
+ int code;
dev_t newdev;
AFS_STATCNT(afs_syscall_iopen);
{
int dummy;
struct inode *ip;
- register afs_int32 code;
+ afs_int32 code;
dev_t newdev;
if (!afs_osi_suser(credp))
int
afs_root(struct vfs *afsp, struct vnode **avpp)
{
- register afs_int32 code = 0;
+ afs_int32 code = 0;
struct vrequest treq;
- register struct vcache *tvp = 0;
+ struct vcache *tvp = 0;
struct vcache *gvp;
struct proc *proc = ttoproc(curthread);
struct vnode *vp = afsp->vfs_vnodecovered;
int afs_pvn_vptrunc;
int
-afs_addmap(register struct vnode *avp, offset_t offset, struct as *asp,
+afs_addmap(struct vnode *avp, offset_t offset, struct as *asp,
caddr_t addr, int length, int prot, int maxprot, int flags,
afs_ucred_t *credp)
{
}
int
-afs_delmap(register struct vnode *avp, offset_t offset, struct as *asp,
+afs_delmap(struct vnode *avp, offset_t offset, struct as *asp,
caddr_t addr, int length, int prot, int maxprot, int flags,
afs_ucred_t *credp)
{
#ifdef AFS_SUN510_ENV
int
-afs_vmread(register struct vnode *avp, struct uio *auio, int ioflag,
+afs_vmread(struct vnode *avp, struct uio *auio, int ioflag,
afs_ucred_t *acred, caller_context_t *ct)
#else
int
-afs_vmread(register struct vnode *avp, struct uio *auio, int ioflag,
+afs_vmread(struct vnode *avp, struct uio *auio, int ioflag,
afs_ucred_t *acred)
#endif
{
- register int code;
+ int code;
if (!RW_READ_HELD(&(VTOAFS(avp))->rwlock))
osi_Panic("afs_vmread: !rwlock");
#ifdef AFS_SUN510_ENV
int
-afs_vmwrite(register struct vnode *avp, struct uio *auio, int ioflag,
+afs_vmwrite(struct vnode *avp, struct uio *auio, int ioflag,
afs_ucred_t *acred, caller_context_t *ct)
#else
int
-afs_vmwrite(register struct vnode *avp, struct uio *auio, int ioflag,
+afs_vmwrite(struct vnode *avp, struct uio *auio, int ioflag,
afs_ucred_t *acred)
#endif
{
- register int code;
+ int code;
if (!RW_WRITE_HELD(&(VTOAFS(avp))->rwlock))
osi_Panic("afs_vmwrite: !rwlock");
struct page *pl[], u_int plsz, struct seg *seg, caddr_t addr,
enum seg_rw rw, afs_ucred_t *acred)
{
- register afs_int32 code = 0;
+ afs_int32 code = 0;
AFS_STATCNT(afs_getpage);
if (vp->v_flag & VNOMAP) /* File doesn't allow mapping */
enum seg_rw rw, afs_ucred_t *acred)
#endif
{
- register struct page *page;
- register afs_int32 code = 0;
+ struct page *page;
+ afs_int32 code = 0;
u_int len;
struct buf *buf;
afs_int32 tlen;
- register struct vcache *avc;
- register struct dcache *tdc;
+ struct vcache *avc;
+ struct dcache *tdc;
int i, s, pexists;
int slot;
afs_size_t offset, nlen = 0;
}
int
-afs_nfsrdwr(register struct vcache *avc, struct uio *auio, enum uio_rw arw,
+afs_nfsrdwr(struct vcache *avc, struct uio *auio, enum uio_rw arw,
int ioflag, afs_ucred_t *acred)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 code2;
int counter;
afs_int32 mode, sflags;
- register char *data;
+ char *data;
struct dcache *dcp, *dcp_newpage;
afs_size_t fileBase, size;
afs_size_t pageBase;
- register afs_int32 tsize;
- register afs_int32 pageOffset, extraResid = 0;
- register afs_size_t origLength; /* length when reading/writing started */
- register long appendLength; /* length when this call will finish */
+ afs_int32 tsize;
+ afs_int32 pageOffset, extraResid = 0;
+ afs_size_t origLength; /* length when reading/writing started */
+ long appendLength; /* length when this call will finish */
int created; /* created pages instead of faulting them */
int lockCode;
int didFakeOpen, eof;
afs_map(struct vnode *vp, offset_t off, struct as *as, caddr_t *addr, u_int len, u_char prot, u_char maxprot, u_int flags, afs_ucred_t *cred)
{
struct segvn_crargs crargs;
- register afs_int32 code;
+ afs_int32 code;
struct vrequest treq;
- register struct vcache *avc = VTOAFS(vp);
+ struct vcache *avc = VTOAFS(vp);
AFS_STATCNT(afs_map);
int
#ifdef AFS_SUN511_ENV
afs_pathconf(struct vnode *vp, int cmd, u_long *outdatap,
- register afs_ucred_t *credp, caller_context_t *ct)
+ afs_ucred_t *credp, caller_context_t *ct)
#else
afs_pathconf(struct vnode *vp, int cmd, u_long *outdatap,
- register afs_ucred_t *credp)
+ afs_ucred_t *credp)
#endif /* AFS_SUN511_ENV */
{
AFS_STATCNT(afs_cntl);
int
afs_seek(struct vnode *vnp, offset_t ooff, offset_t *noffp)
{
- register int code = 0;
+ int code = 0;
#ifndef AFS_64BIT_CLIENT
# define __MAXOFF_T MAXOFF_T
offset_t off, afs_ucred_t *credp)
#endif
{
- register afs_int32 code = 0;
+ afs_int32 code = 0;
/*
* Implement based on afs_lockctl
*/
offset_t off, afs_ucred_t *credp)
#endif
{
- register afs_int32 code = EINVAL;
+ afs_int32 code = EINVAL;
struct vattr vattr;
if ((cmd == F_FREESP)
#endif
#ifdef AFS_GLOBAL_SUNLOCK
-extern int gafs_open(register struct vcache **avcp, afs_int32 aflags,
+extern int gafs_open(struct vcache **avcp, afs_int32 aflags,
afs_ucred_t *acred);
-extern int gafs_close(register struct vcache *avc, afs_int32 aflags,
+extern int gafs_close(struct vcache *avc, afs_int32 aflags,
int count, offset_t offset, afs_ucred_t *acred);
extern int afs_ioctl(struct vnode *vnp, int com, int arg, int flag,
cred_t *credp, int *rvalp);
-extern int gafs_access(register struct vcache *avc, register afs_int32 amode,
+extern int gafs_access(struct vcache *avc, afs_int32 amode,
int flags, afs_ucred_t *acred);
-extern int gafs_getattr(register struct vcache *avc,
- register struct vattr *attrs, int flags,
+extern int gafs_getattr(struct vcache *avc,
+ struct vattr *attrs, int flags,
afs_ucred_t *acred);
-extern int gafs_setattr(register struct vcache *avc,
- register struct vattr *attrs, int flags,
+extern int gafs_setattr(struct vcache *avc,
+ struct vattr *attrs, int flags,
afs_ucred_t *acred);
-extern int gafs_lookup(register struct vcache *adp, char *aname,
- register struct vcache **avcp, struct pathname *pnp,
+extern int gafs_lookup(struct vcache *adp, char *aname,
+ struct vcache **avcp, struct pathname *pnp,
int flags, struct vnode *rdir, afs_ucred_t *acred);
-extern int gafs_remove(register struct vcache *adp, char *aname,
+extern int gafs_remove(struct vcache *adp, char *aname,
afs_ucred_t *acred);
-extern int gafs_link(register struct vcache *adp, register struct vcache *avc,
+extern int gafs_link(struct vcache *adp, struct vcache *avc,
char *aname, afs_ucred_t *acred);
-extern int gafs_rename(register struct vcache *aodp, char *aname1,
- register struct vcache *andp, char *aname2,
+extern int gafs_rename(struct vcache *aodp, char *aname1,
+ struct vcache *andp, char *aname2,
afs_ucred_t *acred);
-extern int gafs_symlink(register struct vcache *adp, char *aname,
- struct vattr *attrs, register char *atargetName,
+extern int gafs_symlink(struct vcache *adp, char *aname,
+ struct vattr *attrs, char *atargetName,
afs_ucred_t *acred);
-extern int gafs_rmdir(register struct vcache *adp, char *aname,
+extern int gafs_rmdir(struct vcache *adp, char *aname,
struct vnode *cdirp, afs_ucred_t *acred);
-extern int gafs_mkdir(register struct vcache *adp, char *aname,
- struct vattr *attrs, register struct vcache **avcp,
+extern int gafs_mkdir(struct vcache *adp, char *aname,
+ struct vattr *attrs, struct vcache **avcp,
afs_ucred_t *acred);
extern int
#ifdef AFS_SUN53_ENV
-gafs_fsync(register struct vcache *avc, int flag, afs_ucred_t *acred);
+gafs_fsync(struct vcache *avc, int flag, afs_ucred_t *acred);
#else
-gafs_fsync(register struct vcache *avc, afs_ucred_t *acred);
+gafs_fsync(struct vcache *avc, afs_ucred_t *acred);
#endif
-extern int gafs_readlink(register struct vcache *avc, struct uio *auio,
+extern int gafs_readlink(struct vcache *avc, struct uio *auio,
afs_ucred_t *acred);
-extern int gafs_readdir(register struct vcache *avc, struct uio *auio,
+extern int gafs_readdir(struct vcache *avc, struct uio *auio,
afs_ucred_t *acred, int *eofp);
-extern void gafs_inactive(register struct vcache *avc,
+extern void gafs_inactive(struct vcache *avc,
afs_ucred_t *acred);
extern int gafs_fid(struct vcache *avc, struct fid **fidpp);
-extern int gafs_create(register struct vcache *adp, char *aname,
+extern int gafs_create(struct vcache *adp, char *aname,
struct vattr *attrs, enum vcexcl aexcl, int amode,
struct vcache **avcp, afs_ucred_t *acred);
#ifdef AFS_SUN511_ENV
extern int afs_pathconf(struct vnode *vp, int cmd, u_long *outdatap,
- register afs_ucred_t *credp, caller_context_t *ct);
+ afs_ucred_t *credp, caller_context_t *ct);
#else
extern int afs_pathconf(struct vnode *vp, int cmd, u_long *outdatap,
- register afs_ucred_t *credp);
+ afs_ucred_t *credp);
#endif /* AFS_SUN511_ENV */
#if defined(AFS_SUN511_ENV)
#endif
int
-gafs_open(register struct vcache **avcp, afs_int32 aflags,
+gafs_open(struct vcache **avcp, afs_int32 aflags,
afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_open(avcp, aflags, acred);
}
int
-gafs_close(register struct vcache *avc, afs_int32 aflags, int count,
+gafs_close(struct vcache *avc, afs_int32 aflags, int count,
offset_t offset, afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_close(avc, aflags, count, offset, acred);
}
int
-gafs_getattr(register struct vcache *avc, register struct vattr *attrs,
+gafs_getattr(struct vcache *avc, struct vattr *attrs,
int flags, afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_getattr(avc, attrs, flags, acred);
int
-gafs_setattr(register struct vcache *avc, register struct vattr *attrs,
+gafs_setattr(struct vcache *avc, struct vattr *attrs,
int flags, afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_setattr(avc, attrs, flags, acred);
int
-gafs_access(register struct vcache *avc, register afs_int32 amode, int flags,
+gafs_access(struct vcache *avc, afs_int32 amode, int flags,
afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_access(avc, amode, flags, acred);
int
-gafs_lookup(register struct vcache *adp, char *aname,
- register struct vcache **avcp, struct pathname *pnp, int flags,
+gafs_lookup(struct vcache *adp, char *aname,
+ struct vcache **avcp, struct pathname *pnp, int flags,
struct vnode *rdir, afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_lookup(adp, aname, avcp, pnp, flags, rdir, acred);
int
-gafs_create(register struct vcache *adp, char *aname, struct vattr *attrs,
+gafs_create(struct vcache *adp, char *aname, struct vattr *attrs,
enum vcexcl aexcl, int amode, struct vcache **avcp,
afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_create(adp, aname, attrs, aexcl, amode, avcp, acred);
}
int
-gafs_remove(register struct vcache *adp, char *aname, afs_ucred_t *acred)
+gafs_remove(struct vcache *adp, char *aname, afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_remove(adp, aname, acred);
}
int
-gafs_link(register struct vcache *adp, register struct vcache *avc,
+gafs_link(struct vcache *adp, struct vcache *avc,
char *aname, afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_link(adp, avc, aname, acred);
}
int
-gafs_rename(register struct vcache *aodp, char *aname1,
- register struct vcache *andp, char *aname2,
+gafs_rename(struct vcache *aodp, char *aname1,
+ struct vcache *andp, char *aname2,
afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_rename(aodp, aname1, andp, aname2, acred);
}
int
-gafs_mkdir(register struct vcache *adp, char *aname, struct vattr *attrs,
- register struct vcache **avcp, afs_ucred_t *acred)
+gafs_mkdir(struct vcache *adp, char *aname, struct vattr *attrs,
+ struct vcache **avcp, afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_mkdir(adp, aname, attrs, avcp, acred);
}
int
-gafs_rmdir(register struct vcache *adp, char *aname, struct vnode *cdirp,
+gafs_rmdir(struct vcache *adp, char *aname, struct vnode *cdirp,
afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_rmdir(adp, aname, cdirp, acred);
int
-gafs_readdir(register struct vcache *avc, struct uio *auio,
+gafs_readdir(struct vcache *avc, struct uio *auio,
afs_ucred_t *acred, int *eofp)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_readdir(avc, auio, acred, eofp);
}
int
-gafs_symlink(register struct vcache *adp, char *aname, struct vattr *attrs,
- register char *atargetName, afs_ucred_t *acred)
+gafs_symlink(struct vcache *adp, char *aname, struct vattr *attrs,
+ char *atargetName, afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_symlink(adp, aname, attrs, atargetName, acred);
int
-gafs_readlink(register struct vcache *avc, struct uio *auio, afs_ucred_t *acred)
+gafs_readlink(struct vcache *avc, struct uio *auio, afs_ucred_t *acred)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_readlink(avc, auio, acred);
int
#ifdef AFS_SUN53_ENV
-gafs_fsync(register struct vcache *avc, int flag, afs_ucred_t *acred)
+gafs_fsync(struct vcache *avc, int flag, afs_ucred_t *acred)
#else
-gafs_fsync(register struct vcache *avc, afs_ucred_t *acred)
+gafs_fsync(struct vcache *avc, afs_ucred_t *acred)
#endif
{
- register int code;
+ int code;
AFS_GLOCK();
#ifdef AFS_SUN53_ENV
}
void
-gafs_inactive(register struct vcache *avc, afs_ucred_t *acred)
+gafs_inactive(struct vcache *avc, afs_ucred_t *acred)
{
AFS_GLOCK();
(void)afs_inactive(avc, acred);
int
gafs_fid(struct vcache *avc, struct fid **fidpp)
{
- register int code;
+ int code;
AFS_GLOCK();
code = afs_fid(avc, fidpp);
}
void
-osi_FlushPages(register struct vcache *avc, afs_ucred_t *credp)
+osi_FlushPages(struct vcache *avc, afs_ucred_t *credp)
{
ObtainSharedLock(&avc->lock, 555);
if ((hcmp((avc->f.m.DataVersion), (avc->mapDV)) <= 0)
}
void
-osi_FlushText_really(register struct vcache *vp)
+osi_FlushText_really(struct vcache *vp)
{
if (hcmp(vp->f.m.DataVersion, vp->flushDV) > 0) {
hset(vp->flushDV, vp->f.m.DataVersion);
extern int afs_unmount(struct vfs *afsp);
extern int afs_root(OSI_VFS_DECL(afsp), struct vnode **avpp);
extern int afs_sync(struct vfs *afsp);
-extern int afs_statfs(register struct vfs *afsp, struct statfs *abp);
+extern int afs_statfs(struct vfs *afsp, struct statfs *abp);
extern int afs_mountroot(void);
extern int afs_swapvp(void);
int
afs_root(OSI_VFS_DECL(afsp), struct vnode **avpp)
{
- register afs_int32 code = 0;
+ afs_int32 code = 0;
struct vrequest treq;
- register struct vcache *tvp = 0;
+ struct vcache *tvp = 0;
OSI_VFS_CONVERT(afsp);
AFS_STATCNT(afs_root);
}
int
-afs_statfs(register struct vfs *afsp, struct statfs *abp)
+afs_statfs(struct vfs *afsp, struct statfs *abp)
{
AFS_STATCNT(afs_statfs);
abp->f_type = 0;
/* avc must be held. Returns bit map of mode bits. Ignores file mode bits */
afs_int32
-afs_GetAccessBits(register struct vcache *avc, register afs_int32 arights,
- register struct vrequest *areq)
+afs_GetAccessBits(struct vcache *avc, afs_int32 arights,
+ struct vrequest *areq)
{
AFS_STATCNT(afs_GetAccessBits);
/* see if anyuser has the required access bits */
afs_AccessOK(struct vcache *avc, afs_int32 arights, struct vrequest *areq,
afs_int32 check_mode_bits)
{
- register struct vcache *tvc;
+ struct vcache *tvc;
struct VenusFid dirFid;
- register afs_int32 mask;
+ afs_int32 mask;
afs_int32 dirBits;
- register afs_int32 fileBits;
+ afs_int32 fileBits;
AFS_STATCNT(afs_AccessOK);
#if defined(AFS_SUN5_ENV) || (defined(AFS_SGI_ENV) && !defined(AFS_SGI65_ENV))
int
-afs_access(OSI_VC_DECL(avc), register afs_int32 amode, int flags,
+afs_access(OSI_VC_DECL(avc), afs_int32 amode, int flags,
afs_ucred_t *acred)
#else
int
-afs_access(OSI_VC_DECL(avc), register afs_int32 amode,
+afs_access(OSI_VC_DECL(avc), afs_int32 amode,
afs_ucred_t *acred)
#endif
{
- register afs_int32 code;
+ afs_int32 code;
struct vrequest treq;
struct afs_fakestat_state fakestate;
OSI_VC_CONVERT(avc);
* This function is just an interface to afs_GetAccessBits
*/
int
-afs_getRights(OSI_VC_DECL(avc), register afs_int32 arights,
+afs_getRights(OSI_VC_DECL(avc), afs_int32 arights,
afs_ucred_t *acred)
{
- register afs_int32 code;
+ afs_int32 code;
struct vrequest treq;
OSI_VC_CONVERT(avc);
/* copy out attributes from cache entry */
int
-afs_CopyOutAttrs(register struct vcache *avc, register struct vattr *attrs)
+afs_CopyOutAttrs(struct vcache *avc, struct vattr *attrs)
{
- register struct volume *tvp;
- register struct cell *tcell;
+ struct volume *tvp;
+ struct cell *tcell;
int fakedir = 0;
AFS_STATCNT(afs_CopyOutAttrs);
}
}
if ((au = afs_FindUser(treq.uid, -1, READ_LOCK))) {
- register struct afs_exporter *exporter = au->exporter;
+ struct afs_exporter *exporter = au->exporter;
if (exporter && !(afs_nfsexporter->exp_states & EXP_UNIXMODE)) {
unsigned int ubits;
/* convert a Unix request into a status store request */
int
-afs_VAttrToAS(register struct vcache *avc, register struct vattr *av,
- register struct AFSStoreStatus *as)
+afs_VAttrToAS(struct vcache *avc, struct vattr *av,
+ struct AFSStoreStatus *as)
{
- register int mask;
+ int mask;
mask = 0;
AFS_STATCNT(afs_VAttrToAS);
#if defined(AFS_DARWIN80_ENV)
*/
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
int
-afs_setattr(OSI_VC_DECL(avc), register struct vattr *attrs, int flags,
+afs_setattr(OSI_VC_DECL(avc), struct vattr *attrs, int flags,
afs_ucred_t *acred)
#else
int
-afs_setattr(OSI_VC_DECL(avc), register struct vattr *attrs,
+afs_setattr(OSI_VC_DECL(avc), struct vattr *attrs,
afs_ucred_t *acred)
#endif
{
struct vrequest treq;
struct AFSStoreStatus astat;
- register afs_int32 code;
+ afs_int32 code;
struct afs_fakestat_state fakestate;
OSI_VC_CONVERT(avc);
{
afs_int32 origCBs, origZaps, finalZaps;
struct vrequest treq;
- register afs_int32 code;
- register struct afs_conn *tc;
+ afs_int32 code;
+ struct afs_conn *tc;
struct VenusFid newFid;
struct AFSStoreStatus InStatus;
struct AFSFetchStatus OutFidStatus, OutDirStatus;
* and dcache entry write-locked.
*/
int
-afs_LocalHero(register struct vcache *avc, register struct dcache *adc,
- register AFSFetchStatus * astat, register int aincr)
+afs_LocalHero(struct vcache *avc, struct dcache *adc,
+ AFSFetchStatus * astat, int aincr)
{
- register afs_int32 ok;
+ afs_int32 ok;
afs_hyper_t avers;
AFS_STATCNT(afs_LocalHero);
int
afs_mkdir(OSI_VC_DECL(adp), char *aname, struct vattr *attrs,
- register struct vcache **avcp, afs_ucred_t *acred)
+ struct vcache **avcp, afs_ucred_t *acred)
{
struct vrequest treq;
- register afs_int32 code;
- register struct afs_conn *tc;
+ afs_int32 code;
+ struct afs_conn *tc;
struct VenusFid newFid;
- register struct dcache *tdc;
+ struct dcache *tdc;
struct dcache *new_dc;
afs_size_t offset, len;
- register struct vcache *tvc;
+ struct vcache *tvc;
struct AFSStoreStatus InStatus;
struct AFSFetchStatus OutFidStatus, OutDirStatus;
struct AFSCallBack CallBack;
#endif
{
struct vrequest treq;
- register struct dcache *tdc;
- register struct vcache *tvc = NULL;
- register afs_int32 code;
- register struct afs_conn *tc;
+ struct dcache *tdc;
+ struct vcache *tvc = NULL;
+ afs_int32 code;
+ struct afs_conn *tc;
afs_size_t offset, len;
struct AFSFetchStatus OutDirStatus;
struct AFSVolSync tsync;
{
struct SmallFid Sfid;
long addr[2];
- register struct cell *tcell;
+ struct cell *tcell;
extern struct vcache *afs_globalVp;
int SizeOfSmallFid = SIZEOF_SMALLFID;
int rootvp = 0;
/* Static prototypes */
-static int HandleGetLock(register struct vcache *avc,
- register struct AFS_FLOCK *af,
- register struct vrequest *areq, int clid);
+static int HandleGetLock(struct vcache *avc,
+ struct AFS_FLOCK *af,
+ struct vrequest *areq, int clid);
static int GetFlockCount(struct vcache *avc, struct vrequest *areq);
static int lockIdcmp2(struct AFS_FLOCK *flock1, struct vcache *vp,
- register struct SimpleLocks *alp, int onlymine,
+ struct SimpleLocks *alp, int onlymine,
int clid);
static void DoLockWarning(afs_ucred_t * acred);
static int
lockIdcmp2(struct AFS_FLOCK *flock1, struct vcache *vp,
- register struct SimpleLocks *alp, int onlymine, int clid)
+ struct SimpleLocks *alp, int onlymine, int clid)
{
- register struct SimpleLocks *slp;
+ struct SimpleLocks *slp;
#if defined(AFS_SUN5_ENV)
- register proc_t *procp = ttoproc(curthread);
+ proc_t *procp = ttoproc(curthread);
#else
#if !defined(AFS_AIX41_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_SGI65_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
#ifdef AFS_SGI64_ENV
*/
/* clid - nonzero on sgi sunos osf1 only */
int
-HandleFlock(register struct vcache *avc, int acom, struct vrequest *areq,
+HandleFlock(struct vcache *avc, int acom, struct vrequest *areq,
pid_t clid, int onlymine)
{
struct afs_conn *tc;
static void
DoLockWarning(afs_ucred_t * acred)
{
- register afs_int32 now;
+ afs_int32 now;
pid_t pid = MyPidxx2Pid(MyPidxx);
char *procname;
* PID has the file read locked.
*/
static int
-HandleGetLock(register struct vcache *avc, register struct AFS_FLOCK *af,
- register struct vrequest *areq, int clid)
+HandleGetLock(struct vcache *avc, struct AFS_FLOCK *af,
+ struct vrequest *areq, int clid)
{
- register afs_int32 code;
+ afs_int32 code;
struct AFS_FLOCK flock;
lockIdSet(&flock, NULL, clid);
static int
GetFlockCount(struct vcache *avc, struct vrequest *areq)
{
- register struct afs_conn *tc;
- register afs_int32 code;
+ struct afs_conn *tc;
+ afs_int32 code;
struct AFSFetchStatus OutStatus;
struct AFSCallBack CallBack;
struct AFSVolSync tsync;
#endif
{
struct vrequest treq;
- register struct dcache *tdc;
- register afs_int32 code;
- register struct afs_conn *tc;
+ struct dcache *tdc;
+ afs_int32 code;
+ struct afs_conn *tc;
afs_size_t offset, len;
struct AFSFetchStatus OutFidStatus, OutDirStatus;
struct AFSVolSync tsync;
*/
static int
EvalMountData(char type, char *data, afs_uint32 states, afs_uint32 cellnum,
- struct volume **avolpp, register struct vrequest *areq,
+ struct volume **avolpp, struct vrequest *areq,
afs_uint32 *acellidxp, afs_uint32 *avolnump,
afs_uint32 *avnoidp, afs_uint32 *auniqp)
{
}
int
-EvalMountPoint(register struct vcache *avc, struct vcache *advc,
- struct volume **avolpp, register struct vrequest *areq)
+EvalMountPoint(struct vcache *avc, struct vcache *advc,
+ struct volume **avolpp, struct vrequest *areq)
{
afs_int32 code;
afs_uint32 avnoid, auniq;
}
int
-afs_ENameOK(register char *aname)
+afs_ENameOK(char *aname)
{
- register int tlen;
+ int tlen;
AFS_STATCNT(ENameOK);
tlen = strlen(aname);
}
static int
-afs_getsysname(register struct vrequest *areq, register struct vcache *adp,
- register char *bufp, int *num, char **sysnamelist[])
+afs_getsysname(struct vrequest *areq, struct vcache *adp,
+ char *bufp, int *num, char **sysnamelist[])
{
- register struct unixuser *au;
- register afs_int32 error;
+ struct unixuser *au;
+ afs_int32 error;
AFS_STATCNT(getsysname);
}
void
-Check_AtSys(register struct vcache *avc, const char *aname,
+Check_AtSys(struct vcache *avc, const char *aname,
struct sysname_info *state, struct vrequest *areq)
{
int num = 0;
}
int
-Next_AtSys(register struct vcache *avc, struct vrequest *areq,
+Next_AtSys(struct vcache *avc, struct vrequest *areq,
struct sysname_info *state)
{
int num = afs_sysnamecount;
/* Check for the initial state of aname != "@sys" in Check_AtSys */
if (state->offset == -1 && state->allocked == 0) {
- register char *tname;
+ char *tname;
/* Check for .*@sys */
for (tname = state->name; *tname; tname++)
} else
return 0; /* .*@sys doesn't match either */
} else {
- register struct unixuser *au;
- register afs_int32 error;
+ struct unixuser *au;
+ afs_int32 error;
*sysnamelist = afs_sysnamelist;
{
struct vrequest treq;
char *tname = NULL;
- register struct vcache *tvc = 0;
- register afs_int32 code;
- register afs_int32 bulkcode = 0;
+ struct vcache *tvc = 0;
+ afs_int32 code;
+ afs_int32 bulkcode = 0;
int pass = 0, hit = 0;
int force_eval = afs_fakestat_enable ? 0 : 1;
long dirCookie;
}
{ /* sub-block just to reduce stack usage */
- register struct dcache *tdc;
+ struct dcache *tdc;
afs_size_t dirOffset, dirLen;
struct VenusFid tfid;
afs_open(struct vcache **avcp, afs_int32 aflags, afs_ucred_t *acred)
#endif
{
- register afs_int32 code;
+ afs_int32 code;
struct vrequest treq;
struct vcache *tvc;
int writing;
ReleaseReadLock(&tvc->lock);
if ((afs_preCache != 0) && (writing == 0) && (vType(tvc) != VDIR) &&
(!afs_BBusy())) {
- register struct dcache *tdc;
+ struct dcache *tdc;
afs_size_t offset, len;
tdc = afs_GetDCache(tvc, 0, &treq, &offset, &len, 1);
afs_ucred_t *acred, struct vrequest *areq);
int
-afs_MemRead(register struct vcache *avc, struct uio *auio,
+afs_MemRead(struct vcache *avc, struct uio *auio,
afs_ucred_t *acred, daddr_t albn, struct buf **abpp,
int noLock)
{
afs_PrefetchChunk(struct vcache *avc, struct dcache *adc,
afs_ucred_t *acred, struct vrequest *areq)
{
- register struct dcache *tdc;
+ struct dcache *tdc;
afs_size_t offset;
afs_size_t j1, j2; /* junk vbls for GetDCache to trash */
}
int
-afs_UFSRead(register struct vcache *avc, struct uio *auio,
+afs_UFSRead(struct vcache *avc, struct uio *auio,
afs_ucred_t *acred, daddr_t albn, struct buf **abpp,
int noLock)
{
int
BlobScan(struct dcache * afile, afs_int32 ablob)
{
- register afs_int32 relativeBlob;
+ afs_int32 relativeBlob;
afs_int32 pageBlob;
- register struct PageHeader *tpe;
- register afs_int32 i;
+ struct PageHeader *tpe;
+ afs_int32 i;
AFS_STATCNT(BlobScan);
/* advance ablob over free and header blobs */
#endif
{
struct vrequest treq;
- register struct dcache *tdc;
+ struct dcache *tdc;
afs_size_t origOffset, tlen;
afs_int32 len;
int code = 0;
afs1_readdir(struct vcache *avc, struct uio *auio, afs_ucred_t *acred)
{
struct vrequest treq;
- register struct dcache *tdc;
+ struct dcache *tdc;
afs_size_t origOffset, len;
int code = 0;
struct DirEntry *ode = 0, *nde = 0;
static void
-FetchWholeEnchilada(register struct vcache *avc, struct vrequest *areq)
+FetchWholeEnchilada(struct vcache *avc, struct vrequest *areq)
{
- register afs_int32 nextChunk;
- register struct dcache *tdc;
+ afs_int32 nextChunk;
+ struct dcache *tdc;
afs_size_t pos, offset, len;
AFS_STATCNT(FetchWholeEnchilada);
}
int
-afsremove(register struct vcache *adp, register struct dcache *tdc,
- register struct vcache *tvc, char *aname, afs_ucred_t *acred,
+afsremove(struct vcache *adp, struct dcache *tdc,
+ struct vcache *tvc, char *aname, afs_ucred_t *acred,
struct vrequest *treqp)
{
- register afs_int32 code = 0;
- register struct afs_conn *tc;
+ afs_int32 code = 0;
+ struct afs_conn *tc;
struct AFSFetchStatus OutDirStatus;
struct AFSVolSync tsync;
XSTATS_DECLS;
afs_remove(OSI_VC_DECL(adp), char *aname, afs_ucred_t *acred)
{
struct vrequest treq;
- register struct dcache *tdc;
+ struct dcache *tdc;
struct VenusFid unlinkFid;
- register afs_int32 code;
- register struct vcache *tvc;
+ afs_int32 code;
+ struct vcache *tvc;
afs_size_t offset, len;
struct afs_fakestat_state fakestate;
OSI_VC_CONVERT(adp);
* CAUTION -- may be called with avc unheld. */
int
-afs_remunlink(register struct vcache *avc, register int doit)
+afs_remunlink(struct vcache *avc, int doit)
{
afs_ucred_t *cred;
char *unlname;
struct vcache *adp;
struct vrequest treq;
struct VenusFid dirFid;
- register struct dcache *tdc;
+ struct dcache *tdc;
afs_int32 code = 0;
if (NBObtainWriteLock(&avc->lock, 423))
afsrename(struct vcache *aodp, char *aname1, struct vcache *andp,
char *aname2, afs_ucred_t *acred, struct vrequest *areq)
{
- register struct afs_conn *tc;
- register afs_int32 code = 0;
+ struct afs_conn *tc;
+ afs_int32 code = 0;
afs_int32 returnCode;
int oneDir, doLocally;
afs_size_t offset, len;
afs_rename(OSI_VC_DECL(aodp), char *aname1, struct vcache *andp, char *aname2, afs_ucred_t *acred)
#endif
{
- register afs_int32 code;
+ afs_int32 code;
struct afs_fakestat_state ofakestate;
struct afs_fakestat_state nfakestate;
struct vrequest treq;
#if defined(AFS_SUN5_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-int afs_ustrategy(register struct buf *abp, afs_ucred_t *credp)
+int afs_ustrategy(struct buf *abp, afs_ucred_t *credp)
#else
-int afs_ustrategy(register struct buf *abp)
+int afs_ustrategy(struct buf *abp)
#endif
{
- register afs_int32 code;
+ afs_int32 code;
struct uio tuio;
struct iovec tiovec[1];
- register struct vcache *tvc = VTOAFS(abp->b_vp);
- register afs_int32 len = abp->b_bcount;
+ struct vcache *tvc = VTOAFS(abp->b_vp);
+ afs_int32 len = abp->b_bcount;
#ifdef AFS_AIX41_ENV
struct ucred *credp;
#elif defined(UKERNEL)
}
int
-afs_MemHandleLink(register struct vcache *avc, struct vrequest *areq)
+afs_MemHandleLink(struct vcache *avc, struct vrequest *areq)
{
- register struct dcache *tdc;
- register char *tp, *rbuf;
+ struct dcache *tdc;
+ char *tp, *rbuf;
afs_size_t offset, len;
afs_int32 tlen, alen;
- register afs_int32 code;
+ afs_int32 code;
AFS_STATCNT(afs_MemHandleLink);
/* two different formats, one for links protected 644, have a "." at
}
int
-afs_UFSHandleLink(register struct vcache *avc, struct vrequest *areq)
+afs_UFSHandleLink(struct vcache *avc, struct vrequest *areq)
{
- register struct dcache *tdc;
- register char *tp, *rbuf;
+ struct dcache *tdc;
+ char *tp, *rbuf;
void *tfile;
afs_size_t offset, len;
afs_int32 tlen, alen;
- register afs_int32 code;
+ afs_int32 code;
/* two different formats, one for links protected 644, have a "." at the
* end of the file name, which we turn into a null. Others, protected
int
afs_readlink(OSI_VC_DECL(avc), struct uio *auio, afs_ucred_t *acred)
{
- register afs_int32 code;
+ afs_int32 code;
struct vrequest treq;
- register char *tp;
+ char *tp;
struct afs_fakestat_state fakestat;
OSI_VC_CONVERT(avc);
* avc->lock must be write-locked.
*/
int
-afs_StoreOnLastReference(register struct vcache *avc,
- register struct vrequest *treq)
+afs_StoreOnLastReference(struct vcache *avc,
+ struct vrequest *treq)
{
int code = 0;
}
int
-afs_MemWrite(register struct vcache *avc, struct uio *auio, int aio,
+afs_MemWrite(struct vcache *avc, struct uio *auio, int aio,
afs_ucred_t *acred, int noLock)
{
afs_size_t totalLength;
afs_int32 tlen, trimlen;
afs_int32 startDate;
afs_int32 max;
- register struct dcache *tdc;
+ struct dcache *tdc;
#ifdef _HIGHC_
volatile
#endif
struct uio *tuiop = &tuio;
struct iovec *tvec; /* again, should have define */
#endif
- register afs_int32 code;
+ afs_int32 code;
struct vrequest treq;
AFS_STATCNT(afs_MemWrite);
/* called on writes */
int
-afs_UFSWrite(register struct vcache *avc, struct uio *auio, int aio,
+afs_UFSWrite(struct vcache *avc, struct uio *auio, int aio,
afs_ucred_t *acred, int noLock)
{
afs_size_t totalLength;
afs_int32 trimlen;
afs_int32 startDate;
afs_int32 max;
- register struct dcache *tdc;
+ struct dcache *tdc;
#ifdef _HIGHC_
volatile
#endif
struct iovec *tvec; /* again, should have define */
#endif
struct osi_file *tfile;
- register afs_int32 code;
+ afs_int32 code;
struct vrequest treq;
AFS_STATCNT(afs_UFSWrite);
/* do partial write if we're low on unmodified chunks */
int
-afs_DoPartialWrite(register struct vcache *avc, struct vrequest *areq)
+afs_DoPartialWrite(struct vcache *avc, struct vrequest *areq)
{
- register afs_int32 code;
+ afs_int32 code;
if (afs_stats_cmperf.cacheCurrDirtyChunks <=
afs_stats_cmperf.cacheMaxDirtyChunks
afs_close(OSI_VC_DECL(avc), afs_int32 aflags, afs_ucred_t *acred)
#endif
{
- register afs_int32 code;
- register struct brequest *tb;
+ afs_int32 code;
+ struct brequest *tb;
struct vrequest treq;
#ifdef AFS_SGI65_ENV
struct flid flid;
afs_fsync(OSI_VC_DECL(avc), afs_ucred_t *acred)
#endif
{
- register afs_int32 code;
+ afs_int32 code;
struct vrequest treq;
OSI_VC_CONVERT(avc);
* if this is a temporary or permanent error.
*------------------------------------------------------------------------*/
int
-afs_Analyze(register struct afs_conn *aconn, afs_int32 acode,
- struct VenusFid *afid, register struct vrequest *areq, int op,
+afs_Analyze(struct afs_conn *aconn, afs_int32 acode,
+ struct VenusFid *afid, struct vrequest *areq, int op,
afs_int32 locktype, struct cell *cellp)
{
afs_int32 i;
struct axscache *
afs_SlowFindAxs(struct axscache **cachep, afs_int32 id)
{
- register struct axscache *i, *j;
+ struct axscache *i, *j;
j = (*cachep);
i = j->next;
/* Prototypes for static routines */
static struct buffer *afs_newslot(struct dcache *adc, afs_int32 apage,
- register struct buffer *lp);
+ struct buffer *lp);
static int dinit_flag = 0;
void
DInit(int abuffers)
{
/* Initialize the venus buffer system. */
- register int i;
- register struct buffer *tb;
+ int i;
+ struct buffer *tb;
AFS_STATCNT(DInit);
if (dinit_flag)
}
void *
-DRead(register struct dcache *adc, register int page)
+DRead(struct dcache *adc, int page)
{
/* Read a page from the disk. */
- register struct buffer *tb, *tb2;
+ struct buffer *tb, *tb2;
struct osi_file *tfile;
int code;
ReleaseWriteLock(&tb->lock);
return tb->data;
} else {
- register struct buffer **bufhead;
+ struct buffer **bufhead;
bufhead = &(phTable[pHash(adc->index, page)]);
while ((tb2 = tb->hashNext)) {
if (bufmatch(tb2)) {
}
static void
-FixupBucket(register struct buffer *ap)
+FixupBucket(struct buffer *ap)
{
- register struct buffer **lp, *tp;
- register int i;
+ struct buffer **lp, *tp;
+ int i;
/* first try to get it out of its current hash bucket, in which it
* might not be */
AFS_STATCNT(FixupBucket);
/* lp is pointer to a fairly-old buffer */
static struct buffer *
-afs_newslot(struct dcache *adc, afs_int32 apage, register struct buffer *lp)
+afs_newslot(struct dcache *adc, afs_int32 apage, struct buffer *lp)
{
/* Find a usable buffer slot */
- register afs_int32 i;
+ afs_int32 i;
afs_int32 lt = 0;
- register struct buffer *tp;
+ struct buffer *tp;
struct osi_file *tfile;
AFS_STATCNT(afs_newslot);
{
/* Release a buffer, specifying whether or not the buffer has been
* modified by the locker. */
- register struct buffer *bp = (struct buffer *)loc;
- register int index;
- register struct buffer *tp;
+ struct buffer *bp = (struct buffer *)loc;
+ int index;
+ struct buffer *tp;
AFS_STATCNT(DRelease);
if (!bp)
}
int
-DVOffset(register void *ap)
+DVOffset(void *ap)
{
/* Return the byte within a file represented by a buffer pointer. */
- register int index;
- register struct buffer *tp;
+ int index;
+ struct buffer *tp;
AFS_STATCNT(DVOffset);
/* look for buffer by scanning Unix buffers for appropriate address */
/* see comment in DRelease about the meaning of ap/bp */
void
DZap(struct dcache *adc)
{
- register int i;
+ int i;
/* Destroy all buffers pertaining to a particular fid. */
- register struct buffer *tb;
+ struct buffer *tb;
AFS_STATCNT(DZap);
ObtainReadLock(&afs_bufferLock);
DFlush(void)
{
/* Flush all the modified buffers. */
- register int i;
- register struct buffer *tb;
+ int i;
+ struct buffer *tb;
AFS_STATCNT(DFlush);
tb = Buffers;
}
void *
-DNew(register struct dcache *adc, register int page)
+DNew(struct dcache *adc, int page)
{
/* Same as read, only do *not* even try to read the page, since it probably doesn't exist. */
- register struct buffer *tb;
+ struct buffer *tb;
AFS_STATCNT(DNew);
ObtainWriteLock(&afs_bufferLock, 264);
if ((tb = afs_newslot(adc, page, NULL)) == 0) {
void
shutdown_bufferpackage(void)
{
- register struct buffer *tp;
+ struct buffer *tp;
int i;
AFS_STATCNT(shutdown_bufferpackage);
* times we go back and forth from caching to bypass.
*/
void
-afs_TransitionToBypass(register struct vcache *avc,
- register afs_ucred_t *acred, int aflags)
+afs_TransitionToBypass(struct vcache *avc,
+ afs_ucred_t *acred, int aflags)
{
afs_int32 code;
* the number of times we go back and forth from caching to bypass.
*/
void
-afs_TransitionToCaching(register struct vcache *avc,
- register afs_ucred_t *acred,
+afs_TransitionToCaching(struct vcache *avc,
+ afs_ucred_t *acred,
int aflags)
{
int resetDesire = 0;
/* no-cache prefetch routine */
static afs_int32
-afs_NoCacheFetchProc(register struct rx_call *acall,
- register struct vcache *avc,
- register uio_t *auio,
+afs_NoCacheFetchProc(struct rx_call *acall,
+ struct vcache *avc,
+ uio_t *auio,
afs_int32 release_pages,
afs_int32 size)
{
/* dispatch a no-cache read request */
afs_int32
-afs_ReadNoCache(register struct vcache *avc,
- register struct nocache_read_request *bparms,
+afs_ReadNoCache(struct vcache *avc,
+ struct nocache_read_request *bparms,
afs_ucred_t *acred)
{
afs_int32 code;
/* Cannot have static linkage--called from BPrefetch (afs_daemons) */
afs_int32
-afs_PrefetchNoCache(register struct vcache *avc,
- register afs_ucred_t *acred,
- register struct nocache_read_request *bparms)
+afs_PrefetchNoCache(struct vcache *avc,
+ afs_ucred_t *acred,
+ struct nocache_read_request *bparms)
{
uio_t *auio;
struct iovec *iovecp;
afs_int32 length_hi, bytes, locked;
#endif
- register struct afs_conn *tc;
+ struct afs_conn *tc;
afs_int32 i;
struct rx_call *tcall;
struct tlocal1 {
extern int cache_bypass_strategy;
extern int cache_bypass_threshold;
-void afs_TransitionToBypass(register struct vcache *, register afs_ucred_t *, int);
-void afs_TransitionToCaching(register struct vcache *, register afs_ucred_t *, int);
+void afs_TransitionToBypass(struct vcache *, afs_ucred_t *, int);
+void afs_TransitionToCaching(struct vcache *, afs_ucred_t *, int);
/* Cache strategy permits vnode transition between caching and no-cache--
* currently, this means LARGE_FILES_BYPASS_CACHE. Currently, no pioctl permits
/* dispatch a no-cache read request */
afs_int32
-afs_ReadNoCache(register struct vcache *avc, register struct nocache_read_request *bparms,
+afs_ReadNoCache(struct vcache *avc, struct nocache_read_request *bparms,
afs_ucred_t *acred);
/* no-cache prefetch routine */
afs_int32
-afs_PrefetchNoCache(register struct vcache *avc, register afs_ucred_t *acred,
+afs_PrefetchNoCache(struct vcache *avc, afs_ucred_t *acred,
struct nocache_read_request *bparms);
int
afs_CheckInit(void)
{
- register int code = 0;
+ int code = 0;
AFS_STATCNT(afs_CheckInit);
if (afs_initState <= 100)
struct AFSDBCacheEntry *a_result)
{
- register int i; /*Loop variable */
- register struct vcache *tvc; /*Ptr to current cache entry */
+ int i; /*Loop variable */
+ struct vcache *tvc; /*Ptr to current cache entry */
int code; /*Return code */
XSTATS_DECLS;
SRXAFSCB_GetCE64(struct rx_call *a_call, afs_int32 a_index,
struct AFSDBCacheEntry64 *a_result)
{
- register int i; /*Loop variable */
- register struct vcache *tvc; /*Ptr to current cache entry */
+ int i; /*Loop variable */
+ struct vcache *tvc; /*Ptr to current cache entry */
int code; /*Return code */
XSTATS_DECLS;
*------------------------------------------------------------------------*/
static int
-ClearCallBack(register struct rx_connection *a_conn,
- register struct AFSFid *a_fid)
+ClearCallBack(struct rx_connection *a_conn,
+ struct AFSFid *a_fid)
{
- register struct vcache *tvc;
- register int i;
+ struct vcache *tvc;
+ int i;
struct VenusFid localFid;
struct volume *tv;
#ifdef AFS_DARWIN80_ENV
*------------------------------------------------------------------------*/
int
-SRXAFSCB_CallBack(struct rx_call *a_call, register struct AFSCBFids *a_fids,
+SRXAFSCB_CallBack(struct rx_call *a_call, struct AFSCBFids *a_fids,
struct AFSCBs *a_callbacks)
{
- register int i; /*Loop variable */
+ int i; /*Loop variable */
struct AFSFid *tfid; /*Ptr to current fid */
- register struct rx_connection *tconn; /*Call's connection */
+ struct rx_connection *tconn; /*Call's connection */
int code = 0;
XSTATS_DECLS;
int
SRXAFSCB_InitCallBackState(struct rx_call *a_call)
{
- register int i;
- register struct vcache *tvc;
- register struct rx_connection *tconn;
- register struct rx_peer *peer;
+ int i;
+ struct vcache *tvc;
+ struct rx_connection *tconn;
+ struct rx_peer *peer;
struct server *ts;
int code = 0;
XSTATS_DECLS;
/* find any volumes residing on this server and flush their state */
{
- register struct volume *tv;
- register int j;
+ struct volume *tv;
+ int j;
for (i = 0; i < NVOLS; i++)
for (tv = afs_volumes[i]; tv; tv = tv->next) {
afs_int32 a_collectionNumber, afs_int32 * a_srvVersionNumP,
afs_int32 * a_timeP, AFSCB_CollData * a_dataP)
{
- register int code; /*Return value */
+ int code; /*Return value */
afs_int32 *dataBuffP; /*Ptr to data to be returned */
afs_int32 dataBytes; /*Bytes in data buffer */
XSTATS_DECLS;
{ /*SRXAFSCB_GetDE*/
int code = 0; /*Return code*/
#if 0 && defined(AFS_LINUX24_ENV)
- register int i; /*Loop variable*/
- register struct vcache *tvc = afs_globalVp;
+ int i; /*Loop variable*/
+ struct vcache *tvc = afs_globalVp;
struct dentry *dentry;
struct list_head *cur, *head = &(AFSTOI(tvc))->i_dentry;
afs_CheckCallbacks(unsigned int secs)
{
struct vcache *tvc;
- register struct afs_q *tq;
+ struct afs_q *tq;
struct afs_q *uq;
afs_uint32 now;
struct volume *tvp;
- register int safety;
+ int safety;
ObtainWriteLock(&afs_xcbhash, 85); /* pretty likely I'm going to remove something */
now = osi_Time();
void
afs_FlushCBs(void)
{
- register int i;
- register struct vcache *tvc;
+ int i;
+ struct vcache *tvc;
ObtainWriteLock(&afs_xcbhash, 86); /* pretty likely I'm going to remove something */
void
afs_FlushServerCBs(struct server *srvp)
{
- register int i;
- register struct vcache *tvc;
+ int i;
+ struct vcache *tvc;
ObtainWriteLock(&afs_xcbhash, 86); /* pretty likely I'm going to remove something */
void
afs_InitCBQueue(int doLockInit)
{
- register int i;
+ int i;
memset(cbHashT, 0, CBHTSIZE * sizeof(struct bucket));
for (i = 0; i < CBHTSIZE; i++) {
int (*fwrite) (struct osi_file * fp, afs_int32 offset, void *buf,
afs_int32 len);
int (*close) (struct osi_file * fp);
- int (*vread) (register struct vcache * avc, struct uio * auio,
+ int (*vread) (struct vcache * avc, struct uio * auio,
afs_ucred_t * acred, daddr_t albn, struct buf ** abpp,
int noLock);
- int (*vwrite) (register struct vcache * avc, struct uio * auio, int aio,
+ int (*vwrite) (struct vcache * avc, struct uio * auio, int aio,
afs_ucred_t * acred, int noLock);
- struct dcache *(*GetDSlot) (register afs_int32 aslot,
- register struct dcache * tmpdc);
+ struct dcache *(*GetDSlot) (afs_int32 aslot,
+ struct dcache * tmpdc);
struct volume *(*GetVolSlot) (void);
- int (*HandleLink) (register struct vcache * avc, struct vrequest * areq);
+ int (*HandleLink) (struct vcache * avc, struct vrequest * areq);
};
/* Ideally we should have used consistent naming - like COP_OPEN, COP_TRUNCATE, etc. */
* @return The conn struct, or NULL.
*/
struct afs_conn *
-afs_Conn(register struct VenusFid *afid, register struct vrequest *areq,
+afs_Conn(struct VenusFid *afid, struct vrequest *areq,
afs_int32 locktype)
{
u_short fsport = AFS_FSPORT;
*/
struct afs_conn *
afs_ConnByMHosts(struct server *ahosts[], unsigned short aport,
- afs_int32 acell, register struct vrequest *areq,
+ afs_int32 acell, struct vrequest *areq,
afs_int32 locktype)
{
- register afs_int32 i;
- register struct afs_conn *tconn;
- register struct server *ts;
+ afs_int32 i;
+ struct afs_conn *tconn;
+ struct server *ts;
/* try to find any connection from the set */
AFS_STATCNT(afs_ConnByMHosts);
* @param locktype
*/
void
-afs_PutConn(register struct afs_conn *ac, afs_int32 locktype)
+afs_PutConn(struct afs_conn *ac, afs_int32 locktype)
{
AFS_STATCNT(afs_PutConn);
ac->refCount--;
/* ptr_parm 0 is the pathname, size_parm 0 to the fetch is the chunk number */
static void
-BPath(register struct brequest *ab)
+BPath(struct brequest *ab)
{
- register struct dcache *tdc = NULL;
+ struct dcache *tdc = NULL;
struct vcache *tvc = NULL;
struct vnode *tvn = NULL;
#ifdef AFS_LINUX22_ENV
* size_parm 1 is true iff we should release the dcache entry here.
*/
static void
-BPrefetch(register struct brequest *ab)
+BPrefetch(struct brequest *ab)
{
- register struct dcache *tdc;
- register struct vcache *tvc;
+ struct dcache *tdc;
+ struct vcache *tvc;
afs_size_t offset, len, abyte, totallen = 0;
struct vrequest treq;
#if defined(AFS_CACHE_BYPASS)
static void
-BPrefetchNoCache(register struct brequest *ab)
+BPrefetchNoCache(struct brequest *ab)
{
struct vrequest treq;
afs_size_t len;
#endif
static void
-BStore(register struct brequest *ab)
+BStore(struct brequest *ab)
{
- register struct vcache *tvc;
- register afs_int32 code;
+ struct vcache *tvc;
+ afs_int32 code;
struct vrequest treq;
#if defined(AFS_SGI_ENV)
struct cred *tmpcred;
/* release a held request buffer */
void
-afs_BRelease(register struct brequest *ab)
+afs_BRelease(struct brequest *ab)
{
AFS_STATCNT(afs_BRelease);
}
struct brequest *
-afs_BQueue(register short aopcode, register struct vcache *avc,
+afs_BQueue(short aopcode, struct vcache *avc,
afs_int32 dontwait, afs_int32 ause, afs_ucred_t *acred,
afs_size_t asparm0, afs_size_t asparm1, void *apparm0,
void *apparm1, void *apparm2)
{
- register int i;
- register struct brequest *tb;
+ int i;
+ struct brequest *tb;
AFS_STATCNT(afs_BQueue);
ObtainWriteLock(&afs_xbrs, 296);
*/
void
-afs_StoreWarn(register afs_int32 acode, afs_int32 avolume,
- register afs_int32 aflags)
+afs_StoreWarn(afs_int32 acode, afs_int32 avolume,
+ afs_int32 aflags)
{
static char problem_fmt[] =
"afs: failed to store file in volume %d (%s)\n";
*/
void
-afs_AdjustSize(register struct dcache *adc, register afs_int32 newSize)
+afs_AdjustSize(struct dcache *adc, afs_int32 newSize)
{
- register afs_int32 oldSize;
+ afs_int32 oldSize;
AFS_STATCNT(afs_AdjustSize);
afs_int32 i, j;
afs_hyper_t vtime;
int skip, phase;
- register struct vcache *tvc;
+ struct vcache *tvc;
afs_uint32 victims[MAXATONCE];
struct dcache *victimDCs[MAXATONCE];
afs_hyper_t victimTimes[MAXATONCE]; /* youngest (largest LRU time) first */
* (in write mode).
*/
void
-afs_FlushDCache(register struct dcache *adc)
+afs_FlushDCache(struct dcache *adc)
{
AFS_STATCNT(afs_FlushDCache);
/*
* \note Environment: called with afs_xdcache lock write-locked.
*/
static void
-afs_FreeDCache(register struct dcache *adc)
+afs_FreeDCache(struct dcache *adc)
{
/* Thread on free list, update free list count and mark entry as
* freed in its indexFlags element. Also, ensure DCache entry gets
*/
static void
-afs_DiscardDCache(register struct dcache *adc)
+afs_DiscardDCache(struct dcache *adc)
{
- register afs_int32 size;
+ afs_int32 size;
AFS_STATCNT(afs_DiscardDCache);
static void
afs_FreeDiscardedDCache(void)
{
- register struct dcache *tdc;
- register struct osi_file *tfile;
- register afs_int32 size;
+ struct dcache *tdc;
+ struct osi_file *tfile;
+ afs_int32 size;
AFS_STATCNT(afs_FreeDiscardedDCache);
* Nothing interesting.
*/
int
-afs_PutDCache(register struct dcache *adc)
+afs_PutDCache(struct dcache *adc)
{
AFS_STATCNT(afs_PutDCache);
ObtainWriteLock(&adc->tlock, 276);
* Both pvnLock and lock are write held.
*/
void
-afs_TryToSmush(register struct vcache *avc, afs_ucred_t *acred, int sync)
+afs_TryToSmush(struct vcache *avc, afs_ucred_t *acred, int sync)
{
- register struct dcache *tdc;
- register int index;
- register int i;
+ struct dcache *tdc;
+ int index;
+ int i;
AFS_STATCNT(afs_TryToSmush);
afs_Trace2(afs_iclSetp, CM_TRACE_TRYTOSMUSH, ICL_TYPE_POINTER, avc,
ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(avc->f.m.Length));
*/
struct dcache *
-afs_FindDCache(register struct vcache *avc, afs_size_t abyte)
+afs_FindDCache(struct vcache *avc, afs_size_t abyte)
{
afs_int32 chunk;
- register afs_int32 i, index;
- register struct dcache *tdc = NULL;
+ afs_int32 i, index;
+ struct dcache *tdc = NULL;
AFS_STATCNT(afs_FindDCache);
chunk = AFS_CHUNK(abyte);
/* avc - Write-locked unless aflags & 1 */
struct dcache *
-afs_GetDCache(register struct vcache *avc, afs_size_t abyte,
- register struct vrequest *areq, afs_size_t * aoffset,
+afs_GetDCache(struct vcache *avc, afs_size_t abyte,
+ struct vrequest *areq, afs_size_t * aoffset,
afs_size_t * alen, int aflags)
{
- register afs_int32 i, code, shortcut;
+ afs_int32 i, code, shortcut;
#if defined(AFS_AIX32_ENV) || defined(AFS_SGI_ENV)
- register afs_int32 adjustsize = 0;
+ afs_int32 adjustsize = 0;
#endif
int setLocks;
afs_int32 index;
afs_size_t Position = 0;
afs_int32 size, tlen; /* size of segment to transfer */
struct afs_FetchOutput *tsmall = 0;
- register struct dcache *tdc;
- register struct osi_file *file;
- register struct afs_conn *tc;
+ struct dcache *tdc;
+ struct osi_file *file;
+ struct afs_conn *tc;
int downDCount = 0;
struct server *newCallback = NULL;
char setNewCallback;
void
afs_WriteThroughDSlots(void)
{
- register struct dcache *tdc;
- register afs_int32 i, touchedit = 0;
+ struct dcache *tdc;
+ afs_int32 i, touchedit = 0;
struct afs_q DirtyQ, *tq;
*/
struct dcache *
-afs_MemGetDSlot(register afs_int32 aslot, register struct dcache *tmpdc)
+afs_MemGetDSlot(afs_int32 aslot, struct dcache *tmpdc)
{
- register struct dcache *tdc;
+ struct dcache *tdc;
int existing = 0;
AFS_STATCNT(afs_MemGetDSlot);
* afs_xdcache lock write-locked.
*/
struct dcache *
-afs_UFSGetDSlot(register afs_int32 aslot, register struct dcache *tmpdc)
+afs_UFSGetDSlot(afs_int32 aslot, struct dcache *tmpdc)
{
- register afs_int32 code;
- register struct dcache *tdc;
+ afs_int32 code;
+ struct dcache *tdc;
int existing = 0;
int entryok;
*/
int
-afs_WriteDCache(register struct dcache *adc, int atime)
+afs_WriteDCache(struct dcache *adc, int atime)
{
- register afs_int32 code;
+ afs_int32 code;
if (cacheDiskType == AFS_FCACHE_TYPE_MEM)
return 0;
* Nothing interesting.
*/
int
-afs_wakeup(register struct vcache *avc)
+afs_wakeup(struct vcache *avc)
{
- register int i;
- register struct brequest *tb;
+ int i;
+ struct brequest *tb;
tb = afs_brs;
AFS_STATCNT(afs_wakeup);
for (i = 0; i < NBRS; i++, tb++) {
int
afs_InitCacheFile(char *afile, ino_t ainode)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 index;
int fileIsBad;
struct osi_file *tfile;
struct osi_stat tstat;
- register struct dcache *tdc;
+ struct dcache *tdc;
AFS_STATCNT(afs_InitCacheFile);
index = afs_stats_cmperf.cacheNumEntries;
void
afs_dcacheInit(int afiles, int ablocks, int aDentries, int achunk, int aflags)
{
- register struct dcache *tdp;
+ struct dcache *tdp;
int i;
int code;
}
void
-afs_CopyError(register struct vrequest *afrom, register struct vrequest *ato)
+afs_CopyError(struct vrequest *afrom, struct vrequest *ato)
{
int i = 0;
AFS_STATCNT(afs_CopyError);
}
void
-afs_FinalizeReq(register struct vrequest *areq)
+afs_FinalizeReq(struct vrequest *areq)
{
int i = 0;
AFS_STATCNT(afs_FinalizeReq);
#undef kmem_free
#undef mem_alloc
#undef mem_free
-#undef register
#endif /* AFS_ALPHA_ENV */
#include "afsincludes.h" /* Afs-based standard headers */
#include "afs/afs_stats.h" /* statistics */
#endif
{
afs_int32 *lp, elts, flags;
- register afs_int32 code;
+ afs_int32 code;
struct afs_icl_log *logp;
struct afs_icl_set *setp;
#if defined(AFS_SGI61_ENV) || defined(AFS_SUN57_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
/* exported routine: a 4 parameter event */
int
-afs_icl_Event4(register struct afs_icl_set *setp, afs_int32 eventID,
+afs_icl_Event4(struct afs_icl_set *setp, afs_int32 eventID,
afs_int32 lAndT, long p1, long p2, long p3, long p4)
{
afs_int32 mask;
- register int i;
- register afs_int32 tmask;
+ int i;
+ afs_int32 tmask;
int ix;
/* If things aren't init'ed yet (or the set is inactive), don't panic */
* Otherwise, could call afs_icl_Event4 directly.
*/
int
-afs_icl_Event3(register struct afs_icl_set *setp, afs_int32 eventID,
+afs_icl_Event3(struct afs_icl_set *setp, afs_int32 eventID,
afs_int32 lAndT, long p1, long p2, long p3)
{
return afs_icl_Event4(setp, eventID, lAndT, p1, p2, p3, (long)0);
}
int
-afs_icl_Event2(register struct afs_icl_set *setp, afs_int32 eventID,
+afs_icl_Event2(struct afs_icl_set *setp, afs_int32 eventID,
afs_int32 lAndT, long p1, long p2)
{
return afs_icl_Event4(setp, eventID, lAndT, p1, p2, (long)0, (long)0);
}
int
-afs_icl_Event1(register struct afs_icl_set *setp, afs_int32 eventID,
+afs_icl_Event1(struct afs_icl_set *setp, afs_int32 eventID,
afs_int32 lAndT, long p1)
{
return afs_icl_Event4(setp, eventID, lAndT, p1, (long)0, (long)0,
}
int
-afs_icl_Event0(register struct afs_icl_set *setp, afs_int32 eventID,
+afs_icl_Event0(struct afs_icl_set *setp, afs_int32 eventID,
afs_int32 lAndT)
{
return afs_icl_Event4(setp, eventID, lAndT, (long)0, (long)0, (long)0,
* Log must be write-locked.
*/
static void
-afs_icl_GetLogSpace(register struct afs_icl_log *logp, afs_int32 minSpace)
+afs_icl_GetLogSpace(struct afs_icl_log *logp, afs_int32 minSpace)
{
- register unsigned int tsize;
+ unsigned int tsize;
while (logp->logSize - logp->logElements <= minSpace) {
/* eat a record */
{
char *op; /* ptr to char to write */
int tc;
- register int bib; /* bytes in buffer */
+ int bib; /* bytes in buffer */
bib = 0;
op = (char *)&(logp->datap[logp->firstFree]);
*/
void
-afs_icl_AppendRecord(register struct afs_icl_log *logp, afs_int32 op,
+afs_icl_AppendRecord(struct afs_icl_log *logp, afs_int32 op,
afs_int32 types, long p1, long p2, long p3, long p4)
{
int rsize; /* record size in longs */
- register int tsize; /* temp size */
+ int tsize; /* temp size */
osi_timeval_t tv;
int t1, t2, t3, t4;
afs_icl_CreateLogWithFlags(char *name, afs_int32 logSize, afs_uint32 flags,
struct afs_icl_log **outLogpp)
{
- register struct afs_icl_log *logp;
+ struct afs_icl_log *logp;
/* add into global list under lock */
ObtainWriteLock(&afs_icl_lock, 183);
* find the record with cookie value cookie.
*/
int
-afs_icl_CopyOut(register struct afs_icl_log *logp, afs_int32 * bufferp,
+afs_icl_CopyOut(struct afs_icl_log *logp, afs_int32 * bufferp,
afs_int32 * bufSizep, afs_uint32 * cookiep,
afs_int32 * flagsp)
{
/* hold and release logs */
int
-afs_icl_LogHold(register struct afs_icl_log *logp)
+afs_icl_LogHold(struct afs_icl_log *logp)
{
ObtainWriteLock(&afs_icl_lock, 187);
logp->refCount++;
/* hold and release logs, called with lock already held */
int
-afs_icl_LogHoldNL(register struct afs_icl_log *logp)
+afs_icl_LogHoldNL(struct afs_icl_log *logp)
{
logp->refCount++;
return 0;
/* keep track of how many sets believe the log itself is allocated */
int
-afs_icl_LogUse(register struct afs_icl_log *logp)
+afs_icl_LogUse(struct afs_icl_log *logp)
{
ObtainWriteLock(&logp->lock, 188);
if (logp->setCount == 0) {
/* decrement the number of real users of the log, free if possible */
int
-afs_icl_LogFreeUse(register struct afs_icl_log *logp)
+afs_icl_LogFreeUse(struct afs_icl_log *logp)
{
ObtainWriteLock(&logp->lock, 189);
if (--logp->setCount == 0) {
/* set the size of the log to 'logSize' */
int
-afs_icl_LogSetSize(register struct afs_icl_log *logp, afs_int32 logSize)
+afs_icl_LogSetSize(struct afs_icl_log *logp, afs_int32 logSize)
{
ObtainWriteLock(&logp->lock, 190);
if (!logp->datap) {
/* free a log. Called with afs_icl_lock locked. */
int
-afs_icl_ZapLog(register struct afs_icl_log *logp)
+afs_icl_ZapLog(struct afs_icl_log *logp)
{
- register struct afs_icl_log **lpp, *tp;
+ struct afs_icl_log **lpp, *tp;
for (lpp = &afs_icl_allLogs, tp = *lpp; tp; lpp = &tp->nextp, tp = *lpp) {
if (tp == logp) {
/* do the release, watching for deleted entries */
int
-afs_icl_LogRele(register struct afs_icl_log *logp)
+afs_icl_LogRele(struct afs_icl_log *logp)
{
ObtainWriteLock(&afs_icl_lock, 191);
if (--logp->refCount == 0 && (logp->states & ICL_LOGF_DELETED)) {
/* do the release, watching for deleted entries, log already held */
int
-afs_icl_LogReleNL(register struct afs_icl_log *logp)
+afs_icl_LogReleNL(struct afs_icl_log *logp)
{
if (--logp->refCount == 0 && (logp->states & ICL_LOGF_DELETED)) {
afs_icl_ZapLog(logp); /* destroys logp's lock! */
/* zero out the log */
int
-afs_icl_ZeroLog(register struct afs_icl_log *logp)
+afs_icl_ZeroLog(struct afs_icl_log *logp)
{
ObtainWriteLock(&logp->lock, 192);
logp->firstUsed = logp->firstFree = 0;
/* free a log entry, and drop its reference count */
int
-afs_icl_LogFree(register struct afs_icl_log *logp)
+afs_icl_LogFree(struct afs_icl_log *logp)
{
ObtainWriteLock(&logp->lock, 193);
logp->states |= ICL_LOGF_DELETED;
struct afs_icl_log *
afs_icl_FindLog(char *name)
{
- register struct afs_icl_log *tp;
+ struct afs_icl_log *tp;
ObtainWriteLock(&afs_icl_lock, 194);
for (tp = afs_icl_allLogs; tp; tp = tp->nextp) {
if (strcmp(tp->name, name) == 0) {
(char *name, char *arock, struct afs_icl_log * tp),
char *arock)
{
- register struct afs_icl_log *tp;
- register afs_int32 code;
+ struct afs_icl_log *tp;
+ afs_int32 code;
code = 0;
ObtainWriteLock(&afs_icl_lock, 195);
struct afs_icl_log *fatalLogp, afs_uint32 flags,
struct afs_icl_set **outSetpp)
{
- register struct afs_icl_set *setp;
- register int i;
+ struct afs_icl_set *setp;
+ int i;
afs_int32 states = ICL_DEFAULT_SET_STATES;
ObtainWriteLock(&afs_icl_lock, 197);
/* hold and release event sets */
int
-afs_icl_SetHold(register struct afs_icl_set *setp)
+afs_icl_SetHold(struct afs_icl_set *setp)
{
ObtainWriteLock(&afs_icl_lock, 201);
setp->refCount++;
/* free a set. Called with afs_icl_lock locked */
int
-afs_icl_ZapSet(register struct afs_icl_set *setp)
+afs_icl_ZapSet(struct afs_icl_set *setp)
{
- register struct afs_icl_set **lpp, *tp;
+ struct afs_icl_set **lpp, *tp;
int i;
- register struct afs_icl_log *tlp;
+ struct afs_icl_log *tlp;
for (lpp = &afs_icl_allSets, tp = *lpp; tp; lpp = &tp->nextp, tp = *lpp) {
if (tp == setp) {
/* do the release, watching for deleted entries */
int
-afs_icl_SetRele(register struct afs_icl_set *setp)
+afs_icl_SetRele(struct afs_icl_set *setp)
{
ObtainWriteLock(&afs_icl_lock, 202);
if (--setp->refCount == 0 && (setp->states & ICL_SETF_DELETED)) {
/* free a set entry, dropping its reference count */
int
-afs_icl_SetFree(register struct afs_icl_set *setp)
+afs_icl_SetFree(struct afs_icl_set *setp)
{
ObtainWriteLock(&setp->lock, 203);
setp->states |= ICL_SETF_DELETED;
struct afs_icl_set *
afs_icl_FindSet(char *name)
{
- register struct afs_icl_set *tp;
+ struct afs_icl_set *tp;
ObtainWriteLock(&afs_icl_lock, 204);
for (tp = afs_icl_allSets; tp; tp = tp->nextp) {
if (strcmp(tp->name, name) == 0) {
int
afs_icl_ZeroSet(struct afs_icl_set *setp)
{
- register int i;
+ int i;
int code = 0;
int tcode;
struct afs_icl_log *logp;
(char *name, char *arock, struct afs_icl_log * tp),
char *arock)
{
- register struct afs_icl_set *tp, *np;
- register afs_int32 code;
+ struct afs_icl_set *tp, *np;
+ afs_int32 code;
code = 0;
ObtainWriteLock(&afs_icl_lock, 205);
int
afs_icl_AddLogToSet(struct afs_icl_set *setp, struct afs_icl_log *newlogp)
{
- register int i;
+ int i;
int code = -1;
ObtainWriteLock(&setp->lock, 207);
afs_int32 aflags, afs_int32 ninodes, afs_int32 nusers,
afs_int32 dynamic_vcaches)
{
- register afs_int32 i;
- register struct volume *tv;
+ afs_int32 i;
+ struct volume *tv;
AFS_STATCNT(afs_CacheInit);
/*
void
afs_ComputeCacheParms(void)
{
- register afs_int32 i;
+ afs_int32 i;
afs_int32 afs_maxCacheDirty;
/*
*
*/
int
-afs_InitCacheInfo(register char *afile)
+afs_InitCacheInfo(char *afile)
{
- register afs_int32 code;
+ afs_int32 code;
struct osi_stat tstat;
- register struct osi_file *tfile;
+ struct osi_file *tfile;
struct afs_fheader theader;
#ifndef AFS_LINUX22_ENV
struct vnode *filevp;
int
afs_ResourceInit(int preallocs)
{
- register afs_int32 i;
+ afs_int32 i;
static struct rx_securityClass *secobj;
AFS_STATCNT(afs_ResourceInit);
void Lock_ReleaseW(struct afs_lock *lock);
void
-Lock_Init(register struct afs_lock *lock)
+Lock_Init(struct afs_lock *lock)
{
AFS_STATCNT(Lock_Init);
}
\f
void
-ObtainLock(register struct afs_lock *lock, int how,
+ObtainLock(struct afs_lock *lock, int how,
unsigned int src_indicator)
{
switch (how) {
}
void
-ReleaseLock(register struct afs_lock *lock, int how)
+ReleaseLock(struct afs_lock *lock, int how)
{
if (how == READ_LOCK) {
if (!--lock->readers_reading && lock->wait_states) {
}
void
-Afs_Lock_Obtain(register struct afs_lock *lock, int how)
+Afs_Lock_Obtain(struct afs_lock *lock, int how)
{
osi_timeval_t tt1, tt2, et;
afs_uint32 us;
/* release a lock, giving preference to new readers */
void
-Afs_Lock_ReleaseR(register struct afs_lock *lock)
+Afs_Lock_ReleaseR(struct afs_lock *lock)
{
AFS_STATCNT(Lock_ReleaseR);
AFS_ASSERT_GLOCK();
/* release a lock, giving preference to new writers */
void
-Afs_Lock_ReleaseW(register struct afs_lock *lock)
+Afs_Lock_ReleaseW(struct afs_lock *lock)
{
AFS_STATCNT(Lock_ReleaseW);
AFS_ASSERT_GLOCK();
/*
Wait for some change in the lock status.
-void Lock_Wait(register struct afs_lock *lock)
+void Lock_Wait(struct afs_lock *lock)
{
AFS_STATCNT(Lock_Wait);
if (lock->readers_reading || lock->excl_locked) return 1;
/* release a write lock and sleep on an address, atomically */
void
-afs_osi_SleepR(register char *addr, register struct afs_lock *alock)
+afs_osi_SleepR(char *addr, struct afs_lock *alock)
{
AFS_STATCNT(osi_SleepR);
ReleaseReadLock(alock);
/* release a write lock and sleep on an address, atomically */
void
-afs_osi_SleepW(register char *addr, register struct afs_lock *alock)
+afs_osi_SleepW(char *addr, struct afs_lock *alock)
{
AFS_STATCNT(osi_SleepW);
ReleaseWriteLock(alock);
/* release a write lock and sleep on an address, atomically */
void
-afs_osi_SleepS(register char *addr, register struct afs_lock *alock)
+afs_osi_SleepS(char *addr, struct afs_lock *alock)
{
AFS_STATCNT(osi_SleepS);
ReleaseSharedLock(alock);
afs_int32 afs_marinerHost = 0;
int
-afs_AddMarinerName(register char *aname, register struct vcache *avc)
+afs_AddMarinerName(char *aname, struct vcache *avc)
{
- register int i;
- register char *tp;
+ int i;
+ char *tp;
AFS_STATCNT(afs_AddMarinerName);
i = marinerPtr++;
}
char *
-afs_GetMariner(register struct vcache *avc)
+afs_GetMariner(struct vcache *avc)
{
- register int i;
+ int i;
AFS_STATCNT(afs_GetMariner);
for (i = 0; i < NMAR; i++) {
if (marinerVCs[i] == avc) {
}
void
-afs_MarinerLogFetch(register struct vcache *avc, register afs_int32 off,
- register afs_int32 bytes, register afs_int32 idx)
+afs_MarinerLogFetch(struct vcache *avc, afs_int32 off,
+ afs_int32 bytes, afs_int32 idx)
{
afs_MarinerLog("fetch$Fetching", avc);
} /*afs_MarinerLogFetch */
void
-afs_MarinerLog(register char *astring, register struct vcache *avc)
+afs_MarinerLog(char *astring, struct vcache *avc)
{
struct sockaddr_in taddr;
- register char *tp, *tp1, *buf;
+ char *tp, *tp1, *buf;
struct iovec dvec;
AFS_STATCNT(afs_MarinerLog);
* this routine simulates a read in the Memory Cache
*/
int
-afs_MemReadBlk(register struct osi_file *fP, int offset, void *dest,
+afs_MemReadBlk(struct osi_file *fP, int offset, void *dest,
int size)
{
- register struct memCacheEntry *mceP = (struct memCacheEntry *)fP;
+ struct memCacheEntry *mceP = (struct memCacheEntry *)fP;
int bytesRead;
ObtainReadLock(&mceP->afs_memLock);
* this routine simulates a readv in the Memory Cache
*/
int
-afs_MemReadvBlk(register struct memCacheEntry *mceP, int offset,
+afs_MemReadvBlk(struct memCacheEntry *mceP, int offset,
struct iovec *iov, int nio, int size)
{
int i;
int
afs_MemReadUIO(afs_dcache_id_t *ainode, struct uio *uioP)
{
- register struct memCacheEntry *mceP =
+ struct memCacheEntry *mceP =
(struct memCacheEntry *)afs_MemCacheOpen(ainode);
int length = mceP->size - AFS_UIO_OFFSET(uioP);
afs_int32 code;
}
int
-afs_MemWriteBlk(register struct osi_file *fP, int offset, void *src,
+afs_MemWriteBlk(struct osi_file *fP, int offset, void *src,
int size)
{
- register struct memCacheEntry *mceP = (struct memCacheEntry *)fP;
+ struct memCacheEntry *mceP = (struct memCacheEntry *)fP;
struct iovec tiov;
tiov.iov_base = src;
/*XXX: this extends a block arbitrarily to support big directories */
int
-afs_MemWritevBlk(register struct memCacheEntry *mceP, int offset,
+afs_MemWritevBlk(struct memCacheEntry *mceP, int offset,
struct iovec *iov, int nio, int size)
{
int i;
int
afs_MemWriteUIO(afs_dcache_id_t *ainode, struct uio *uioP)
{
- register struct memCacheEntry *mceP =
+ struct memCacheEntry *mceP =
(struct memCacheEntry *)afs_MemCacheOpen(ainode);
afs_int32 code;
}
int
-afs_MemCacheTruncate(register struct osi_file *fP, int size)
+afs_MemCacheTruncate(struct osi_file *fP, int size)
{
- register struct memCacheEntry *mceP = (struct memCacheEntry *)fP;
+ struct memCacheEntry *mceP = (struct memCacheEntry *)fP;
AFS_STATCNT(afs_MemCacheTruncate);
ObtainWriteLock(&mceP->afs_memLock, 313);
void
shutdown_memcache(void)
{
- register int index;
+ int index;
if (cacheDiskType != AFS_FCACHE_TYPE_MEM)
return;
/* Creates an nfsclientpag structure for the (uid, host) pair if one doesn't
* exist. RefCount is incremented and it's time stamped. */
static struct nfsclientpag *
-afs_GetNfsClientPag(register afs_int32 uid, register afs_uint32 host)
+afs_GetNfsClientPag(afs_int32 uid, afs_uint32 host)
{
- register struct nfsclientpag *np;
- register afs_int32 i, now;
+ struct nfsclientpag *np;
+ afs_int32 i, now;
#if defined(AFS_SGIMP_ENV)
osi_Assert(ISAFS_GLOCK());
It's also called whenever a unixuser structure belonging to the remote user associated with the nfsclientpag structure, np, is garbage collected. */
void
afs_PutNfsClientPag(np)
- register struct nfsclientpag *np;
+ struct nfsclientpag *np;
{
#if defined(AFS_SGIMP_ENV)
osi_Assert(ISAFS_GLOCK());
static struct nfsclientpag *
afs_FindNfsClientPag(afs_int32 uid, afs_uint32 host, afs_int32 pag)
{
- register struct nfsclientpag *np;
- register afs_int32 i;
+ struct nfsclientpag *np;
+ afs_int32 i;
#if defined(AFS_SGIMP_ENV)
osi_Assert(ISAFS_GLOCK());
afs_uint32 host, afs_int32 *pagparam,
struct afs_exporter **outexporter)
{
- register struct nfsclientpag *np, *tnp;
+ struct nfsclientpag *np, *tnp;
extern struct unixuser *afs_FindUser(), *afs_GetUser();
- register struct unixuser *au = 0;
+ struct unixuser *au = 0;
afs_int32 uid, pag, code = 0;
AFS_ASSERT_GLOCK();
/* It's called whenever a new unixuser structure is created for the remote
* user associated with the nfsclientpag structure, np */
void
-afs_nfsclient_hold(register struct nfsclientpag *np)
+afs_nfsclient_hold(struct nfsclientpag *np)
{
#if defined(AFS_SGIMP_ENV)
osi_Assert(ISAFS_GLOCK());
/* check if this exporter corresponds to the specified host */
int
-afs_nfsclient_checkhost(register struct nfsclientpag *np, afs_uint32 host)
+afs_nfsclient_checkhost(struct nfsclientpag *np, afs_uint32 host)
{
if (np->type != EXP_NFS)
return 0;
/* get the host for this exporter, or 0 if there is an error */
afs_uint32
-afs_nfsclient_gethost(register struct nfsclientpag *np)
+afs_nfsclient_gethost(struct nfsclientpag *np)
{
if (np->type != EXP_NFS)
return 0;
* user (inname contains the new sysname). In all cases, outname returns
* the current sysname value for this remote user */
int
-afs_nfsclient_sysname(register struct nfsclientpag *np, char *inname,
+afs_nfsclient_sysname(struct nfsclientpag *np, char *inname,
char ***outname, int *num, int allpags)
{
- register struct nfsclientpag *tnp;
- register afs_int32 i;
+ struct nfsclientpag *tnp;
+ afs_int32 i;
char *cp;
int count, t;
#if defined(AFS_SGIMP_ENV)
* "unixuser" structures associated with them (i.e. unixusercnt == 0) and
* they haven't had any activity the last NFSCLIENTGC seconds */
void
-afs_nfsclient_GC(register struct afs_exporter *exporter,
- register afs_int32 pag)
+afs_nfsclient_GC(struct afs_exporter *exporter,
+ afs_int32 pag)
{
- register struct nfsclientpag *np, **tnp, *nnp;
- register afs_int32 i, delflag;
+ struct nfsclientpag *np, **tnp, *nnp;
+ afs_int32 i, delflag;
int count;
#if defined(AFS_SGIMP_ENV)
int
-afs_nfsclient_stats(register struct afs_exporter *export)
+afs_nfsclient_stats(struct afs_exporter *export)
{
/* Nothing much to do here yet since most important stats are collected
* directly in the afs_exporter structure itself */
void
afs_nfs2_smallfidder(struct nfsdiropres *dr)
{
- register fhandle_t *fhp = (fhandle_t *) & dr->dr_fhandle;
+ fhandle_t *fhp = (fhandle_t *) & dr->dr_fhandle;
afs_int32 addr[2];
struct vcache *vcp;
/* drop the setting of the clock for now. spl7 is not
* known on hpux11.22
*/
- register ulong_t s;
+ ulong_t s;
struct timeval t;
t.tv_sec = atv->tv_sec;
t.tv_usec = atv->tv_usec;
}
#else
{
- register int s;
+ int s;
s = splclock();
time = *atv;
(void)splx(s);
afs_osi_Alloc(size_t x)
{
#if !defined(AFS_LINUX20_ENV) && !defined(AFS_FBSD_ENV)
- register struct osimem *tm = NULL;
- register int size;
+ struct osimem *tm = NULL;
+ int size;
#endif
AFS_STATCNT(osi_Alloc);
void *
afs_osi_Alloc_NoSleep(size_t x)
{
- register struct osimem *tm;
- register int size;
+ struct osimem *tm;
+ int size;
AFS_STATCNT(osi_Alloc);
/* 0-length allocs may return NULL ptr from AFS_KALLOC, so we special-case
void *
osi_AllocLargeSpace(size_t size)
{
- register struct osi_packet *tp;
+ struct osi_packet *tp;
AFS_ASSERT_GLOCK();
void *
osi_AllocSmallSpace(size_t size)
{
- register struct osi_packet *tp;
+ struct osi_packet *tp;
AFS_STATCNT(osi_AllocSmallSpace);
if (size > AFS_SMALLOCSIZ)
int
-afs_InitReq(register struct vrequest *av, afs_ucred_t *acred)
+afs_InitReq(struct vrequest *av, afs_ucred_t *acred)
{
#if defined(AFS_LINUX26_ENV) && !defined(AFS_NONFSTRANS)
int code;
/* routine to make copy of uio structure in ainuio, using aoutvec for space */
int
afsio_copy(struct uio *ainuio, struct uio *aoutuio,
- register struct iovec *aoutvec)
+ struct iovec *aoutvec)
{
- register int i;
- register struct iovec *tvec;
+ int i;
+ struct iovec *tvec;
AFS_STATCNT(afsio_copy);
if (ainuio->afsio_iovcnt > AFS_MAXIOVCNT)
/* trim the uio structure to the specified size */
int
-afsio_trim(register struct uio *auio, register afs_int32 asize)
+afsio_trim(struct uio *auio, afs_int32 asize)
{
- register int i;
- register struct iovec *tv;
+ int i;
+ struct iovec *tv;
AFS_STATCNT(afsio_trim);
auio->afsio_resid = asize;
/* skip asize bytes in the current uio structure */
int
-afsio_skip(register struct uio *auio, register afs_int32 asize)
+afsio_skip(struct uio *auio, afs_int32 asize)
{
- register struct iovec *tv; /* pointer to current iovec */
- register int cnt;
+ struct iovec *tv; /* pointer to current iovec */
+ int cnt;
AFS_STATCNT(afsio_skip);
#ifdef AFS_DARWIN80_ENV
{
struct VenusFid vfid;
struct SmallFid Sfid;
- register struct cell *tcell;
+ struct cell *tcell;
struct vrequest treq;
- register afs_int32 code = 0, cellindex;
+ afs_int32 code = 0, cellindex;
afs_int32 ret;
memcpy((char *)&Sfid, afidp->fid_data, SIZEOF_SMALLFID);
#endif
int
-osi_Active(register struct vcache *avc)
+osi_Active(struct vcache *avc)
{
AFS_STATCNT(osi_Active);
#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || (AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
us, of course).
*/
void
-osi_FlushPages(register struct vcache *avc, afs_ucred_t *credp)
+osi_FlushPages(struct vcache *avc, afs_ucred_t *credp)
{
#ifdef AFS_FBSD70_ENV
int vfslocked;
* it is written to the file system. */
void
-osi_FlushText_really(register struct vcache *vp)
+osi_FlushText_really(struct vcache *vp)
{
afs_hyper_t fdv; /* version before which we'll flush */
int
afspag_PUnlog(char *ain, afs_int32 ainSize, afs_ucred_t **acred)
{
- register afs_int32 i;
- register struct unixuser *tu;
+ afs_int32 i;
+ struct unixuser *tu;
afs_int32 pag, uid;
AFS_STATCNT(PUnlog);
afspag_PSetTokens(char *ain, afs_int32 ainSize, afs_ucred_t **acred)
{
afs_int32 i;
- register struct unixuser *tu;
+ struct unixuser *tu;
struct afspag_cell *tcell;
struct ClearToken clear;
char *stp;
afs_ucred_t **acred,
afs_ucred_t *credp);
#endif
-int HandleIoctl(register struct vcache *avc, register afs_int32 acom,
+int HandleIoctl(struct vcache *avc, afs_int32 acom,
struct afs_ioctl *adata);
int afs_HandlePioctl(struct vnode *avp, afs_int32 acom,
- register struct afs_ioctl *ablob, int afollow,
+ struct afs_ioctl *ablob, int afollow,
afs_ucred_t **acred);
static int Prefetch(uparmtype apath, struct afs_ioctl *adata, int afollow,
afs_ucred_t *acred);
int afs_nobody = NFS_NOBODY;
int
-HandleIoctl(register struct vcache *avc, register afs_int32 acom,
+HandleIoctl(struct vcache *avc, afs_int32 acom,
struct afs_ioctl *adata)
{
- register afs_int32 code;
+ afs_int32 code;
code = 0;
AFS_STATCNT(HandleIoctl);
case 3:{
/* return the name of the cell this file is open on */
- register struct cell *tcell;
- register afs_int32 i;
+ struct cell *tcell;
+ afs_int32 i;
tcell = afs_GetCell(avc->f.fid.Cell, READ_LOCK);
if (tcell) {
# endif
} u_uap, *uap = &u_uap;
struct file *fd;
- register struct vcache *tvc;
- register int ioctlDone = 0, code = 0;
+ struct vcache *tvc;
+ int ioctlDone = 0, code = 0;
AFS_STATCNT(afs_xioctl);
uap->fd = fdes;
if (tvc && IsAfsVnode(AFSTOV(tvc))) {
/* This is an AFS vnode */
if (((uap->com >> 8) & 0xff) == 'V') {
- register struct afs_ioctl *datap;
+ struct afs_ioctl *datap;
AFS_GLOCK();
datap =
(struct afs_ioctl *)osi_AllocSmallSpace(AFS_SMALLOCSIZ);
afs_xioctl(struct afs_ioctl_sys *uap, rval_t *rvp)
{
struct file *fd;
- register struct vcache *tvc;
- register int ioctlDone = 0, code = 0;
+ struct vcache *tvc;
+ int ioctlDone = 0, code = 0;
AFS_STATCNT(afs_xioctl);
# if defined(AFS_SUN57_ENV)
if (tvc && IsAfsVnode(AFSTOV(tvc))) {
/* This is an AFS vnode */
if (((uap->com >> 8) & 0xff) == 'V') {
- register struct afs_ioctl *datap;
+ struct afs_ioctl *datap;
AFS_GLOCK();
datap =
(struct afs_ioctl *)osi_AllocSmallSpace(AFS_SMALLOCSIZ);
unsigned long arg)
{
struct afs_ioctl_sys ua, *uap = &ua;
- register struct vcache *tvc;
- register int ioctlDone = 0, code = 0;
+ struct vcache *tvc;
+ int ioctlDone = 0, code = 0;
AFS_STATCNT(afs_xioctl);
ua.com = com;
if (tvc && IsAfsVnode(AFSTOV(tvc))) {
/* This is an AFS vnode */
if (((uap->com >> 8) & 0xff) == 'V') {
- register struct afs_ioctl *datap;
+ struct afs_ioctl *datap;
AFS_GLOCK();
datap = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
code = copyin_afs_ioctl((char *)uap->arg, datap);
};
int
-afs_xioctl(afs_proc_t *p, register struct ioctl_args *uap, register_t *retval)
+afs_xioctl(afs_proc_t *p, struct ioctl_args *uap, register_t *retval)
{
struct file *fd;
- register struct vcache *tvc;
- register int ioctlDone = 0, code = 0;
+ struct vcache *tvc;
+ int ioctlDone = 0, code = 0;
AFS_STATCNT(afs_xioctl);
if ((code = fdgetf(p, uap->fd, &fd)))
if (tvc && IsAfsVnode(AFSTOV(tvc))) {
/* This is an AFS vnode */
if (((uap->com >> 8) & 0xff) == 'V') {
- register struct afs_ioctl *datap;
+ struct afs_ioctl *datap;
AFS_GLOCK();
datap = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
code = copyin_afs_ioctl((char *)uap->arg, datap);
# if defined(AFS_FBSD_ENV)
# define arg data
int
-afs_xioctl(struct thread *td, register struct ioctl_args *uap,
+afs_xioctl(struct thread *td, struct ioctl_args *uap,
register_t *retval)
{
afs_proc_t *p = td->td_proc;
};
int
-afs_xioctl(afs_proc_t *p, register struct ioctl_args *uap, register_t *retval)
+afs_xioctl(afs_proc_t *p, struct ioctl_args *uap, register_t *retval)
{
# endif
- register struct filedesc *fdp;
- register struct vcache *tvc;
- register int ioctlDone = 0, code = 0;
+ struct filedesc *fdp;
+ struct vcache *tvc;
+ int ioctlDone = 0, code = 0;
struct file *fd;
AFS_STATCNT(afs_xioctl);
if (tvc && IsAfsVnode(AFSTOV(tvc))) {
/* This is an AFS vnode */
if (((uap->com >> 8) & 0xff) == 'V') {
- register struct afs_ioctl *datap;
+ struct afs_ioctl *datap;
AFS_GLOCK();
datap = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
code = copyin_afs_ioctl((char *)uap->arg, datap);
int
afs_xioctl(void)
{
- register struct a {
+ struct a {
int fd;
int com;
caddr_t arg;
} *uap = (struct a *)get_user_struct()->u_ap;
- register struct file *fd;
- register struct vcache *tvc;
- register int ioctlDone = 0, code = 0;
+ struct file *fd;
+ struct vcache *tvc;
+ int ioctlDone = 0, code = 0;
AFS_STATCNT(afs_xioctl);
if (tvc && IsAfsVnode(AFSTOV(tvc))) {
/* This is an AFS vnode */
if (((uap->com >> 8) & 0xff) == 'V') {
- register struct afs_ioctl *datap;
+ struct afs_ioctl *datap;
AFS_GLOCK();
datap = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
code=copyin_afs_ioctl((char *)uap->arg, datap);
#if defined(AFS_NEED_CLIENTCONTEXT) || defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_LINUX22_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
afs_ucred_t *foreigncreds = NULL;
#endif
- register afs_int32 code = 0;
+ afs_int32 code = 0;
struct vnode *vp = NULL;
#ifdef AFS_AIX41_ENV
struct ucred *credp = crref(); /* don't free until done! */
int
afs_HandlePioctl(struct vnode *avp, afs_int32 acom,
- register struct afs_ioctl *ablob, int afollow,
+ struct afs_ioctl *ablob, int afollow,
afs_ucred_t **acred)
{
struct vcache *avc;
struct vrequest treq;
- register afs_int32 code;
- register afs_int32 function, device;
+ afs_int32 code;
+ afs_int32 function, device;
struct afs_pdata input, output;
struct afs_pdata copyInput, copyOutput;
size_t outSize;
DECL_PIOCTL(PSetAcl)
{
- register afs_int32 code;
+ afs_int32 code;
struct afs_conn *tconn;
struct AFSOpaque acl;
struct AFSVolSync tsync;
*/
DECL_PIOCTL(PGetFileCell)
{
- register struct cell *tcell;
+ struct cell *tcell;
AFS_STATCNT(PGetFileCell);
if (!avc)
*/
DECL_PIOCTL(PGetUserCell)
{
- register afs_int32 i;
- register struct unixuser *tu;
- register struct cell *tcell;
+ afs_int32 i;
+ struct unixuser *tu;
+ struct cell *tcell;
AFS_STATCNT(PGetUserCell);
if (!afs_resourceinit_flag) /* afs daemons haven't started yet */
DECL_PIOCTL(PSetTokens)
{
afs_int32 i;
- register struct unixuser *tu;
+ struct unixuser *tu;
struct ClearToken clear;
- register struct cell *tcell;
+ struct cell *tcell;
char *stp;
char *cellName;
int stLen;
char volName[32];
char *offLineMsg = afs_osi_Alloc(256);
char *motd = afs_osi_Alloc(256);
- register struct afs_conn *tc;
- register afs_int32 code = 0;
+ struct afs_conn *tc;
+ afs_int32 code = 0;
struct AFSFetchVolumeStatus volstat;
char *Name;
XSTATS_DECLS;
char *volName;
char *offLineMsg;
char *motd;
- register struct afs_conn *tc;
- register afs_int32 code = 0;
+ struct afs_conn *tc;
+ afs_int32 code = 0;
struct AFSFetchVolumeStatus volstat;
struct AFSStoreVolumeStatus storeStat;
- register struct volume *tvp;
+ struct volume *tvp;
XSTATS_DECLS;
AFS_STATCNT(PSetVolumeStatus);
*/
DECL_PIOCTL(PNewStatMount)
{
- register afs_int32 code;
- register struct vcache *tvc;
- register struct dcache *tdc;
+ afs_int32 code;
+ struct vcache *tvc;
+ struct dcache *tdc;
struct VenusFid tfid;
char *bufp;
char *name;
DECL_PIOCTL(PGetTokens)
{
- register struct cell *tcell;
- register afs_int32 i;
- register struct unixuser *tu;
+ struct cell *tcell;
+ afs_int32 i;
+ struct unixuser *tu;
afs_int32 iterator = 0;
int newStyle;
int code = E2BIG;
*/
DECL_PIOCTL(PUnlog)
{
- register afs_int32 i;
- register struct unixuser *tu;
+ afs_int32 i;
+ struct unixuser *tu;
AFS_STATCNT(PUnlog);
if (!afs_resourceinit_flag) /* afs daemons haven't started yet */
*/
DECL_PIOCTL(PCheckServers)
{
- register int i;
- register struct server *ts;
+ int i;
+ struct server *ts;
afs_int32 temp;
char *cellName = NULL;
struct cell *cellp;
Prefetch(uparmtype apath, struct afs_ioctl *adata, int afollow,
afs_ucred_t *acred)
{
- register char *tp;
- register afs_int32 code;
+ char *tp;
+ afs_int32 code;
#if defined(AFS_SGI61_ENV) || defined(AFS_SUN57_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
size_t bufferSize;
#else
*/
DECL_PIOCTL(PFindVolume)
{
- register struct volume *tvp;
- register struct server *ts;
- register afs_int32 i;
+ struct volume *tvp;
+ struct server *ts;
+ afs_int32 i;
int code = 0;
AFS_STATCNT(PFindVolume);
*/
DECL_PIOCTL(PViceAccess)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 temp;
AFS_STATCNT(PViceAccess);
{
afs_int32 results[MAXGCSTATS];
afs_int32 flags;
- register struct dcache * tdc;
+ struct dcache * tdc;
int i, size;
AFS_STATCNT(PGetCacheSize);
*/
DECL_PIOCTL(PRemoveCallBack)
{
- register struct afs_conn *tc;
- register afs_int32 code = 0;
+ struct afs_conn *tc;
+ afs_int32 code = 0;
struct AFSCallBack CallBacks_Array[1];
struct AFSCBFids theFids;
struct AFSCBs theCBs;
DECL_PIOCTL(PListCells)
{
afs_int32 whichCell;
- register struct cell *tcell = 0;
- register afs_int32 i;
+ struct cell *tcell = 0;
+ afs_int32 i;
int code;
AFS_STATCNT(PListCells);
DECL_PIOCTL(PListAliases)
{
afs_int32 whichAlias;
- register struct cell_alias *tcalias = 0;
+ struct cell_alias *tcalias = 0;
int code;
if (!afs_resourceinit_flag) /* afs daemons haven't started yet */
*/
DECL_PIOCTL(PRemoveMount)
{
- register afs_int32 code;
+ afs_int32 code;
char *bufp;
char *name;
struct sysname_info sysState;
afs_size_t offset, len;
- register struct afs_conn *tc;
- register struct dcache *tdc;
- register struct vcache *tvc;
+ struct afs_conn *tc;
+ struct dcache *tdc;
+ struct vcache *tvc;
struct AFSFetchStatus OutDirStatus;
struct VenusFid tfid;
struct AFSVolSync tsync;
*/
DECL_PIOCTL(PGetCellStatus)
{
- register struct cell *tcell;
+ struct cell *tcell;
char *cellName;
afs_int32 temp;
*/
DECL_PIOCTL(PSetCellStatus)
{
- register struct cell *tcell;
+ struct cell *tcell;
char *cellName;
afs_int32 flags0, flags1;
*/
DECL_PIOCTL(PFlushVolumeData)
{
- register afs_int32 i;
- register struct dcache *tdc;
- register struct vcache *tvc;
- register struct volume *tv;
+ afs_int32 i;
+ struct dcache *tdc;
+ struct vcache *tvc;
+ struct volume *tv;
afs_int32 cell, volume;
struct afs_q *tq, *uq;
#ifdef AFS_DARWIN80_ENV
*/
DECL_PIOCTL(PGetVnodeXStatus)
{
- register afs_int32 code;
+ afs_int32 code;
struct vcxstat stat;
afs_int32 mode, i;
DECL_PIOCTL(PGetVnodeXStatus2)
{
- register afs_int32 code;
+ afs_int32 code;
struct vcxstat2 stat;
afs_int32 mode;
char outname[MAXSYSNAME];
afs_int32 setsysname;
int foundname = 0;
- register struct afs_exporter *exporter;
- register struct unixuser *au;
- register afs_int32 pag, error;
+ struct afs_exporter *exporter;
+ struct unixuser *au;
+ afs_int32 pag, error;
int t, count, num = 0, allpags = 0;
char **sysnamelist;
struct afs_pdata validate;
{
int i;
struct volume *j;
- register int k;
+ int k;
if (vlonly) {
afs_int32 *p;
afs_int32 export, newint = 0;
afs_int32 type, changestate, handleValue, convmode, pwsync, smounts;
afs_int32 rempags = 0, pagcb = 0;
- register struct afs_exporter *exporter;
+ struct afs_exporter *exporter;
AFS_STATCNT(PExportAfs);
if (afs_pd_getInt(ain, &handleValue) != 0)
*/
DECL_PIOCTL(PFlushMount)
{
- register afs_int32 code;
- register struct vcache *tvc;
- register struct dcache *tdc;
+ afs_int32 code;
+ struct vcache *tvc;
+ struct dcache *tdc;
struct VenusFid tfid;
char *bufp;
char *mount;
DECL_PIOCTL(PPrefetchFromTape)
{
- register afs_int32 code, code1;
+ afs_int32 code, code1;
afs_int32 bytes, outval;
struct afs_conn *tc;
struct rx_call *tcall;
DECL_PIOCTL(PFsCmd)
{
- register afs_int32 code;
+ afs_int32 code;
struct afs_conn *tc;
struct vcache *tvc;
struct FsCmdInputs *Inputs;
DECL_PIOCTL(PNFSNukeCreds)
{
afs_uint32 addr;
- register afs_int32 i;
- register struct unixuser *tu;
+ afs_int32 i;
+ struct unixuser *tu;
AFS_STATCNT(PUnlog);
if (!afs_resourceinit_flag) /* afs daemons haven't started yet */
#define _AFS_PROTOTYPES_H_
/* afs_analyze.c */
-extern int afs_Analyze(register struct afs_conn *aconn, afs_int32 acode,
- struct VenusFid *afid, register struct vrequest *areq,
+extern int afs_Analyze(struct afs_conn *aconn, afs_int32 acode,
+ struct VenusFid *afid, struct vrequest *areq,
int op, afs_int32 locktype, struct cell *cellp);
/* afs_axscache.c */
/* afs_buffer.c */
extern void DInit(int abuffers);
-extern void *DRead(register struct dcache * fid, register int page);
-extern int DVOffset(register void *ap);
+extern void *DRead(struct dcache * fid, int page);
+extern int DVOffset(void *ap);
extern void DZap(struct dcache * fid);
extern void DFlush(void);
extern void DFlushDCache(struct dcache *);
-extern void *DNew(register struct dcache * fid, register int page);
+extern void *DNew(struct dcache * fid, int page);
extern void shutdown_bufferpackage(void);
/* afs_call.c */
extern int SRXAFSCB_GetLock(struct rx_call *a_call, afs_int32 a_index,
struct AFSDBLock *a_result);
extern int SRXAFSCB_CallBack(struct rx_call *a_call,
- register struct AFSCBFids *a_fids,
+ struct AFSCBFids *a_fids,
struct AFSCBs *a_callbacks);
extern int SRXAFSCB_Probe(struct rx_call *a_call);
extern int SRXAFSCB_InitCallBackState(struct rx_call *a_call);
extern afs_int32 afs_LogChunk;
/* afs_cell.c */
-extern struct cell *afs_GetRealCellByIndex(register afs_int32 cellindex,
+extern struct cell *afs_GetRealCellByIndex(afs_int32 cellindex,
afs_int32 locktype,
afs_int32 refresh);
extern afs_int32 cryptall;
extern afs_rwlock_t afs_xinterface;
extern afs_rwlock_t afs_xconn;
-extern struct afs_conn *afs_Conn(register struct VenusFid *afid,
- register struct vrequest *areq,
+extern struct afs_conn *afs_Conn(struct VenusFid *afid,
+ struct vrequest *areq,
afs_int32 locktype);
extern struct afs_conn *afs_ConnBySA(struct srvAddr *sap, unsigned short aport,
afs_int32 acell, struct unixuser *tu,
afs_int32 locktype);
extern struct afs_conn *afs_ConnByMHosts(struct server *ahosts[],
unsigned short aport, afs_int32 acell,
- register struct vrequest *areq,
+ struct vrequest *areq,
afs_int32 locktype);
extern struct afs_conn *afs_ConnByHost(struct server *aserver,
unsigned short aport, afs_int32 acell,
struct vrequest *areq, int aforce,
afs_int32 locktype);
-extern void afs_PutConn(register struct afs_conn *ac, afs_int32 locktype);
+extern void afs_PutConn(struct afs_conn *ac, afs_int32 locktype);
extern void ForceNewConnections(struct srvAddr *sap);
extern afs_int32 afs_preCache;
extern void afs_Daemon(void);
-extern struct brequest *afs_BQueue(register short aopcode,
- register struct vcache *avc,
+extern struct brequest *afs_BQueue(short aopcode,
+ struct vcache *avc,
afs_int32 dontwait, afs_int32 ause,
afs_ucred_t *acred,
afs_size_t asparm0, afs_size_t asparm1,
extern void afs_SetCheckServerNATmode(int isnat);
extern void afs_CheckServerDaemon(void);
extern int afs_CheckRootVolume(void);
-extern void afs_BRelease(register struct brequest *ab);
+extern void afs_BRelease(struct brequest *ab);
extern int afs_BBusy(void);
extern int afs_BioDaemon(afs_int32 nbiods);
#ifdef AFS_DARWIN80_ENV
extern struct osi_file *afs_cacheInodep;
extern void afs_dcacheInit(int afiles, int ablocks, int aDentries, int achunk,
int aflags);
-extern int afs_PutDCache(register struct dcache *adc);
-extern void afs_FlushDCache(register struct dcache *adc);
+extern int afs_PutDCache(struct dcache *adc);
+extern void afs_FlushDCache(struct dcache *adc);
extern void shutdown_dcache(void);
extern void afs_CacheTruncateDaemon(void);
extern afs_int32 afs_fsfragsize;
-extern struct dcache *afs_MemGetDSlot(register afs_int32 aslot,
- register struct dcache *tmpdc);
-extern struct dcache *afs_GetDCache(register struct vcache *avc,
+extern struct dcache *afs_MemGetDSlot(afs_int32 aslot,
+ struct dcache *tmpdc);
+extern struct dcache *afs_GetDCache(struct vcache *avc,
afs_size_t abyte,
- register struct vrequest *areq,
+ struct vrequest *areq,
afs_size_t * aoffset, afs_size_t * alen,
int aflags);
-extern struct dcache *afs_FindDCache(register struct vcache *avc,
+extern struct dcache *afs_FindDCache(struct vcache *avc,
afs_size_t abyte);
-extern void afs_StoreWarn(register afs_int32 acode, afs_int32 avolume,
- register afs_int32 aflags);
+extern void afs_StoreWarn(afs_int32 acode, afs_int32 avolume,
+ afs_int32 aflags);
extern void afs_MaybeWakeupTruncateDaemon(void);
extern void afs_CacheTruncateDaemon(void);
-extern void afs_AdjustSize(register struct dcache *adc,
- register afs_int32 newSize);
+extern void afs_AdjustSize(struct dcache *adc,
+ afs_int32 newSize);
extern int afs_HashOutDCache(struct dcache *adc, int zap);
extern int afs_MaybeFreeDiscardedDCache(void);
extern int afs_RefDCache(struct dcache *adc);
-extern void afs_TryToSmush(register struct vcache *avc,
+extern void afs_TryToSmush(struct vcache *avc,
afs_ucred_t *acred, int sync);
extern void updateV2DC(int lockVc, struct vcache *v, struct dcache *d,
int src);
extern void afs_WriteThroughDSlots(void);
-extern struct dcache *afs_UFSGetDSlot(register afs_int32 aslot,
- register struct dcache *tmpdc);
-extern int afs_WriteDCache(register struct dcache *adc, int atime);
-extern int afs_wakeup(register struct vcache *avc);
+extern struct dcache *afs_UFSGetDSlot(afs_int32 aslot,
+ struct dcache *tmpdc);
+extern int afs_WriteDCache(struct dcache *adc, int atime);
+extern int afs_wakeup(struct vcache *avc);
extern int afs_InitCacheFile(char *afile, ino_t ainode);
extern int afs_DCacheMissingChunks(struct vcache *avc);
extern struct dcache *afs_ObtainDCacheForWriting(struct vcache *avc,
extern afs_int32 et_to_sys_error(afs_int32 in);
extern void afs_FinalizeReq(struct vrequest *areq);
extern int afs_CheckCode(afs_int32 acode, struct vrequest *areq, int where);
-extern void afs_CopyError(register struct vrequest *afrom,
- register struct vrequest *ato);
+extern void afs_CopyError(struct vrequest *afrom,
+ struct vrequest *ato);
extern void init_sys_error_to_et(void);
/* afs_exporter.c */
extern int afs_icl_CreateLogWithFlags(char *name, afs_int32 logSize,
afs_uint32 flags,
struct afs_icl_log **outLogpp);
-extern int afs_icl_CopyOut(register struct afs_icl_log *logp,
+extern int afs_icl_CopyOut(struct afs_icl_log *logp,
afs_int32 * bufferp, afs_int32 * bufSizep,
afs_uint32 * cookiep, afs_int32 * flagsp);
extern int afs_icl_GetLogParms(struct afs_icl_log *logp, afs_int32 * maxSizep,
afs_int32 * curSizep);
-extern int afs_icl_LogHold(register struct afs_icl_log *logp);
-extern int afs_icl_LogHoldNL(register struct afs_icl_log *logp);
-extern int afs_icl_LogUse(register struct afs_icl_log *logp);
-extern int afs_icl_LogFreeUse(register struct afs_icl_log *logp);
-extern int afs_icl_LogSetSize(register struct afs_icl_log *logp,
+extern int afs_icl_LogHold(struct afs_icl_log *logp);
+extern int afs_icl_LogHoldNL(struct afs_icl_log *logp);
+extern int afs_icl_LogUse(struct afs_icl_log *logp);
+extern int afs_icl_LogFreeUse(struct afs_icl_log *logp);
+extern int afs_icl_LogSetSize(struct afs_icl_log *logp,
afs_int32 logSize);
-extern int afs_icl_ZapLog(register struct afs_icl_log *logp);
-extern int afs_icl_LogRele(register struct afs_icl_log *logp);
-extern int afs_icl_LogReleNL(register struct afs_icl_log *logp);
-extern int afs_icl_ZeroLog(register struct afs_icl_log *logp);
-extern int afs_icl_LogFree(register struct afs_icl_log *logp);
+extern int afs_icl_ZapLog(struct afs_icl_log *logp);
+extern int afs_icl_LogRele(struct afs_icl_log *logp);
+extern int afs_icl_LogReleNL(struct afs_icl_log *logp);
+extern int afs_icl_ZeroLog(struct afs_icl_log *logp);
+extern int afs_icl_LogFree(struct afs_icl_log *logp);
extern struct afs_icl_log *afs_icl_FindLog(char *name);
extern int
afs_icl_EnumerateLogs(int (*aproc)
extern int afs_icl_AddLogToSet(struct afs_icl_set *setp,
struct afs_icl_log *newlogp);
extern int afs_icl_SetSetStat(struct afs_icl_set *setp, int op);
-extern int afs_icl_SetHold(register struct afs_icl_set *setp);
-extern int afs_icl_ZapSet(register struct afs_icl_set *setp);
-extern int afs_icl_SetRele(register struct afs_icl_set *setp);
-extern int afs_icl_SetFree(register struct afs_icl_set *setp);
+extern int afs_icl_SetHold(struct afs_icl_set *setp);
+extern int afs_icl_ZapSet(struct afs_icl_set *setp);
+extern int afs_icl_SetRele(struct afs_icl_set *setp);
+extern int afs_icl_SetFree(struct afs_icl_set *setp);
extern struct afs_icl_set *afs_icl_FindSet(char *name);
-extern int afs_icl_Event4(register struct afs_icl_set *setp,
+extern int afs_icl_Event4(struct afs_icl_set *setp,
afs_int32 eventID, afs_int32 lAndT, long p1,
long p2, long p3, long p4);
-extern int afs_icl_Event3(register struct afs_icl_set *setp,
+extern int afs_icl_Event3(struct afs_icl_set *setp,
afs_int32 eventID, afs_int32 lAndT, long p1,
long p2, long p3);
-extern int afs_icl_Event2(register struct afs_icl_set *setp,
+extern int afs_icl_Event2(struct afs_icl_set *setp,
afs_int32 eventID, afs_int32 lAndT, long p1,
long p2);
-extern int afs_icl_Event1(register struct afs_icl_set *setp,
+extern int afs_icl_Event1(struct afs_icl_set *setp,
afs_int32 eventID, afs_int32 lAndT, long p1);
-extern int afs_icl_Event0(register struct afs_icl_set *setp,
+extern int afs_icl_Event0(struct afs_icl_set *setp,
afs_int32 eventID, afs_int32 lAndT);
-extern void afs_icl_AppendRecord(register struct afs_icl_log *logp,
+extern void afs_icl_AppendRecord(struct afs_icl_log *logp,
afs_int32 op, afs_int32 types, long p1,
long p2, long p3, long p4);
extern int Afscall_icl(long opcode, long p1, long p2, long p3, long p4,
afs_int32 aflags, afs_int32 ninodes,
afs_int32 nusers, afs_int32 dynamic_vcaches);
extern void afs_ComputeCacheParms(void);
-extern int afs_InitCacheInfo(register char *afile);
+extern int afs_InitCacheInfo(char *afile);
extern int afs_InitVolumeInfo(char *afile);
extern int afs_InitCellInfo(char *afile);
extern int afs_ResourceInit(int preallocs);
struct vnode **fvpp);
/* afs_lock.c */
-extern void Lock_Init(register struct afs_lock *lock);
-extern void ObtainLock(register struct afs_lock *lock, int how,
+extern void Lock_Init(struct afs_lock *lock);
+extern void ObtainLock(struct afs_lock *lock, int how,
unsigned int src_indicator);
-extern void ReleaseLock(register struct afs_lock *lock, int how);
+extern void ReleaseLock(struct afs_lock *lock, int how);
extern int Afs_Lock_Trace(int op, struct afs_lock *alock, int type,
char *file, int line);
-extern void Afs_Lock_Obtain(register struct afs_lock *lock, int how);
-extern void Afs_Lock_ReleaseR(register struct afs_lock *lock);
-extern void Afs_Lock_ReleaseW(register struct afs_lock *lock);
-extern void afs_osi_SleepR(register char *addr,
- register struct afs_lock *alock);
-extern void afs_osi_SleepW(register char *addr,
- register struct afs_lock *alock);
-extern void afs_osi_SleepS(register char *addr,
- register struct afs_lock *alock);
+extern void Afs_Lock_Obtain(struct afs_lock *lock, int how);
+extern void Afs_Lock_ReleaseR(struct afs_lock *lock);
+extern void Afs_Lock_ReleaseW(struct afs_lock *lock);
+extern void afs_osi_SleepR(char *addr,
+ struct afs_lock *alock);
+extern void afs_osi_SleepW(char *addr,
+ struct afs_lock *alock);
+extern void afs_osi_SleepS(char *addr,
+ struct afs_lock *alock);
#ifndef AFS_NOBOZO_LOCK
extern void afs_BozonLock(struct afs_bozoLock *alock, struct vcache *avc);
extern void afs_BozonUnlock(struct afs_bozoLock *alock, struct vcache *avc);
extern afs_int32 afs_mariner;
extern afs_int32 afs_marinerHost;
extern struct rx_service *afs_server;
-extern int afs_AddMarinerName(register char *aname,
- register struct vcache *avc);
-extern char *afs_GetMariner(register struct vcache *avc);
-extern void afs_MarinerLogFetch(register struct vcache *avc,
- register afs_int32 off,
- register afs_int32 bytes,
- register afs_int32 idx);
-extern void afs_MarinerLog(register char *astring,
- register struct vcache *avc);
+extern int afs_AddMarinerName(char *aname,
+ struct vcache *avc);
+extern char *afs_GetMariner(struct vcache *avc);
+extern void afs_MarinerLogFetch(struct vcache *avc,
+ afs_int32 off,
+ afs_int32 bytes,
+ afs_int32 idx);
+extern void afs_MarinerLog(char *astring,
+ struct vcache *avc);
extern void shutdown_mariner(void);
/* afs_fetchstore.c */
extern int afs_InitMemCache(int blkCount, int blkSize, int flags);
extern int afs_MemCacheClose(struct osi_file *file);
extern void *afs_MemCacheOpen(afs_dcache_id_t *ainode);
-extern int afs_MemReadBlk(register struct osi_file *fP, int offset,
+extern int afs_MemReadBlk(struct osi_file *fP, int offset,
void *dest, int size);
-extern int afs_MemReadvBlk(register struct memCacheEntry *mceP, int offset,
+extern int afs_MemReadvBlk(struct memCacheEntry *mceP, int offset,
struct iovec *iov, int nio, int size);
extern int afs_MemReadUIO(afs_dcache_id_t *ainode, struct uio *uioP);
-extern int afs_MemWriteBlk(register struct osi_file *fP, int offset,
+extern int afs_MemWriteBlk(struct osi_file *fP, int offset,
void *src, int size);
-extern int afs_MemWritevBlk(register struct memCacheEntry *mceP, int offset,
+extern int afs_MemWritevBlk(struct memCacheEntry *mceP, int offset,
struct iovec *iov, int nio, int size);
extern int afs_MemWriteUIO(afs_dcache_id_t *ainode, struct uio *uioP);
-extern int afs_MemCacheTruncate(register struct osi_file *fP,
+extern int afs_MemCacheTruncate(struct osi_file *fP,
int size);
extern void shutdown_memcache(void);
#else
extern int AddPag(afs_int32 aval, afs_ucred_t **credpp);
#endif
-extern int afs_InitReq(register struct vrequest *av, afs_ucred_t *acred);
+extern int afs_InitReq(struct vrequest *av, afs_ucred_t *acred);
extern afs_uint32 afs_get_pag_from_groups(gid_t g0a, gid_t g1a);
extern void afs_get_groups_from_pag(afs_uint32 pag, gid_t * g0p, gid_t * g1p);
extern afs_int32 PagInCred(afs_ucred_t *cred);
extern int afsio_skip(struct uio *auio, afs_int32 asize);
/* afs_osi_vm.c */
-extern int osi_Active(register struct vcache *avc);
-extern void osi_FlushPages(register struct vcache *avc,
+extern int osi_Active(struct vcache *avc);
+extern void osi_FlushPages(struct vcache *avc,
afs_ucred_t *credp);
-extern void osi_FlushText_really(register struct vcache *vp);
+extern void osi_FlushText_really(struct vcache *vp);
extern int osi_VMDirty_p(struct vcache *avc);
#ifndef UKERNEL
extern void osi_ReleaseVM(struct vcache *avc, afs_ucred_t *acred);
#if defined(AFS_LINUX22_ENV)
extern void osi_get_fh(struct dentry *dp, afs_ufs_dcache_id_t *ainode);
#endif
-extern int afs_osi_Stat(register struct osi_file *afile,
- register struct osi_stat *astat);
-extern int osi_UFSClose(register struct osi_file *afile);
-extern int osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize);
+extern int afs_osi_Stat(struct osi_file *afile,
+ struct osi_stat *astat);
+extern int osi_UFSClose(struct osi_file *afile);
+extern int osi_UFSTruncate(struct osi_file *afile, afs_int32 asize);
extern void osi_DisableAtimes(struct vnode *avp);
-extern int afs_osi_Read(register struct osi_file *afile, int offset,
+extern int afs_osi_Read(struct osi_file *afile, int offset,
void *aptr, afs_int32 asize);
-extern int afs_osi_Write(register struct osi_file *afile, afs_int32 offset,
+extern int afs_osi_Write(struct osi_file *afile, afs_int32 offset,
void *aptr, afs_int32 asize);
extern int afs_osi_MapStrategy(int (*aproc) (struct buf * bp),
- register struct buf *bp);
+ struct buf *bp);
extern void shutdown_osifile(void);
extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg,
int follow);
#endif
-extern int HandleIoctl(register struct vcache *avc, register afs_int32 acom,
+extern int HandleIoctl(struct vcache *avc, afs_int32 acom,
struct afs_ioctl *adata);
/* afs_segments.c */
-extern int afs_StoreAllSegments(register struct vcache *avc,
+extern int afs_StoreAllSegments(struct vcache *avc,
struct vrequest *areq, int sync);
extern int afs_InvalidateAllSegments(struct vcache *avc);
extern int afs_ExtendSegments(struct vcache *avc,
afs_size_t alen, struct vrequest *areq);
-extern int afs_TruncateAllSegments(register struct vcache *avc,
+extern int afs_TruncateAllSegments(struct vcache *avc,
afs_size_t alen, struct vrequest *areq,
afs_ucred_t *acred);
extern struct unixuser *afs_users[NUSERS];
extern struct unixuser *afs_FindUser(afs_int32 auid, afs_int32 acell,
afs_int32 locktype);
-extern struct unixuser *afs_GetUser(register afs_int32 auid, afs_int32 acell,
+extern struct unixuser *afs_GetUser(afs_int32 auid, afs_int32 acell,
afs_int32 locktype);
extern void afs_NotifyUser(struct unixuser *auser, int event);
extern void afs_GCPAGs_perproc_func(afs_proc_t * pproc);
#endif /* AFS_GCPAGS */
extern void afs_ComputePAGStats(void);
-extern void afs_PutUser(register struct unixuser *au, afs_int32 locktype);
+extern void afs_PutUser(struct unixuser *au, afs_int32 locktype);
extern void afs_GCUserData(int aforce);
extern void afs_CheckTokenCache(void);
extern void afs_ResetAccessCache(afs_int32 uid, int alock);
-extern void afs_ResetUserConns(register struct unixuser *auser);
-extern void afs_SetPrimary(register struct unixuser *au, register int aflag);
+extern void afs_ResetUserConns(struct unixuser *auser);
+extern void afs_SetPrimary(struct unixuser *au, int aflag);
extern void afs_MarkUserExpired(afs_int32 pag);
/* afs_util.c */
extern struct vcache *afs_NewBulkVCache(struct VenusFid *afid,
struct server *serverp, int seq);
extern int afs_VerifyVCache2(struct vcache *avc, struct vrequest *areq);
-extern struct vcache *afs_GetVCache(register struct VenusFid *afid,
+extern struct vcache *afs_GetVCache(struct VenusFid *afid,
struct vrequest *areq, afs_int32 * cached,
struct vcache *avc);
-extern void afs_PutVCache(register struct vcache *avc);
+extern void afs_PutVCache(struct vcache *avc);
extern int afs_RefVCache(struct vcache *avc);
-extern void afs_ProcessFS(register struct vcache *avc,
- register struct AFSFetchStatus *astat,
+extern void afs_ProcessFS(struct vcache *avc,
+ struct AFSFetchStatus *astat,
struct vrequest *areq);
extern struct afs_cbr *afs_AllocCBR(void);
-extern int afs_FreeCBR(register struct afs_cbr *asp);
-extern void afs_RemoveVCB(register struct VenusFid *afid);
-extern void afs_FlushActiveVcaches(register afs_int32 doflocks);
-extern int afs_WriteVCache(register struct vcache *avc,
- register struct AFSStoreStatus *astatus,
+extern int afs_FreeCBR(struct afs_cbr *asp);
+extern void afs_RemoveVCB(struct VenusFid *afid);
+extern void afs_FlushActiveVcaches(afs_int32 doflocks);
+extern int afs_WriteVCache(struct vcache *avc,
+ struct AFSStoreStatus *astatus,
struct vrequest *areq);
-extern int afs_RemoteLookup(register struct VenusFid *afid,
+extern int afs_RemoteLookup(struct VenusFid *afid,
struct vrequest *areq, char *name,
struct VenusFid *nfid,
struct AFSFetchStatus *OutStatusp,
extern void afs_ClearAllStatdFlag(void);
/* VNOPS/afs_vnop_access.c */
-extern afs_int32 afs_GetAccessBits(register struct vcache *avc,
- register afs_int32 arights,
- register struct vrequest *areq);
+extern afs_int32 afs_GetAccessBits(struct vcache *avc,
+ afs_int32 arights,
+ struct vrequest *areq);
extern int afs_AccessOK(struct vcache *avc, afs_int32 arights,
struct vrequest *areq, afs_int32 check_mode_bits);
#if defined(AFS_SUN5_ENV) || (defined(AFS_SGI_ENV) && !defined(AFS_SGI65_ENV))
-extern int afs_access(OSI_VC_DECL(avc), register afs_int32 amode, int flags,
+extern int afs_access(OSI_VC_DECL(avc), afs_int32 amode, int flags,
afs_ucred_t *acred);
#else
-extern int afs_access(OSI_VC_DECL(avc), register afs_int32 amode,
+extern int afs_access(OSI_VC_DECL(avc), afs_int32 amode,
afs_ucred_t *acred);
#endif
-extern int afs_getRights(OSI_VC_DECL(avc), register afs_int32 arights,
+extern int afs_getRights(OSI_VC_DECL(avc), afs_int32 arights,
afs_ucred_t *acred);
/* VNOPS/afs_vnop_attrs.c */
-extern int afs_CopyOutAttrs(register struct vcache *avc,
- register struct vattr *attrs);
+extern int afs_CopyOutAttrs(struct vcache *avc,
+ struct vattr *attrs);
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
extern int afs_getattr(OSI_VC_DECL(avc), struct vattr *attrs, int flags,
afs_ucred_t *acred);
extern int afs_getattr(OSI_VC_DECL(avc), struct vattr *attrs,
afs_ucred_t *acred);
#endif
-extern int afs_VAttrToAS(register struct vcache *avc,
- register struct vattr *av,
- register struct AFSStoreStatus *as);
+extern int afs_VAttrToAS(struct vcache *avc,
+ struct vattr *av,
+ struct AFSStoreStatus *as);
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
-extern int afs_setattr(OSI_VC_DECL(avc), register struct vattr *attrs,
+extern int afs_setattr(OSI_VC_DECL(avc), struct vattr *attrs,
int flags, afs_ucred_t *acred);
#else
-extern int afs_setattr(OSI_VC_DECL(avc), register struct vattr *attrs,
+extern int afs_setattr(OSI_VC_DECL(avc), struct vattr *attrs,
afs_ucred_t *acred);
#endif
enum vcexcl aexcl, int amode, struct vcache **avcp,
afs_ucred_t *acred);
#endif /* AFS_SGI64_ENV */
-extern int afs_LocalHero(register struct vcache *avc,
- register struct dcache *adc,
- register AFSFetchStatus * astat, register int aincr);
+extern int afs_LocalHero(struct vcache *avc,
+ struct dcache *adc,
+ AFSFetchStatus * astat, int aincr);
/* VNOPS/afs_vnop_dirops.c */
extern int afs_mkdir(OSI_VC_DECL(adp), char *aname, struct vattr *attrs,
- register struct vcache **avcp, afs_ucred_t *acred);
+ struct vcache **avcp, afs_ucred_t *acred);
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
extern int afs_rmdir(OSI_VC_DECL(adp), char *aname, struct vnode *cdirp,
afs_ucred_t *acred);
extern void lockIdSet(struct AFS_FLOCK *flock, struct SimpleLocks *slp,
int clid);
-extern int HandleFlock(register struct vcache *avc, int acom,
+extern int HandleFlock(struct vcache *avc, int acom,
struct vrequest *areq, pid_t clid, int onlymine);
#if defined(AFS_SGI_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
#endif
/* VNOPS/afs_vnop_lookup.c */
-extern int EvalMountPoint(register struct vcache *avc, struct vcache *advc,
+extern int EvalMountPoint(struct vcache *avc, struct vcache *advc,
struct volume **avolpp,
- register struct vrequest *areq);
+ struct vrequest *areq);
extern void afs_InitFakeStat(struct afs_fakestat_state *state);
extern int afs_EvalFakeStat(struct vcache **avcp,
struct afs_fakestat_state *state,
struct afs_fakestat_state *state,
struct vrequest *areq);
extern void afs_PutFakeStat(struct afs_fakestat_state *state);
-extern int afs_ENameOK(register char *aname);
-extern void Check_AtSys(register struct vcache *avc, const char *aname,
+extern int afs_ENameOK(char *aname);
+extern void Check_AtSys(struct vcache *avc, const char *aname,
struct sysname_info *state, struct vrequest *areq);
-extern int Next_AtSys(register struct vcache *avc, struct vrequest *areq,
+extern int Next_AtSys(struct vcache *avc, struct vrequest *areq,
struct sysname_info *state);
extern int afs_DoBulkStat(struct vcache *adp, long dirCookie,
struct vrequest *areqp);
/* VNOPS/afs_vnop_read.c */
-extern int afs_MemRead(register struct vcache *avc, struct uio *auio,
+extern int afs_MemRead(struct vcache *avc, struct uio *auio,
afs_ucred_t *acred, daddr_t albn,
struct buf **abpp, int noLock);
-extern int afs_UFSRead(register struct vcache *avc, struct uio *auio,
+extern int afs_UFSRead(struct vcache *avc, struct uio *auio,
afs_ucred_t *acred, daddr_t albn,
struct buf **abpp, int noLock);
extern void afs_PrefetchChunk(struct vcache *avc, struct dcache *adc,
#endif
/* VNOPS/afs_vnop_remove.c */
-extern int afsremove(register struct vcache *adp, register struct dcache *tdc,
- register struct vcache *tvc, char *aname,
+extern int afsremove(struct vcache *adp, struct dcache *tdc,
+ struct vcache *tvc, char *aname,
afs_ucred_t *acred, struct vrequest *treqp);
-extern int afs_remunlink(register struct vcache *avc, register int doit);
+extern int afs_remunlink(struct vcache *avc, int doit);
extern int afs_remove(OSI_VC_DECL(adp), char *aname, afs_ucred_t *acred);
extern char *afs_newname(void);
/* VNOPS/afs_vnop_strategy.c */
#if defined(AFS_SUN5_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-extern int afs_ustrategy(register struct buf *adp, afs_ucred_t *credp);
+extern int afs_ustrategy(struct buf *adp, afs_ucred_t *credp);
#else
-extern int afs_ustrategy(register struct buf *adp);
+extern int afs_ustrategy(struct buf *adp);
#endif
/* VNOPS/afs_vnop_symlink.c */
-extern int afs_MemHandleLink(register struct vcache *avc,
+extern int afs_MemHandleLink(struct vcache *avc,
struct vrequest *areq);
-extern int afs_UFSHandleLink(register struct vcache *avc,
+extern int afs_UFSHandleLink(struct vcache *avc,
struct vrequest *areq);
extern int afs_symlink(OSI_VC_DECL(adp), char *aname,
struct vattr *attrs, char *atargetName,
afs_ucred_t *acred);
/* VNOPS/afs_vnop_write.c */
-extern int afs_MemWrite(register struct vcache *avc, struct uio *auio,
+extern int afs_MemWrite(struct vcache *avc, struct uio *auio,
int aio, afs_ucred_t *acred, int noLock);
-extern int afs_StoreOnLastReference(register struct vcache *avc,
- register struct vrequest *treq);
-extern int afs_UFSWrite(register struct vcache *avc, struct uio *auio,
+extern int afs_StoreOnLastReference(struct vcache *avc,
+ struct vrequest *treq);
+extern int afs_UFSWrite(struct vcache *avc, struct uio *auio,
int aio, afs_ucred_t *acred, int noLock);
-extern int afs_DoPartialWrite(register struct vcache *avc,
+extern int afs_DoPartialWrite(struct vcache *avc,
struct vrequest *areq);
-extern int afs_closex(register struct file *afd);
+extern int afs_closex(struct file *afd);
#ifdef AFS_SGI65_ENV
extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,
extern struct volume *afs_GetVolume(struct VenusFid *afid,
struct vrequest *areq,
afs_int32 locktype);
-extern struct volume *afs_GetVolumeByName(register char *aname,
+extern struct volume *afs_GetVolumeByName(char *aname,
afs_int32 acell, int agood,
struct vrequest *areq,
afs_int32 locktype);
*/
static int
-afs_StoreMini(register struct vcache *avc, struct vrequest *areq)
+afs_StoreMini(struct vcache *avc, struct vrequest *areq)
{
- register struct afs_conn *tc;
+ struct afs_conn *tc;
struct AFSStoreStatus InStatus;
struct AFSFetchStatus OutStatus;
struct AFSVolSync tsync;
- register afs_int32 code;
- register struct rx_call *tcall;
+ afs_int32 code;
+ struct rx_call *tcall;
afs_size_t tlen, xlen = 0;
XSTATS_DECLS;
AFS_STATCNT(afs_StoreMini);
int
-afs_StoreAllSegments(register struct vcache *avc, struct vrequest *areq,
+afs_StoreAllSegments(struct vcache *avc, struct vrequest *areq,
int sync)
{
- register struct dcache *tdc;
- register afs_int32 code = 0;
- register afs_int32 index;
- register afs_int32 origCBs, foreign = 0;
+ struct dcache *tdc;
+ afs_int32 code = 0;
+ afs_int32 index;
+ afs_int32 origCBs, foreign = 0;
int hash;
afs_hyper_t newDV, oldDV; /* DV when we start, and finish, respectively */
struct dcache **dcList;
* held.
*/
int
-afs_TruncateAllSegments(register struct vcache *avc, afs_size_t alen,
+afs_TruncateAllSegments(struct vcache *avc, afs_size_t alen,
struct vrequest *areq, afs_ucred_t *acred)
{
- register struct dcache *tdc;
- register afs_int32 code;
- register afs_int32 index;
+ struct dcache *tdc;
+ afs_int32 code;
+ afs_int32 index;
afs_size_t newSize;
int dcCount, dcPos;
void
afs_MarkServerUpOrDown(struct srvAddr *sa, int a_isDown)
{
- register struct server *a_serverP = sa->server;
- register struct srvAddr *sap;
+ struct server *a_serverP = sa->server;
+ struct srvAddr *sap;
osi_timeval_t currTime, *currTimeP; /*Current time */
afs_int32 downTime; /*Computed downtime, in seconds */
struct afs_stats_SrvUpDownInfo *upDownP; /*Ptr to up/down info record */
afs_int32
afs_ServerDown(struct srvAddr *sa)
{
- register struct server *aserver = sa->server;
+ struct server *aserver = sa->server;
AFS_STATCNT(ServerDown);
if (aserver->flags & SRVR_ISDOWN || sa->sa_flags & SRVADDR_ISDOWN)
int
afs_HaveCallBacksFrom(struct server *aserver)
{
- register afs_int32 now;
- register int i;
- register struct vcache *tvc;
+ afs_int32 now;
+ int i;
+ struct vcache *tvc;
AFS_STATCNT(HaveCallBacksFrom);
now = osi_Time(); /* for checking for expired callbacks */
static void
-CheckVLServer(register struct srvAddr *sa, struct vrequest *areq)
+CheckVLServer(struct srvAddr *sa, struct vrequest *areq)
{
- register struct server *aserver = sa->server;
- register struct afs_conn *tc;
- register afs_int32 code;
+ struct server *aserver = sa->server;
+ struct afs_conn *tc;
+ afs_int32 code;
AFS_STATCNT(CheckVLServer);
/* Ping dead servers to see if they're back */
afs_random(void)
{
static afs_int32 state = 0;
- register int i;
+ int i;
AFS_STATCNT(afs_random);
if (!state) {
*/
syscall(syscall, p1, p2, p3, p4, p5, p6)
{
- register rval1 = 0, code;
- register monster;
+ int rval1 = 0, code;
+ int monster;
int retval = 0;
#ifndef AFS_AIX41_ENV
extern lock_t kernel_lock;
};
# endif
-Afs_syscall(register struct afssysa *uap, rval_t * rvp)
+Afs_syscall(struct afssysa *uap, rval_t * rvp)
{
int *retval = &rvp->r_val1;
#elif defined(AFS_DARWIN100_ENV)
int
afs3_syscall(struct thread *p, void *args)
{
- register struct a {
+ struct a {
long syscall;
long parm1;
long parm2;
int
afs3_syscall(afs_proc_t *p, void *args, long *retval)
{
- register struct a {
+ struct a {
long syscall;
long parm1;
long parm2;
int
Afs_syscall()
{
- register struct a {
+ struct a {
long syscall;
long parm1;
long parm2;
int
Afs_syscall()
{
- register struct a {
+ struct a {
long syscall;
long parm1;
long parm2;
int *retval = &u.u_rval1;
# endif
#endif
- register int code = 0;
+ int code = 0;
AFS_STATCNT(afs_syscall);
#ifdef AFS_SUN5_ENV
} else if (uap->syscall == AFSCALL_SETPAG) {
#endif
#ifdef AFS_SUN5_ENV
- register proc_t *procp;
+ proc_t *procp;
procp = ttoproc(curthread);
AFS_GLOCK();
* appropriate conn structures for au
*/
static void
-RemoveUserConns(register struct unixuser *au)
+RemoveUserConns(struct unixuser *au)
{
- register int i;
- register struct server *ts;
- register struct srvAddr *sa;
- register struct afs_conn *tc, **lc;
+ int i;
+ struct server *ts;
+ struct srvAddr *sa;
+ struct afs_conn *tc, **lc;
AFS_STATCNT(RemoveUserConns);
for (i = 0; i < NSERVERS; i++) {
void
afs_GCUserData(int aforce)
{
- register struct unixuser *tu, **lu, *nu;
- register int i;
+ struct unixuser *tu, **lu, *nu;
+ int i;
afs_int32 now, delFlag;
AFS_STATCNT(afs_GCUserData);
void
afs_CheckTokenCache(void)
{
- register int i;
- register struct unixuser *tu;
+ int i;
+ struct unixuser *tu;
afs_int32 now;
AFS_STATCNT(afs_CheckCacheResets);
now = osi_Time();
for (i = 0; i < NUSERS; i++) {
for (tu = afs_users[i]; tu; tu = tu->next) {
- register afs_int32 uid;
+ afs_int32 uid;
/*
* If tokens are still good and user has Kerberos tickets,
void
afs_ResetAccessCache(afs_int32 uid, int alock)
{
- register int i;
- register struct vcache *tvc;
+ int i;
+ struct vcache *tvc;
struct axscache *ac;
AFS_STATCNT(afs_ResetAccessCache);
* access info.
*/
void
-afs_ResetUserConns(register struct unixuser *auser)
+afs_ResetUserConns(struct unixuser *auser)
{
int i;
struct srvAddr *sa;
struct unixuser *
afs_FindUser(afs_int32 auid, afs_int32 acell, afs_int32 locktype)
{
- register struct unixuser *tu;
- register afs_int32 i;
+ struct unixuser *tu;
+ afs_int32 i;
AFS_STATCNT(afs_FindUser);
i = UHash(auid);
void
afs_ComputePAGStats(void)
{
- register struct unixuser *currPAGP; /*Ptr to curr PAG */
- register struct unixuser *cmpPAGP; /*Ptr to PAG being compared */
- register struct afs_stats_AuthentInfo *authP; /*Ptr to stats area */
+ struct unixuser *currPAGP; /*Ptr to curr PAG */
+ struct unixuser *cmpPAGP; /*Ptr to PAG being compared */
+ struct afs_stats_AuthentInfo *authP; /*Ptr to stats area */
int curr_Record; /*Curr record */
int currChain; /*Curr hash chain */
int currChainLen; /*Length of curr hash chain */
struct unixuser *
-afs_GetUser(register afs_int32 auid, afs_int32 acell, afs_int32 locktype)
+afs_GetUser(afs_int32 auid, afs_int32 acell, afs_int32 locktype)
{
- register struct unixuser *tu, *pu = 0;
- register afs_int32 i;
- register afs_int32 RmtUser = 0;
+ struct unixuser *tu, *pu = 0;
+ afs_int32 i;
+ afs_int32 RmtUser = 0;
AFS_STATCNT(afs_GetUser);
i = UHash(auid);
void
-afs_PutUser(register struct unixuser *au, afs_int32 locktype)
+afs_PutUser(struct unixuser *au, afs_int32 locktype)
{
AFS_STATCNT(afs_PutUser);
--au->refCount;
* dude has the flag set at any time for a particular unix uid.
*/
void
-afs_SetPrimary(register struct unixuser *au, register int aflag)
+afs_SetPrimary(struct unixuser *au, int aflag)
{
- register struct unixuser *tu;
- register int i;
+ struct unixuser *tu;
+ int i;
struct unixuser *pu;
AFS_STATCNT(afs_SetPrimary);
char *
afs_cv2string(char *ttp, afs_uint32 aval)
{
- register char *tp = ttp;
- register int i;
+ char *tp = ttp;
+ int i;
int any;
AFS_STATCNT(afs_cv2string);
print_internet_address(char *preamble, struct srvAddr *sa, char *postamble,
int flag)
{
- register struct server *aserver = sa->server;
+ struct server *aserver = sa->server;
char *ptr = "\n";
afs_uint32 address;
void
afs_CheckLocks(void)
{
- register int i;
+ int i;
afs_warn("Looking for locked data structures.\n");
afs_warn("conn %p, volume %p, user %p, cell %p, server %p\n", &afs_xconn,
&afs_xvolume, &afs_xuser, &afs_xcell, &afs_xserver);
{
- register struct vcache *tvc;
+ struct vcache *tvc;
AFS_STATCNT(afs_CheckLocks);
for (i = 0; i < VCSIZE; i++) {
}
}
{
- register struct dcache *tdc;
+ struct dcache *tdc;
for (i = 0; i < afs_cacheFiles; i++) {
tdc = afs_indexTable[i];
if (tdc) {
struct afs_cbr *
afs_AllocCBR(void)
{
- register struct afs_cbr *tsp;
+ struct afs_cbr *tsp;
int i;
if (!afs_cbrSpace) {
* \rerurn 0
*/
int
-afs_FreeCBR(register struct afs_cbr *asp)
+afs_FreeCBR(struct afs_cbr *asp)
{
*(asp->pprev) = asp->next;
if (asp->next)
* \param doflocks : Do we handle flocks?
*/
void
-afs_FlushActiveVcaches(register afs_int32 doflocks)
+afs_FlushActiveVcaches(afs_int32 doflocks)
{
- register struct vcache *tvc;
- register int i;
- register struct afs_conn *tc;
- register afs_int32 code;
+ struct vcache *tvc;
+ int i;
+ struct afs_conn *tc;
+ afs_int32 code;
afs_ucred_t *cred = NULL;
struct vrequest treq, ureq;
struct AFSVolSync tsync;
int
afs_VerifyVCache2(struct vcache *avc, struct vrequest *areq)
{
- register struct vcache *tvc;
+ struct vcache *tvc;
AFS_STATCNT(afs_VerifyVCache);
*
*/
static void
-afs_SimpleVStat(register struct vcache *avc,
- register struct AFSFetchStatus *astat, struct vrequest *areq)
+afs_SimpleVStat(struct vcache *avc,
+ struct AFSFetchStatus *astat, struct vrequest *areq)
{
afs_size_t length;
AFS_STATCNT(afs_SimpleVStat);
*/
int
-afs_WriteVCache(register struct vcache *avc,
- register struct AFSStoreStatus *astatus,
+afs_WriteVCache(struct vcache *avc,
+ struct AFSStoreStatus *astatus,
struct vrequest *areq)
{
afs_int32 code;
* \note Must be called with a shared lock on the vnode
*/
int
-afs_WriteVCacheDiscon(register struct vcache *avc,
- register struct AFSStoreStatus *astatus,
+afs_WriteVCacheDiscon(struct vcache *avc,
+ struct AFSStoreStatus *astatus,
struct vattr *attrs)
{
afs_int32 code = 0;
* \param areq Ptr to associated request.
*/
void
-afs_ProcessFS(register struct vcache *avc,
- register struct AFSFetchStatus *astat, struct vrequest *areq)
+afs_ProcessFS(struct vcache *avc,
+ struct AFSFetchStatus *astat, struct vrequest *areq)
{
afs_size_t length;
AFS_STATCNT(afs_ProcessFS);
* \return Success status of operation.
*/
int
-afs_RemoteLookup(register struct VenusFid *afid, struct vrequest *areq,
+afs_RemoteLookup(struct VenusFid *afid, struct vrequest *areq,
char *name, struct VenusFid *nfid,
struct AFSFetchStatus *OutStatusp,
struct AFSCallBack *CallBackp, struct server **serverp,
{
afs_int32 code;
afs_uint32 start;
- register struct afs_conn *tc;
+ struct afs_conn *tc;
struct AFSFetchStatus OutDirStatus;
XSTATS_DECLS;
if (!name)
* already be held by the caller
*/
struct vcache *
-afs_GetVCache(register struct VenusFid *afid, struct vrequest *areq,
+afs_GetVCache(struct VenusFid *afid, struct vrequest *areq,
afs_int32 * cached, struct vcache *avc)
{
afs_int32 code, newvcache = 0;
- register struct vcache *tvc;
+ struct vcache *tvc;
struct volume *tvp;
afs_int32 retry;
{
afs_int32 code, now, newvcache = 0;
struct VenusFid nfid;
- register struct vcache *tvc;
+ struct vcache *tvc;
struct volume *tvp;
struct AFSFetchStatus OutStatus;
struct AFSCallBack CallBack;
afs_int32 getNewFid = 0;
afs_uint32 start;
struct VenusFid nfid;
- register struct vcache *tvc;
+ struct vcache *tvc;
struct server *serverp = 0;
struct AFSFetchStatus OutStatus;
struct AFSCallBack CallBack;
{
int code;
afs_uint32 start = 0;
- register struct afs_conn *tc;
+ struct afs_conn *tc;
struct AFSCallBack CallBack;
struct AFSVolSync tsync;
XSTATS_DECLS;
* Nothing interesting.
*/
void
-afs_StuffVcache(register struct VenusFid *afid,
+afs_StuffVcache(struct VenusFid *afid,
struct AFSFetchStatus *OutStatus,
- struct AFSCallBack *CallBack, register struct afs_conn *tc,
+ struct AFSCallBack *CallBack, struct afs_conn *tc,
struct vrequest *areq)
{
- register afs_int32 code, i, newvcache = 0;
- register struct vcache *tvc;
+ afs_int32 code, i, newvcache = 0;
+ struct vcache *tvc;
struct AFSVolSync tsync;
struct volume *tvp;
struct axscache *ac;
* \note Environment: Nothing interesting.
*/
void
-afs_PutVCache(register struct vcache *avc)
+afs_PutVCache(struct vcache *avc)
{
AFS_STATCNT(afs_PutVCache);
#ifdef AFS_DARWIN80_ENV
afs_FindVCache(struct VenusFid *afid, afs_int32 * retry, afs_int32 flag)
{
- register struct vcache *tvc;
+ struct vcache *tvc;
afs_int32 i;
#ifdef AFS_DARWIN80_ENV
vnode_t tvp;
afs_int32
afs_NFSFindVCache(struct vcache **avcp, struct VenusFid *afid)
{
- register struct vcache *tvc;
+ struct vcache *tvc;
afs_int32 i;
afs_int32 count = 0;
struct vcache *found_tvc = NULL;
afs_vcacheInit(int astatSize)
{
#if !defined(AFS_LINUX22_ENV)
- register struct vcache *tvp;
+ struct vcache *tvp;
#endif
int i;
if (!afs_maxvcount) {
*/
{
- register struct afs_q *tq, *uq = NULL;
- register struct vcache *tvc;
+ struct afs_q *tq, *uq = NULL;
+ struct vcache *tvc;
for (tq = VLRU.prev; tq != &VLRU; tq = uq) {
tvc = QTOV(tq);
uq = QPrev(tq);
* @return return 0 if can't parse as a number.
*/
static int
-afs_vtoi(register char *aname)
+afs_vtoi(char *aname)
{
- register afs_int32 temp;
- register int tc;
+ afs_int32 temp;
+ int tc;
temp = 0;
AFS_STATCNT(afs_vtoi);
while ((tc = *aname++)) {
struct volume *
afs_UFSGetVolSlot(void)
{
- register struct volume *tv = NULL, **lv;
+ struct volume *tv = NULL, **lv;
struct osi_file *tfile;
- register afs_int32 i = -1, code;
+ afs_int32 i = -1, code;
afs_int32 bestTime;
struct volume *bestVp, *oldLp = NULL, **bestLp = NULL;
char *oldname = NULL;
struct volume *
afs_MemGetVolSlot(void)
{
- register struct volume *tv;
+ struct volume *tv;
AFS_STATCNT(afs_MemGetVolSlot);
if (!afs_freeVolList) {
* @return
*/
struct volume *
-afs_GetVolumeByName(register char *aname, afs_int32 acell, int agood,
+afs_GetVolumeByName(char *aname, afs_int32 acell, int agood,
struct vrequest *areq, afs_int32 locktype)
{
afs_int32 i;
void
InstallVolumeEntry(struct volume *av, struct vldbentry *ve, int acell)
{
- register struct server *ts;
+ struct server *ts;
struct cell *cellp;
- register int i, j;
+ int i, j;
afs_int32 mask;
afs_uint32 temp;
void
InstallNVolumeEntry(struct volume *av, struct nvldbentry *ve, int acell)
{
- register struct server *ts;
+ struct server *ts;
struct cell *cellp;
- register int i, j;
+ int i, j;
afs_int32 mask;
afs_uint32 temp;
InstallUVolumeEntry(struct volume *av, struct uvldbentry *ve, int acell,
struct cell *tcell, struct vrequest *areq)
{
- register struct server *ts;
+ struct server *ts;
struct afs_conn *tconn;
struct cell *cellp;
- register int i, j;
+ int i, j;
afs_uint32 serverid;
afs_int32 mask;
int k;
extern afs_uint32 afs_DisconVnode; /* XXX: not protected. */
-extern int afs_WriteVCacheDiscon(register struct vcache *avc,
- register struct AFSStoreStatus *astatus,
+extern int afs_WriteVCacheDiscon(struct vcache *avc,
+ struct AFSStoreStatus *astatus,
struct vattr *attrs);
extern int afs_ResyncDisconFiles(struct vrequest *areq,
afs_ucred_t *acred);
afs_int32 len = 0;
afs_int32 rc = 0;
char cellName[WEBLOG_CELLNAME_MAX];
- register char *tp;
+ char *tp;
int n = sizeof(afs_int32);
struct ClearToken {
afs_int32 AuthHandle;
getExpiration(char *buf)
{
afs_int32 len = 0;
- register char *tp;
+ char *tp;
int n = sizeof(afs_int32);
struct ClearToken {
afs_int32 AuthHandle;
static int
setToken(char *tokenBuf, int tokenLen)
{
- register char *temp;
+ char *temp;
afs_int32 i = 0;
afsassert(tokenBuf);
{
afs_int32 len = 0;
char cellName[64];
- register char *tp;
+ char *tp;
struct ClearToken {
afs_int32 AuthHandle;
main(int argc, char *argv[])
{
struct afsconf_dir *tdir;
- register long code;
+ long code;
const char *confdir;
if (argc == 1) {
}
else if (strcmp(argv[1], "list") == 0) {
struct afsconf_keys tkeys;
- register int i, j;
+ int i, j;
code = afsconf_GetKeys(tdir, &tkeys);
if (code) {
{
static char gpbuf[BUFSIZ];
/* read a password from stdin, stop on \n or eof */
- register int i, tc;
+ int i, tc;
memset(gpbuf, 0, sizeof(gpbuf));
for (i = 0; i < (sizeof(gpbuf) - 1); i++) {
tc = fgetc(stdin);
static afs_int32
QuickAuth(struct rx_securityClass **astr, afs_int32 *aindex)
{
- register struct rx_securityClass *tc;
+ struct rx_securityClass *tc;
tc = rxnull_NewClientSecurityObject();
*astr = tc;
*aindex = RX_SECIDX_NULL;
afs_int32 *aindex)
{
struct afsconf_dir *adir = (struct afsconf_dir *) arock;
- register struct rx_securityClass *tclass;
+ struct rx_securityClass *tclass;
LOCK_GLOBAL_MUTEX;
tclass = (struct rx_securityClass *)
struct rx_securityClass *tclass;
afs_int32 kvno;
afs_int32 ticketLen;
- register afs_int32 code;
+ afs_int32 code;
/* first, find the right key and kvno to use */
code = afsconf_GetLatestKey(adir, &kvno, &key);
#ifdef AFS_NT40_ENV
static int GetCellNT(struct afsconf_dir *adir);
#endif
-static int afsconf_Check(register struct afsconf_dir *adir);
-static int afsconf_Touch(register struct afsconf_dir *adir);
+static int afsconf_Check(struct afsconf_dir *adir);
+static int afsconf_Touch(struct afsconf_dir *adir);
static int GetCellUnix(struct afsconf_dir *adir);
-static int afsconf_OpenInternal(register struct afsconf_dir *adir, char *cell,
+static int afsconf_OpenInternal(struct afsconf_dir *adir, char *cell,
char clones[]);
-static int ParseHostLine(char *aline, register struct sockaddr_in *addr,
+static int ParseHostLine(char *aline, struct sockaddr_in *addr,
char *aname, char *aclone);
-static int ParseCellLine(register char *aline, register char *aname,
- register char *alname);
-static int afsconf_CloseInternal(register struct afsconf_dir *adir);
-static int afsconf_Reopen(register struct afsconf_dir *adir);
+static int ParseCellLine(char *aline, char *aname,
+ char *alname);
+static int afsconf_CloseInternal(struct afsconf_dir *adir);
+static int afsconf_Reopen(struct afsconf_dir *adir);
static int SaveKeys(struct afsconf_dir *adir);
#ifndef T_AFSDB
TrimLine(char *abuffer, int abufsize)
{
char tbuffer[256];
- register char *tp;
- register int tc;
+ char *tp;
+ int tc;
tp = abuffer;
while ((tc = *tp)) {
static int
-afsconf_Check(register struct afsconf_dir *adir)
+afsconf_Check(struct afsconf_dir *adir)
{
char tbuffer[256];
#ifdef AFS_NT40_ENV
char *p;
#endif
struct stat tstat;
- register afs_int32 code;
+ afs_int32 code;
#ifdef AFS_NT40_ENV
/* NT client CellServDB has different file name than NT server or Unix */
/* set modtime on file */
static int
-afsconf_Touch(register struct afsconf_dir *adir)
+afsconf_Touch(struct afsconf_dir *adir)
{
char tbuffer[256];
#ifndef AFS_NT40_ENV
}
struct afsconf_dir *
-afsconf_Open(register const char *adir)
+afsconf_Open(const char *adir)
{
- register struct afsconf_dir *tdir;
- register afs_int32 code;
+ struct afsconf_dir *tdir;
+ afs_int32 code;
LOCK_GLOBAL_MUTEX;
/* zero structure and fill in name; rest is done by internal routine */
static int
-afsconf_OpenInternal(register struct afsconf_dir *adir, char *cell,
+afsconf_OpenInternal(struct afsconf_dir *adir, char *cell,
char clones[])
{
afsconf_FILE *tf;
- register char *tp, *bp;
- register struct afsconf_entry *curEntry;
+ char *tp, *bp;
+ struct afsconf_entry *curEntry;
struct afsconf_aliasentry *curAlias;
- register afs_int32 code;
+ afs_int32 code;
afs_int32 i;
char tbuffer[256], tbuf1[256];
struct stat tstat;
* into the appropriate pieces.
*/
static int
-ParseHostLine(char *aline, register struct sockaddr_in *addr, char *aname,
+ParseHostLine(char *aline, struct sockaddr_in *addr, char *aname,
char *aclone)
{
int c1, c2, c3, c4;
- register afs_int32 code;
- register char *tp;
+ afs_int32 code;
+ char *tp;
if (*aline == '[') {
if (aclone)
* into the appropriate pieces.
*/
static int
-ParseCellLine(register char *aline, register char *aname,
- register char *alname)
+ParseCellLine(char *aline, char *aname,
+ char *alname)
{
- register int code;
+ int code;
/* FIXME: length of aname, alname unknown here */
code = sscanf(aline, ">%s %s", aname, alname);
if (code == 1)
int (*aproc) (struct afsconf_cell * cell, void *arock,
struct afsconf_dir * dir), void *arock)
{
- register struct afsconf_entry *tde;
- register afs_int32 code;
+ struct afsconf_entry *tde;
+ afs_int32 code;
LOCK_GLOBAL_MUTEX;
for (tde = adir->entries; tde; tde = tde->next) {
code = (*aproc) (&tde->cellInfo, arock, adir);
void *arock, struct afsconf_dir * dir),
void *arock)
{
- register struct afsconf_aliasentry *tde;
- register afs_int32 code;
+ struct afsconf_aliasentry *tde;
+ afs_int32 code;
LOCK_GLOBAL_MUTEX;
for (tde = adir->alias_entries; tde; tde = tde->next) {
code = (*aproc) (&tde->aliasInfo, arock, adir);
afsconf_GetCellInfo(struct afsconf_dir *adir, char *acellName, char *aservice,
struct afsconf_cell *acellInfo)
{
- register struct afsconf_entry *tce;
+ struct afsconf_entry *tce;
struct afsconf_aliasentry *tcae;
struct afsconf_entry *bestce;
- register afs_int32 i;
+ afs_int32 i;
int tservice;
char *tcell;
int cnLen;
}
int
-afsconf_GetLocalCell(register struct afsconf_dir *adir, char *aname,
+afsconf_GetLocalCell(struct afsconf_dir *adir, char *aname,
afs_int32 alen)
{
static int afsconf_showcell = 0;
}
static int
-afsconf_CloseInternal(register struct afsconf_dir *adir)
+afsconf_CloseInternal(struct afsconf_dir *adir)
{
- register struct afsconf_entry *td, *nd;
+ struct afsconf_entry *td, *nd;
struct afsconf_aliasentry *ta, *na;
- register char *tname;
+ char *tname;
tname = adir->name; /* remember name, since that's all we preserve */
}
static int
-afsconf_Reopen(register struct afsconf_dir *adir)
+afsconf_Reopen(struct afsconf_dir *adir)
{
- register afs_int32 code;
+ afs_int32 code;
code = afsconf_CloseInternal(adir);
if (code)
return code;
afsconf_IntGetKeys(struct afsconf_dir *adir)
{
char tbuffer[256];
- register int fd;
+ int fd;
struct afsconf_keys *tstr;
- register afs_int32 code;
+ afs_int32 code;
#ifdef AFS_NT40_ENV
/* NT client config dir has no KeyFile; don't risk attempting open
int
afsconf_GetKeys(struct afsconf_dir *adir, struct afsconf_keys *astr)
{
- register afs_int32 code;
+ afs_int32 code;
LOCK_GLOBAL_MUTEX;
code = afsconf_Check(adir);
afsconf_GetLatestKey(struct afsconf_dir * adir, afs_int32 * avno,
struct ktc_encryptionKey *akey)
{
- register int i;
+ int i;
int maxa;
- register struct afsconf_key *tk;
- register afs_int32 best;
+ struct afsconf_key *tk;
+ afs_int32 best;
struct afsconf_key *bestk;
- register afs_int32 code;
+ afs_int32 code;
LOCK_GLOBAL_MUTEX;
code = afsconf_Check(adir);
afsconf_GetKey(void *rock, int avno, struct ktc_encryptionKey *akey)
{
struct afsconf_dir *adir = (struct afsconf_dir *) rock;
- register int i, maxa;
- register struct afsconf_key *tk;
- register afs_int32 code;
+ int i, maxa;
+ struct afsconf_key *tk;
+ afs_int32 code;
LOCK_GLOBAL_MUTEX;
code = afsconf_Check(adir);
SaveKeys(struct afsconf_dir *adir)
{
struct afsconf_keys tkeys;
- register int fd;
- register afs_int32 i;
+ int fd;
+ afs_int32 i;
char tbuffer[256];
memcpy(&tkeys, adir->keystr, sizeof(struct afsconf_keys));
afsconf_AddKey(struct afsconf_dir *adir, afs_int32 akvno, char akey[8],
afs_int32 overwrite)
{
- register struct afsconf_keys *tk;
- register struct afsconf_key *tkey;
- register afs_int32 i;
+ struct afsconf_keys *tk;
+ struct afsconf_key *tkey;
+ afs_int32 i;
int foundSlot;
LOCK_GLOBAL_MUTEX;
int
afsconf_DeleteKey(struct afsconf_dir *adir, afs_int32 akvno)
{
- register struct afsconf_keys *tk;
- register struct afsconf_key *tkey;
- register int i;
+ struct afsconf_keys *tk;
+ struct afsconf_key *tkey;
+ int i;
int foundFlag = 0;
LOCK_GLOBAL_MUTEX;
extern afs_int32 afsconf_FindService(const char *aname);
extern const char *afsconf_FindIANAName(const char *aname);
-extern struct afsconf_dir *afsconf_Open(register const char *adir);
+extern struct afsconf_dir *afsconf_Open(const char *adir);
extern int afsconf_CellApply(struct afsconf_dir *adir,
int (*aproc) (struct afsconf_cell * cell,
void *arock,
extern int afsconf_GetCellInfo(struct afsconf_dir *adir, char *acellName,
char *aservice,
struct afsconf_cell *acellInfo);
-extern int afsconf_GetLocalCell(register struct afsconf_dir *adir,
+extern int afsconf_GetLocalCell(struct afsconf_dir *adir,
char *aname, afs_int32 alen);
extern int afsconf_Close(struct afsconf_dir *adir);
extern int afsconf_IntGetKeys(struct afsconf_dir *adir);
extern int afsconf_CheckAuth(void *arock, struct rx_call *acall);
extern int afsconf_GetNoAuthFlag(struct afsconf_dir *adir);
extern void afsconf_SetNoAuthFlag(struct afsconf_dir *adir, int aflag);
-extern int afsconf_DeleteUser(struct afsconf_dir *adir, register char *auser);
+extern int afsconf_DeleteUser(struct afsconf_dir *adir, char *auser);
extern int afsconf_GetNthUser(struct afsconf_dir *adir, afs_int32 an,
char *abuffer, afs_int32 abufferLen);
extern int afsconf_AddUser(struct afsconf_dir *adir, char *aname);
main(int argc, char **argv)
{
char localName[64];
- register afs_int32 code;
- register char *cname;
+ afs_int32 code;
+ char *cname;
struct afsconf_dir *tdir;
struct ktc_principal tserver;
struct ktc_token token;
{
struct ViceIoctl iob;
char tbuffer[MAXPIOCTLTOKENLEN];
- register char *tp;
+ char *tp;
struct ClearToken ct;
- register afs_int32 code;
+ afs_int32 code;
afs_int32 temp;
if (strcmp(aserver->name, "afs") != 0) {
{
struct ViceIoctl iob;
char tbuffer[MAXPIOCTLTOKENLEN];
- register afs_int32 code = 0;
+ afs_int32 code = 0;
int index;
char *stp, *cellp; /* secret token ptr */
struct ClearToken ct;
- register char *tp;
+ char *tp;
afs_int32 temp;
int maxLen; /* biggest ticket we can copy */
int tktLen; /* server ticket length */
{
struct ViceIoctl iob;
char tbuffer[MAXPIOCTLTOKENLEN];
- register afs_int32 code = 0 ;
- register char *tp;
+ afs_int32 code = 0 ;
+ char *tp;
afs_int32 temp, index;
memset(tbuffer, 0, sizeof(tbuffer));
ForgetAll(void)
{
struct ViceIoctl iob;
- register afs_int32 code;
+ afs_int32 code;
int i;
for (i = 0; i < MAXLOCALTOKENS; i++)
*/
static int
-tf_gets(register char *s, int n)
+tf_gets(char *s, int n)
{
- register int count;
+ int count;
if (fd < 0) {
return TKT_FIL_INI;
*/
static int
-tf_read(register char *s, register int n)
+tf_read(char *s, int n)
{
- register int count;
+ int count;
for (count = n; count > 0; --count) {
if (curpos >= sizeof(tfbfr)) {
int count;
char *file = ktc_tkt_string();
int fd;
- register int i;
+ int i;
char zerobuf[1024];
struct stat sbuf;
main(int argc, char **argv)
{
struct afsconf_dir *tdir;
- register afs_int32 code;
+ afs_int32 code;
int i;
char *cp;
}
} else if (strcmp(argv[1], "list") == 0) {
struct afsconf_keys tkeys;
- register int i;
+ int i;
char tbuffer[9];
code = afsconf_GetKeys(tdir, &tkeys);
int
PrintOneCell(struct afsconf_cell *ainfo, void *arock, struct afsconf_dir *adir)
{
- register int i;
+ int i;
long temp;
printf("Cell %s:\n", ainfo->name);
char tbuffer[1024];
struct afsconf_cell theCell;
long i;
- register long code;
+ long code;
char *dirName;
#ifdef AFS_NT40_ENV
void
afsconf_SetNoAuthFlag(struct afsconf_dir *adir, int aflag)
{
- register afs_int32 code;
+ afs_int32 code;
LOCK_GLOBAL_MUTEX;
if (aflag == 0) {
/* deletes a user from the UserList file */
int
-afsconf_DeleteUser(struct afsconf_dir *adir, register char *auser)
+afsconf_DeleteUser(struct afsconf_dir *adir, char *auser)
{
char tbuffer[1024];
char nbuffer[1024];
- register FILE *tf;
- register FILE *nf;
- register int flag;
+ FILE *tf;
+ FILE *nf;
+ int flag;
char tname[64 + 1];
char *tp;
int found;
struct stat tstat;
- register afs_int32 code;
+ afs_int32 code;
LOCK_GLOBAL_MUTEX;
strcompose(tbuffer, sizeof tbuffer, adir->name, "/",
afs_int32 abufferLen)
{
char tbuffer[256];
- register FILE *tf;
+ FILE *tf;
char tname[64 + 1];
- register char *tp;
- register int flag;
- register afs_int32 code;
+ char *tp;
+ int flag;
+ afs_int32 code;
LOCK_GLOBAL_MUTEX;
strcompose(tbuffer, sizeof tbuffer, adir->name, "/",
/* returns true iff user is in the UserList file */
static int
-FindUser(struct afsconf_dir *adir, register char *auser)
+FindUser(struct afsconf_dir *adir, char *auser)
{
char tbuffer[256];
- register bufio_p bp;
+ bufio_p bp;
char tname[64 + 1];
- register int flag;
- register afs_int32 code;
+ int flag;
+ afs_int32 code;
int rc;
strcompose(tbuffer, sizeof tbuffer, adir->name, "/", AFSDIR_ULIST_FILE,
afsconf_AddUser(struct afsconf_dir *adir, char *aname)
{
FILE *tf;
- register afs_int32 code;
+ afs_int32 code;
char tbuffer[256];
LOCK_GLOBAL_MUTEX;
afs_int32
afsconf_SuperUser(struct afsconf_dir *adir, struct rx_call *acall, char *namep)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
+ struct rx_connection *tconn;
+ afs_int32 code;
int flag;
LOCK_GLOBAL_MUTEX;
*/
static int
-VerifyEntries(register struct afsconf_cell *aci)
+VerifyEntries(struct afsconf_cell *aci)
{
- register int i;
- register struct hostent *th;
+ int i;
+ struct hostent *th;
for (i = 0; i < aci->numServers; i++) {
if (aci->hostAddr[i].sin_addr.s_addr == 0) {
const char *apath,
struct afsconf_cell *acellInfo, char clones[])
{
- register afs_int32 code;
- register int fd;
+ afs_int32 code;
+ int fd;
char tbuffer[1024];
- register FILE *tf;
- register afs_int32 i;
+ FILE *tf;
+ afs_int32 i;
LOCK_GLOBAL_MUTEX;
/* write ThisCell file */
/* Remember the name of the process, if any, that failed last */
static void
-RememberProcName(register struct bnode_proc *ap)
+RememberProcName(struct bnode_proc *ap)
{
- register struct bnode *tbnodep;
+ struct bnode *tbnodep;
tbnodep = ap->bnode;
if (tbnodep->lastErrorName) {
* be stored.
*/
int
-bnode_CoreName(register struct bnode *abnode, char *acoreName, char *abuffer)
+bnode_CoreName(struct bnode *abnode, char *acoreName, char *abuffer)
{
if (DoCore) {
strcpy(abuffer, DoCore);
/* save core file, if any */
static void
-SaveCore(register struct bnode *abnode, register struct bnode_proc
+SaveCore(struct bnode *abnode, struct bnode_proc
*aproc)
{
char tbuffer[256];
struct stat tstat;
- register afs_int32 code = 0;
+ afs_int32 code = 0;
char *corefile = NULL;
#ifdef BOZO_SAVE_CORES
struct timeval Start;
}
int
-bnode_GetString(register struct bnode *abnode, register char *abuffer,
- register afs_int32 alen)
+bnode_GetString(struct bnode *abnode, char *abuffer,
+ afs_int32 alen)
{
return BOP_GETSTRING(abnode, abuffer, alen);
}
int
-bnode_GetParm(register struct bnode *abnode, register afs_int32 aindex,
- register char *abuffer, afs_int32 alen)
+bnode_GetParm(struct bnode *abnode, afs_int32 aindex,
+ char *abuffer, afs_int32 alen)
{
return BOP_GETPARM(abnode, aindex, abuffer, alen);
}
int
-bnode_GetStat(register struct bnode *abnode, register afs_int32 * astatus)
+bnode_GetStat(struct bnode *abnode, afs_int32 * astatus)
{
return BOP_GETSTAT(abnode, astatus);
}
int
-bnode_RestartP(register struct bnode *abnode)
+bnode_RestartP(struct bnode *abnode)
{
return BOP_RESTARTP(abnode);
}
static int
-bnode_Check(register struct bnode *abnode)
+bnode_Check(struct bnode *abnode)
{
if (abnode->flags & BNODE_WAIT) {
abnode->flags &= ~BNODE_WAIT;
/* tell if an instance has a core file */
int
-bnode_HasCore(register struct bnode *abnode)
+bnode_HasCore(struct bnode *abnode)
{
return BOP_HASCORE(abnode);
}
int
bnode_WaitAll(void)
{
- register struct bnode *tb;
- register afs_int32 code;
+ struct bnode *tb;
+ afs_int32 code;
afs_int32 stat;
retry:
/* wait until bnode status is correct */
int
-bnode_WaitStatus(register struct bnode *abnode, int astatus)
+bnode_WaitStatus(struct bnode *abnode, int astatus)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 stat;
bnode_Hold(abnode);
}
int
-bnode_SetStat(register struct bnode *abnode, register int agoal)
+bnode_SetStat(struct bnode *abnode, int agoal)
{
abnode->goal = agoal;
bnode_Check(abnode);
}
int
-bnode_SetGoal(register struct bnode *abnode, register int agoal)
+bnode_SetGoal(struct bnode *abnode, int agoal)
{
abnode->goal = agoal;
bnode_Check(abnode);
}
int
-bnode_SetFileGoal(register struct bnode *abnode, register int agoal)
+bnode_SetFileGoal(struct bnode *abnode, int agoal)
{
if (abnode->fileGoal == agoal)
return 0; /* already done */
int
bnode_ApplyInstance(int (*aproc) (struct bnode *tb, void *), void *arock)
{
- register struct bnode *tb, *nb;
- register afs_int32 code;
+ struct bnode *tb, *nb;
+ afs_int32 code;
for (tb = allBnodes; tb; tb = nb) {
nb = tb->next;
}
struct bnode *
-bnode_FindInstance(register char *aname)
+bnode_FindInstance(char *aname)
{
- register struct bnode *tb;
+ struct bnode *tb;
for (tb = allBnodes; tb; tb = tb->next) {
if (!strcmp(tb->name, aname))
}
static struct bnode_type *
-FindType(register char *aname)
+FindType(char *aname)
{
- register struct bnode_type *tt;
+ struct bnode_type *tt;
for (tt = allTypes; tt; tt = tt->next) {
if (!strcmp(tt->name, aname))
int
bnode_Register(char *atype, struct bnode_ops *aprocs, int anparms)
{
- register struct bnode_type *tt;
+ struct bnode_type *tt;
for (tt = allTypes; tt; tt = tt->next) {
if (!strcmp(tt->name, atype))
int
bnode_DeleteName(char *ainstance)
{
- register struct bnode *tb;
+ struct bnode *tb;
tb = bnode_FindInstance(ainstance);
if (!tb)
}
int
-bnode_Hold(register struct bnode *abnode)
+bnode_Hold(struct bnode *abnode)
{
abnode->refCount++;
return 0;
}
int
-bnode_Release(register struct bnode *abnode)
+bnode_Release(struct bnode *abnode)
{
abnode->refCount--;
if (abnode->refCount == 0 && abnode->flags & BNODE_DELETE) {
}
int
-bnode_Delete(register struct bnode *abnode)
+bnode_Delete(struct bnode *abnode)
{
- register afs_int32 code;
- register struct bnode **lb, *ub;
+ afs_int32 code;
+ struct bnode **lb, *ub;
afs_int32 temp;
if (abnode->refCount != 0) {
/* function to tell if there's a timeout coming up */
int
-bnode_PendingTimeout(register struct bnode *abnode)
+bnode_PendingTimeout(struct bnode *abnode)
{
return (abnode->flags & BNODE_NEEDTIMEOUT);
}
/* function called to set / clear periodic bnode wakeup times */
int
-bnode_SetTimeout(register struct bnode *abnode, afs_int32 atimeout)
+bnode_SetTimeout(struct bnode *abnode, afs_int32 atimeout)
{
if (atimeout != 0) {
abnode->nextTimeout = FT_ApproxTime() + atimeout;
/* used by new bnode creation code to format bnode header */
int
-bnode_InitBnode(register struct bnode *abnode, struct bnode_ops *abnodeops,
+bnode_InitBnode(struct bnode *abnode, struct bnode_ops *abnodeops,
char *aname)
{
struct bnode **lb, *nb;
}
static int
-DeleteProc(register struct bnode_proc *abproc)
+DeleteProc(struct bnode_proc *abproc)
{
- register struct bnode_proc **pb, *tb;
+ struct bnode_proc **pb, *tb;
struct bnode_proc *nb;
for (pb = &allProcs, tb = *pb; tb; pb = &tb->next, tb = nb) {
static void *
bproc(void *unused)
{
- register afs_int32 code;
- register struct bnode *tb;
- register afs_int32 temp;
- register struct bnode_proc *tp;
+ afs_int32 code;
+ struct bnode *tb;
+ afs_int32 temp;
+ struct bnode_proc *tp;
struct bnode *nb;
int options; /* must not be register */
struct timeval tv;
}
static afs_int32
-SendNotifierData(register int fd, register struct bnode_proc *tp)
+SendNotifierData(int fd, struct bnode_proc *tp)
{
- register struct bnode *tb = tp->bnode;
+ struct bnode *tb = tp->bnode;
char buffer[1000], *bufp = buffer, *buf1;
- register int len;
+ int len;
/*
* First sent out the bnode_proc struct
bnode_Init(void)
{
PROCESS junk;
- register afs_int32 code;
+ afs_int32 code;
struct sigaction newaction;
static int initDone = 0;
/* free token list returned by parseLine */
int
-bnode_FreeTokens(register struct bnode_token *alist)
+bnode_FreeTokens(struct bnode_token *alist)
{
- register struct bnode_token *nlist;
+ struct bnode_token *nlist;
for (; alist; alist = nlist) {
nlist = alist->next;
free(alist->key);
bnode_ParseLine(char *aline, struct bnode_token **alist)
{
char tbuffer[256];
- register char *tptr = NULL;
+ char *tptr = NULL;
int inToken;
struct bnode_token *first, *last;
- register struct bnode_token *ttok;
- register int tc;
+ struct bnode_token *ttok;
+ int tc;
inToken = 0; /* not copying token chars at start */
first = (struct bnode_token *)0;
}
int
-bnode_StopProc(register struct bnode_proc *aproc, int asignal)
+bnode_StopProc(struct bnode_proc *aproc, int asignal)
{
- register int code;
+ int code;
if (!(aproc->flags & BPROC_STARTED) || (aproc->flags & BPROC_EXITED))
return BZNOTACTIVE;
}
int
-bnode_Deactivate(register struct bnode *abnode)
+bnode_Deactivate(struct bnode *abnode)
{
- register struct bnode **pb, *tb;
+ struct bnode **pb, *tb;
struct bnode *nb;
if (!(abnode->flags & BNODE_ACTIVE))
return BZNOTACTIVE;
#define FSSDTIME (30 * 60) /* seconds */
/* calls back up to the generic bnode layer */
-extern int bnode_SetTimeout(register struct bnode *abnode, afs_int32 atimeout);
+extern int bnode_SetTimeout(struct bnode *abnode, afs_int32 atimeout);
extern int bnode_Init(void);
extern int bnode_NewProc(struct bnode *abnode, char *aexecString, char *coreName, struct bnode_proc **aproc);
-extern int bnode_InitBnode(register struct bnode *abnode, struct bnode_ops *abnodeops, char *aname);
+extern int bnode_InitBnode(struct bnode *abnode, struct bnode_ops *abnodeops, char *aname);
extern afs_int32 bnode_Create(char *atype, char *ainstance, struct bnode ** abp, char *ap1, char *ap2, char *ap3, char *ap4, char *ap5, char *notifier, int fileGoal, int rewritefile);
-extern struct bnode *bnode_FindInstance(register char *aname);
-extern int bnode_WaitStatus(register struct bnode *abnode, int astatus);
-extern int bnode_SetStat(register struct bnode *abnode, register int agoal);
+extern struct bnode *bnode_FindInstance(char *aname);
+extern int bnode_WaitStatus(struct bnode *abnode, int astatus);
+extern int bnode_SetStat(struct bnode *abnode, int agoal);
#include <afs/kautils.h>
#include <afs/volser.h>
-static int IStatServer(register struct cmd_syndesc *as, int int32p);
-static int DoStat(char *aname, register struct rx_connection *aconn,
+static int IStatServer(struct cmd_syndesc *as, int int32p);
+static int DoStat(char *aname, struct rx_connection *aconn,
int aint32p, int firstTime);
#include "bosint.h"
static afs_int32
GetPartitionID(char *aname)
{
- register char tc;
+ char tc;
char ascii[3];
tc = *aname;
DateOf(afs_int32 atime)
{
static char tbuffer[30];
- register char *tp;
+ char *tp;
time_t t = (time_t) atime;
tp = ctime(&t);
if (tp) {
char *hostname;
char *cellname = NULL;
const char *confdir;
- register afs_int32 code;
- register struct rx_connection *tconn;
+ afs_int32 code;
+ struct rx_connection *tconn;
afs_int32 addr;
struct afsconf_dir *tdir = NULL;
afsconf_secflags secFlags;
static int
SetAuth(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
- register struct rx_connection *tconn;
+ afs_int32 code;
+ struct rx_connection *tconn;
afs_int32 flag;
- register char *tp;
+ char *tp;
tconn = GetConn(as, 0);
tp = as->parms[1].items->data;
static int
ComputeDestDir(char *aname, char *adir, char *aresult, afs_int32 alen)
{
- register char *tp;
+ char *tp;
strcpy(aresult, adir);
tp = strrchr(aname, '/');
/* copy data from fd afd to rx call acall */
static int
-CopyBytes(int afd, register struct rx_call *acall)
+CopyBytes(int afd, struct rx_call *acall)
{
- register afs_int32 code;
- register afs_int32 len;
+ afs_int32 code;
+ afs_int32 len;
char tbuffer[256];
while (1) {
}
static int
-Prune(register struct cmd_syndesc *as, void *arock)
+Prune(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
- register struct rx_connection *tconn;
- register afs_int32 flags;
+ afs_int32 code;
+ struct rx_connection *tconn;
+ afs_int32 flags;
tconn = GetConn(as, 0);
flags = 0;
}
static int
-Exec(register struct cmd_syndesc *as, void *arock)
+Exec(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
+ struct rx_connection *tconn;
+ afs_int32 code;
tconn = GetConn(as, 0);
code = BOZO_Exec(tconn, as->parms[1].items->data);
}
static int
-GetDate(register struct cmd_syndesc *as, void *arock)
+GetDate(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
char tbuffer[256];
char destDir[256];
afs_int32 time, bakTime, oldTime;
- register struct rx_connection *tconn;
- register struct cmd_item *ti;
+ struct rx_connection *tconn;
+ struct cmd_item *ti;
tconn = GetConn(as, 0);
if (!as->parms[1].items) {
}
static int
-UnInstall(register struct cmd_syndesc *as, void *arock)
+UnInstall(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
char tbuffer[256];
char destDir[256];
- register struct cmd_item *ti;
- register struct rx_connection *tconn;
+ struct cmd_item *ti;
+ struct rx_connection *tconn;
tconn = GetConn(as, 0);
if (!as->parms[1].items) {
{
char buffer[500];
char *tp;
- register afs_int32 code;
+ afs_int32 code;
struct bozo_status istatus;
tp = buffer;
Install(struct cmd_syndesc *as, void *arock)
{
struct rx_connection *tconn;
- register afs_int32 code;
- register struct cmd_item *ti;
+ afs_int32 code;
+ struct cmd_item *ti;
struct stat tstat;
char tbuffer[256];
int fd;
static int
Shutdown(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
- register struct cmd_item *ti;
+ struct rx_connection *tconn;
+ afs_int32 code;
+ struct cmd_item *ti;
tconn = GetConn(as, 0);
if (as->parms[1].items == 0) {
static int
BlockScannerCmd(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
struct rx_connection *tconn;
char BlockCommand[] = "/usr/afs/bin/scanner -block";
static int
UnBlockScannerCmd(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
struct rx_connection *tconn;
char UnBlockCommand[] = "/usr/afs/bin/scanner -unblock";
static int
GetRestartCmd(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
struct ktime generalTime, newBinaryTime;
char messageBuffer[256];
struct rx_connection *tconn;
SetRestartCmd(struct cmd_syndesc *as, void *arock)
{
afs_int32 count = 0;
- register afs_int32 code;
+ afs_int32 code;
struct ktime restartTime;
afs_int32 type = 0 ;
struct rx_connection *tconn;
static int
Startup(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
- register struct cmd_item *ti;
+ struct rx_connection *tconn;
+ afs_int32 code;
+ struct cmd_item *ti;
tconn = GetConn(as, 0);
if (as->parms[1].items == 0) {
static int
Restart(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
- register struct cmd_item *ti;
+ struct rx_connection *tconn;
+ afs_int32 code;
+ struct cmd_item *ti;
tconn = GetConn(as, 0);
if (as->parms[2].items) {
static int
SetCellName(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
+ struct rx_connection *tconn;
+ afs_int32 code;
tconn = GetConn(as, 0);
code = BOZO_SetCellName(tconn, as->parms[1].items->data);
}
static int
-AddHost(register struct cmd_syndesc *as, void *arock)
+AddHost(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
- register struct cmd_item *ti;
+ struct rx_connection *tconn;
+ afs_int32 code;
+ struct cmd_item *ti;
char name[MAXHOSTCHARS];
tconn = GetConn(as, 0);
}
static int
-RemoveHost(register struct cmd_syndesc *as, void *arock)
+RemoveHost(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
- register struct cmd_item *ti;
+ struct rx_connection *tconn;
+ afs_int32 code;
+ struct cmd_item *ti;
tconn = GetConn(as, 0);
for (ti = as->parms[1].items; ti; ti = ti->next) {
}
static int
-ListHosts(register struct cmd_syndesc *as, void *arock)
+ListHosts(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
+ struct rx_connection *tconn;
+ afs_int32 code;
char tbuffer[256];
char *tp;
- register afs_int32 i;
+ afs_int32 i;
tp = tbuffer;
tconn = GetConn(as, 0);
}
static int
-AddKey(register struct cmd_syndesc *as, void *arock)
+AddKey(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
+ struct rx_connection *tconn;
+ afs_int32 code;
struct ktc_encryptionKey tkey;
afs_int32 temp;
char *tcell;
}
static int
-RemoveKey(register struct cmd_syndesc *as, void *arock)
+RemoveKey(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
+ struct rx_connection *tconn;
+ afs_int32 code;
afs_int32 temp;
- register struct cmd_item *ti;
+ struct cmd_item *ti;
tconn = GetConn(as, 0);
for (ti = as->parms[1].items; ti; ti = ti->next) {
}
static int
-ListKeys(register struct cmd_syndesc *as, void *arock)
+ListKeys(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
+ struct rx_connection *tconn;
+ afs_int32 code;
struct ktc_encryptionKey tkey;
afs_int32 kvno;
struct bozo_keyInfo keyInfo;
int everWorked;
- register afs_int32 i;
+ afs_int32 i;
tconn = GetConn(as, 1);
everWorked = 0;
}
static int
-AddSUser(register struct cmd_syndesc *as, void *arock)
+AddSUser(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
+ struct rx_connection *tconn;
+ afs_int32 code;
int failed;
- register struct cmd_item *ti;
+ struct cmd_item *ti;
failed = 0;
tconn = GetConn(as, 0);
}
static int
-RemoveSUser(register struct cmd_syndesc *as, void *arock)
+RemoveSUser(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register struct cmd_item *ti;
- register afs_int32 code;
+ struct rx_connection *tconn;
+ struct cmd_item *ti;
+ afs_int32 code;
int failed;
failed = 0;
#define NPERLINE 10 /* dudes to print per line */
static int
-ListSUsers(register struct cmd_syndesc *as, void *arock)
+ListSUsers(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register int i;
- register afs_int32 code;
+ struct rx_connection *tconn;
+ int i;
+ afs_int32 code;
char tbuffer[256];
char *tp;
int lastNL, printGreeting;
}
static int
-StatServer(register struct cmd_syndesc *as, void *arock)
+StatServer(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
- register int i;
+ struct rx_connection *tconn;
+ afs_int32 code;
+ int i;
char ibuffer[BOZO_BSSIZE];
char *tp;
int int32p;
}
static int
-CreateServer(register struct cmd_syndesc *as, void *arock)
+CreateServer(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
+ struct rx_connection *tconn;
+ afs_int32 code;
char *parms[6];
- register struct cmd_item *ti;
- register int i;
+ struct cmd_item *ti;
+ int i;
char *type, *name, *notifier = NONOTIFIER;
tconn = GetConn(as, 0);
}
static int
-DeleteServer(register struct cmd_syndesc *as, void *arock)
+DeleteServer(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
- register struct cmd_item *ti;
+ struct rx_connection *tconn;
+ afs_int32 code;
+ struct cmd_item *ti;
code = 0;
tconn = GetConn(as, 0);
}
static int
-StartServer(register struct cmd_syndesc *as, void *arock)
+StartServer(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
- register struct cmd_item *ti;
+ struct rx_connection *tconn;
+ afs_int32 code;
+ struct cmd_item *ti;
code = 0;
tconn = GetConn(as, 0);
}
static int
-StopServer(register struct cmd_syndesc *as, void *arock)
+StopServer(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
- register struct cmd_item *ti;
+ struct rx_connection *tconn;
+ afs_int32 code;
+ struct cmd_item *ti;
code = 0;
tconn = GetConn(as, 0);
char * atmpDir, char * orphans, int dafs,
struct MRAFSSalvageParms * mrafsParm)
{
- register afs_int32 code;
+ afs_int32 code;
char *parms[6];
char buffer;
char tbuffer[BOZO_BSSIZE];
}
static int
-GetLogCmd(register struct cmd_syndesc *as, void *arock)
+GetLogCmd(struct cmd_syndesc *as, void *arock)
{
struct rx_connection *tconn;
- register struct rx_call *tcall;
- register afs_int32 code;
+ struct rx_call *tcall;
+ afs_int32 code;
char buffer;
int error;
static int
SalvageCmd(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
- register afs_int32 code, rc, i;
+ struct rx_connection *tconn;
+ afs_int32 code, rc, i;
char *outName;
char tname[BOZO_BSSIZE];
afs_int32 newID;
}
static int
-IStatServer(register struct cmd_syndesc *as, int int32p)
+IStatServer(struct cmd_syndesc *as, int int32p)
{
- register struct rx_connection *tconn;
- register struct cmd_item *ti;
+ struct rx_connection *tconn;
+ struct cmd_item *ti;
int firstTime = 1;
tconn = GetConn(as, 0);
static int
DoStat(IN char *aname,
- IN register struct rx_connection *aconn,
+ IN struct rx_connection *aconn,
IN int aint32p,
IN int firstTime) /* true iff first instance in cmd */
{
afs_int32 temp;
char buffer[500];
- register afs_int32 code;
- register afs_int32 i;
+ afs_int32 code;
+ afs_int32 i;
struct bozo_status istatus;
char *tp;
char *is1, *is2, *is3, *is4; /* instance strings */
static int
GetRestrict(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
+ struct rx_connection *tconn;
afs_int32 code, val;
tconn = GetConn(as, 0);
static int
SetRestrict(struct cmd_syndesc *as, void *arock)
{
- register struct rx_connection *tconn;
+ struct rx_connection *tconn;
afs_int32 code, val;
tconn = GetConn(as, 0);
}
static void
-add_std_args(register struct cmd_syndesc *ts)
+add_std_args(struct cmd_syndesc *ts)
{
cmd_Seek(ts, ADDPARMOFFSET);
/* + 0 */ cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name");
int
main(int argc, char **argv)
{
- register afs_int32 code;
- register struct cmd_syndesc *ts;
+ afs_int32 code;
+ struct cmd_syndesc *ts;
extern int afsconf_SawCell;
#ifdef AFS_AIX32_ENV
main(int argc, char **argv)
{
struct afsconf_dir *tdir;
- register afs_int32 code;
+ afs_int32 code;
if (argc == 1) {
printf("bos_util: usage is 'bos_util <opcode> options, e.g.\n");
} else if (strcmp(argv[1], "adddes") == 0) {
struct ktc_encryptionKey tkey;
int kvno;
- register afs_int32 code;
+ afs_int32 code;
char buf[BUFSIZ], ver[BUFSIZ];
if (argc != 3) {
}
} else if (strcmp(argv[1], "list") == 0) {
struct afsconf_keys tkeys;
- register int i;
+ int i;
unsigned char tbuffer[9];
code = afsconf_GetKeys(tdir, &tkeys);
afs_int32
SBOZO_GetRestartTime(struct rx_call *acall, afs_int32 atype, struct bozo_netKTime *aktime)
{
- register afs_int32 code;
+ afs_int32 code;
code = 0; /* assume success */
switch (atype) {
afs_int32
SBOZO_SetRestartTime(struct rx_call *acall, afs_int32 atype, struct bozo_netKTime *aktime)
{
- register afs_int32 code;
+ afs_int32 code;
char caller[MAXKTCNAMELEN];
/* check for proper permissions */
}
afs_int32
-SBOZO_UnInstall(struct rx_call *acall, register char *aname)
+SBOZO_UnInstall(struct rx_call *acall, char *aname)
{
char *filepath;
char fpOld[AFSDIR_PATH_MAX], fpBak[AFSDIR_PATH_MAX];
static void
SaveOldFiles(char *aname)
{
- register afs_int32 code;
+ afs_int32 code;
char bbuffer[AFSDIR_PATH_MAX], obuffer[AFSDIR_PATH_MAX];
struct stat tstat;
- register afs_int32 now;
+ afs_int32 now;
afs_int32 oldTime, bakTime;
strcpy(bbuffer, aname);
SBOZO_SetCellName(struct rx_call *acall, char *aname)
{
struct afsconf_cell tcell;
- register afs_int32 code;
+ afs_int32 code;
char caller[MAXKTCNAMELEN];
char clones[MAXHOSTSPERCELL];
afs_int32
SBOZO_GetCellName(struct rx_call *acall, char **aname)
{
- register afs_int32 code;
+ afs_int32 code;
char tname[MAXCELLCHARS];
code = afsconf_GetLocalCell(bozo_confdir, tname, sizeof(tname));
afs_int32
SBOZO_GetCellHost(struct rx_call *acall, afs_uint32 awhich, char **aname)
{
- register afs_int32 code;
+ afs_int32 code;
struct afsconf_cell tcell;
- register char *tp;
+ char *tp;
char clones[MAXHOSTSPERCELL];
code =
afs_int32
SBOZO_DeleteCellHost(struct rx_call *acall, char *aname)
{
- register afs_int32 code;
+ afs_int32 code;
struct afsconf_cell tcell;
afs_int32 which;
- register int i;
+ int i;
char caller[MAXKTCNAMELEN];
char clones[MAXHOSTSPERCELL];
afs_int32
SBOZO_AddCellHost(struct rx_call *acall, char *aname)
{
- register afs_int32 code;
+ afs_int32 code;
struct afsconf_cell tcell;
afs_int32 which;
- register int i;
+ int i;
char caller[MAXKTCNAMELEN];
char clones[MAXHOSTSPERCELL];
char *n;
struct bozo_key *akey, struct bozo_keyInfo *akeyinfo)
{
struct afsconf_keys tkeys;
- register afs_int32 code;
+ afs_int32 code;
struct stat tstat;
int noauth = 0;
char caller[MAXKTCNAMELEN];
afs_int32
SBOZO_AddKey(struct rx_call *acall, afs_int32 an, struct bozo_key *akey)
{
- register afs_int32 code;
+ afs_int32 code;
char caller[MAXKTCNAMELEN];
rxkad_level enc_level = rxkad_clear;
int noauth;
}
afs_int32
-SBOZO_SetNoAuthFlag(register struct rx_call *acall, afs_int32 aflag)
+SBOZO_SetNoAuthFlag(struct rx_call *acall, afs_int32 aflag)
{
- register afs_int32 code = 0;
+ afs_int32 code = 0;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(bozo_confdir, acall, caller)) {
afs_int32
SBOZO_DeleteKey(struct rx_call *acall, afs_int32 an)
{
- register afs_int32 code;
+ afs_int32 code;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(bozo_confdir, acall, caller)) {
afs_int32
-SBOZO_ListSUsers(struct rx_call *acall, afs_int32 an, register char **aname)
+SBOZO_ListSUsers(struct rx_call *acall, afs_int32 an, char **aname)
{
- register afs_int32 code;
- register char *tp;
+ afs_int32 code;
+ char *tp;
tp = *aname = (char *)malloc(256);
*tp = 0; /* in case getnthuser doesn't null-terminate the string */
afs_int32
SBOZO_AddSUser(struct rx_call *acall, char *aname)
{
- register afs_int32 code;
+ afs_int32 code;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(bozo_confdir, acall, caller)) {
afs_int32
SBOZO_DeleteSUser(struct rx_call *acall, char *aname)
{
- register afs_int32 code;
+ afs_int32 code;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(bozo_confdir, acall, caller)) {
}
afs_int32
-SBOZO_WaitAll(register struct rx_call *acall)
+SBOZO_WaitAll(struct rx_call *acall)
{
- register afs_int32 code;
+ afs_int32 code;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(bozo_confdir, acall, caller)) {
afs_int32
SBOZO_DeleteBnode(struct rx_call *acall, char *ainstance)
{
- register afs_int32 code;
+ afs_int32 code;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(bozo_confdir, acall, caller)) {
}
static int
-swproc(register struct bnode *abnode, void *arock)
+swproc(struct bnode *abnode, void *arock)
{
if (abnode->goal == BSTAT_NORMAL)
return 0; /* this one's not shutting down */
SBOZO_ShutdownAll(struct rx_call *acall)
{
/* iterate over all bnodes, setting the status to temporarily disabled */
- register afs_int32 code;
+ afs_int32 code;
char caller[MAXKTCNAMELEN];
/* check for authorization */
afs_int32
SBOZO_RestartAll(struct rx_call *acall)
{
- register afs_int32 code;
+ afs_int32 code;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(bozo_confdir, acall, caller)) {
afs_int32
SBOZO_ReBozo(struct rx_call *acall)
{
- register afs_int32 code;
+ afs_int32 code;
char caller[MAXKTCNAMELEN];
/* acall is null if called internally to restart bosserver */
afs_int32
SBOZO_StartupAll(struct rx_call *acall)
{
- register afs_int32 code;
+ afs_int32 code;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(bozo_confdir, acall, caller)) {
}
afs_int32
-SBOZO_Restart(struct rx_call *acall, register char *ainstance)
+SBOZO_Restart(struct rx_call *acall, char *ainstance)
{
- register struct bnode *tb;
- register afs_int32 code;
+ struct bnode *tb;
+ afs_int32 code;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(bozo_confdir, acall, caller)) {
afs_int32
SBOZO_SetTStatus(struct rx_call *acall, char *ainstance, afs_int32 astatus)
{
- register struct bnode *tb;
- register afs_int32 code;
+ struct bnode *tb;
+ afs_int32 code;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(bozo_confdir, acall, caller)) {
afs_int32
SBOZO_SetStatus(struct rx_call *acall, char *ainstance, afs_int32 astatus)
{
- register struct bnode *tb;
- register afs_int32 code;
+ struct bnode *tb;
+ afs_int32 code;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(bozo_confdir, acall, caller)) {
SBOZO_GetStatus(struct rx_call *acall, char *ainstance, afs_int32 *astat,
char **astatDescr)
{
- register struct bnode *tb;
- register afs_int32 code;
+ struct bnode *tb;
+ afs_int32 code;
tb = bnode_FindInstance(ainstance);
if (!tb) {
afs_int32
SBOZO_Prune(struct rx_call *acall, afs_int32 aflags)
{
- register afs_int32 code;
+ afs_int32 code;
DIR *dirp;
- register struct dirent *tde;
- register int i;
+ struct dirent *tde;
+ int i;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(bozo_confdir, acall, caller)) {
OUT char **atype,
OUT struct bozo_status *astatus)
{
- register struct bnode *tb;
+ struct bnode *tb;
tb = bnode_FindInstance(ainstance);
*atype = (char *)malloc(BOZO_BSSIZE);
afs_int32 anum,
char **aparm)
{
- register struct bnode *tb;
- register char *tp;
- register afs_int32 code;
+ struct bnode *tb;
+ char *tp;
+ afs_int32 code;
tp = (char *)malloc(BOZO_BSSIZE);
*aparm = tp;
}
afs_int32
-SBOZO_GetLog(register struct rx_call *acall, char *aname)
+SBOZO_GetLog(struct rx_call *acall, char *aname)
{
- register afs_int32 code;
+ afs_int32 code;
FILE *tfile;
int tc;
char *logpath;
SBOZO_GetInstanceStrings(struct rx_call *acall, char *abnodeName,
char **as1, char **as2, char **as3, char **as4)
{
- register struct bnode *tb;
+ struct bnode *tb;
*as2 = (char *)malloc(1);
**as2 = 0;
MakeDir(const char *adir)
{
struct stat tstat;
- register afs_int32 code;
+ afs_int32 code;
if (stat(adir, &tstat) < 0 || (tstat.st_mode & S_IFMT) != S_IFDIR) {
int reqPerm;
unlink(adir);
/* strip the \\n from the end of the line, if it is present */
static int
-StripLine(register char *abuffer)
+StripLine(char *abuffer)
{
- register char *tp;
+ char *tp;
tp = abuffer + strlen(abuffer); /* starts off pointing at the null */
if (tp == abuffer)
/* write one bnode's worth of entry into the file */
static int
-bzwrite(register struct bnode *abnode, void *arock)
+bzwrite(struct bnode *abnode, void *arock)
{
- register struct bztemp *at = (struct bztemp *)arock;
- register int i;
+ struct bztemp *at = (struct bztemp *)arock;
+ int i;
char tbuffer[BOZO_BSSIZE];
- register afs_int32 code;
+ afs_int32 code;
if (abnode->notifier)
fprintf(at->file, "bnode %s %s %d %s\n", abnode->type->name,
int
ReadBozoFile(char *aname)
{
- register FILE *tfile;
+ FILE *tfile;
char tbuffer[BOZO_BSSIZE];
- register char *tp;
+ char *tp;
char *instp, *typep, *notifier, *notp;
- register afs_int32 code;
+ afs_int32 code;
afs_int32 ktmask, ktday, kthour, ktmin, ktsec;
afs_int32 i, goal;
struct bnode *tb;
int
WriteBozoFile(char *aname)
{
- register FILE *tfile;
+ FILE *tfile;
char tbuffer[AFSDIR_PATH_MAX];
- register afs_int32 code;
+ afs_int32 code;
struct bztemp btemp;
if (!aname)
}
static int
-bdrestart(register struct bnode *abnode, void *arock)
+bdrestart(struct bnode *abnode, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
if (abnode->fileGoal != BSTAT_NORMAL || abnode->goal != BSTAT_NORMAL)
return 0; /* don't restart stopped bnodes */
static void *
BozoDaemon(void *unused)
{
- register afs_int32 now;
+ afs_int32 now;
/* now initialize the values */
bozo_newKTs = 1;
main(int argc, char **argv, char **envp)
{
struct rx_service *tservice;
- register afs_int32 code;
+ afs_int32 code;
struct afsconf_dir *tdir;
int noAuth = 0;
int i;
Note that the computation of when we should run again is made in procexit
and/or create procs. This guy only schedules the sleep */
int
-ScheduleCronBnode(register struct cronbnode *abnode)
+ScheduleCronBnode(struct cronbnode *abnode)
{
- register afs_int32 code;
- register afs_int32 temp;
+ afs_int32 code;
+ afs_int32 temp;
struct bnode_proc *tp;
/* If this proc is shutdown, tell bproc() to no longer run this job */
cron_timeout(struct bnode *bn)
{
struct cronbnode *abnode = (struct cronbnode *)bn;
- register afs_int32 temp;
- register afs_int32 code;
+ afs_int32 temp;
+ afs_int32 code;
struct bnode_proc *tp;
if (!abnode->running) {
cron_getstat(struct bnode *bn, afs_int32 * astatus)
{
struct cronbnode *abnode = (struct cronbnode *)bn;
- register afs_int32 temp;
+ afs_int32 temp;
if (abnode->waitingForShutdown)
temp = BSTAT_SHUTTINGDOWN;
else if (abnode->b.goal == 0)
{
struct ezbnode *abnode = (struct ezbnode *)bn;
struct bnode_token *tt;
- register afs_int32 code;
+ afs_int32 code;
struct stat tstat;
code = bnode_ParseLine(abnode->command, &tt);
{
struct ezbnode *abnode = (struct ezbnode *)bn;
- register afs_int32 temp;
+ afs_int32 temp;
if (abnode->waitingForShutdown)
temp = BSTAT_SHUTTINGDOWN;
else if (abnode->running)
struct ezbnode *abnode = (struct ezbnode *)bn;
struct bnode_proc *tp;
- register afs_int32 code;
+ afs_int32 code;
if (abnode->waitingForShutdown)
return BZBUSY;
struct ezbnode *abnode = (struct ezbnode *)bn;
/* process has exited */
- register afs_int32 code;
+ afs_int32 code;
abnode->waitingForShutdown = 0;
abnode->running = 0;
{
struct fsbnode *abnode = (struct fsbnode *)bn;
struct bnode_token *tt;
- register afs_int32 code;
+ afs_int32 code;
struct stat tstat;
code = bnode_ParseLine(abnode->filecmd, &tt);
/* set needsSalvage flag, creating file SALVAGE.<instancename> if
we need to salvage the file system (so we can tell over panic reboots */
static int
-SetSalFlag(register struct fsbnode *abnode, register int aflag)
+SetSalFlag(struct fsbnode *abnode, int aflag)
{
char tbuffer[AFSDIR_PATH_MAX];
int fd;
/* set the needsSalvage flag according to the existence of the salvage file */
static int
-RestoreSalFlag(register struct fsbnode *abnode)
+RestoreSalFlag(struct fsbnode *abnode)
{
char tbuffer[AFSDIR_PATH_MAX];
}
char *
-copystr(register char *a)
+copystr(char *a)
{
- register char *b;
+ char *b;
b = (char *)malloc(strlen(a) + 1);
strcpy(b, a);
return b;
char *ascancmd, char *dummy)
{
struct stat tstat;
- register struct fsbnode *te;
+ struct fsbnode *te;
char cmdname[AFSDIR_PATH_MAX];
char *fileCmdpath, *volCmdpath, *salCmdpath, *scanCmdpath;
int bailout = 0;
char * asalsrvcmd, char *asalcmd, char *ascancmd)
{
struct stat tstat;
- register struct fsbnode *te;
+ struct fsbnode *te;
char cmdname[AFSDIR_PATH_MAX];
char *fileCmdpath, *volCmdpath, *salsrvCmdpath, *salCmdpath, *scanCmdpath;
int bailout = 0;
{
struct fsbnode *abnode = (struct fsbnode *)bn;
- register afs_int32 now;
+ afs_int32 now;
now = FT_ApproxTime();
/* shutting down */
{
struct fsbnode *abnode = (struct fsbnode *) bn;
- register afs_int32 temp;
+ afs_int32 temp;
if (abnode->volSDW || abnode->fileSDW || abnode->salSDW
|| abnode->scanSDW || abnode->salsrvSDW)
temp = BSTAT_SHUTTINGDOWN;
/* make sure we're periodically checking the state if we need to */
static void
-SetNeedsClock(register struct fsbnode *ab)
+SetNeedsClock(struct fsbnode *ab)
{
if (ab->b.goal == 1 && ab->fileRunning && ab->volRunning
&& (!ab->scancmd || ab->scanRunning)
}
static int
-NudgeProcs(register struct fsbnode *abnode)
+NudgeProcs(struct fsbnode *abnode)
{
struct bnode_proc *tp; /* not register */
- register afs_int32 code;
+ afs_int32 code;
afs_int32 now;
now = FT_ApproxTime();
struct stat tstat;
FILE *fin = stdin;
char buf[BUFSIZ], *bufp, *bufp1, *typep, *cmd, *bp;
- register afs_int32 code, c, fd, id, pflags = -1, len, core = 0, lastE = 0;
+ afs_int32 code, c, fd, id, pflags = -1, len, core = 0, lastE = 0;
char comLine[60], coreName[40], name[40], lastErrorName[50];
afs_int32 pid = -1, lastExit = -1, lastSignal = -1, rsCount = -1;
afs_int32 procStarts = -1;
int argc;
char **argv;
{
- register int i;
+ int i;
#ifdef AFS_AIX31_ENV
/*
char **argv;
{
struct rx_securityClass *rxsc;
- register struct rx_connection *tconn;
- register afs_int32 code;
+ struct rx_connection *tconn;
+ afs_int32 code;
rx_Init(0);
rxsc = rxnull_NewClientSecurityObject();
extern afs_int32 filesize(FILE *stream);
extern int bc_CheckTextVersion(udbClientTextP ctPtr);
extern int bc_openTextFile(udbClientTextP ctPtr, char *tmpFileName);
-extern int bcdb_GetTextFile(register udbClientTextP ctPtr);
+extern int bcdb_GetTextFile(udbClientTextP ctPtr);
extern afs_int32 bcdb_FindVolumes(afs_int32 dumpID, char *volumeName,
struct budb_volumeEntry *returnArray,
afs_int32 last, afs_int32 *next,
extern int bcdb_FinishTape(struct budb_tapeEntry *);
extern int bcdb_FindTapeSeq(afs_int32 dumpid, afs_int32 tapeSeq,
struct budb_tapeEntry *teptr);
-extern afs_int32 bcdb_AddVolume(register struct budb_volumeEntry *);
-extern afs_int32 bcdb_AddVolumes(register struct budb_volumeEntry *,
+extern afs_int32 bcdb_AddVolume(struct budb_volumeEntry *);
+extern afs_int32 bcdb_AddVolumes(struct budb_volumeEntry *,
afs_int32 );
extern afs_int32 udbClientInit(int noAuthFlag, int localauth, char *cellName);
struct ktc_token;
static int
TrimLine(char *abuffer, afs_int32 *aport)
{
- register int tc;
+ int tc;
char garb[100];
*aport = 0;
FILE *
bc_open(struct bc_config *aconfig, char *aname, char *aext, char *amode)
{
- register FILE *tf;
+ FILE *tf;
char tpath[256];
strcpy(tpath, aconfig->path);
int
bc_InitConfig(char *apath)
{
- register struct bc_config *tb;
+ struct bc_config *tb;
/* initialize global config structure */
tb = (struct bc_config *)malloc(sizeof(struct bc_config));
static int
HostAdd(struct bc_hostEntry **alist, char *aname, afs_int32 aport)
{
- register struct bc_hostEntry **tlast, *tentry;
+ struct bc_hostEntry **tlast, *tentry;
struct hostent *th;
/* check that the host address is real */
static int
HostDelete(struct bc_hostEntry **alist, char *aname, afs_int32 aport)
{
- register struct bc_hostEntry **tlast, *tentry;
+ struct bc_hostEntry **tlast, *tentry;
/* find guy to zap */
tlast = alist;
int
bc_AddTapeHost(struct bc_config *aconfig, char *aname, afs_int32 aport)
{
- register afs_int32 code;
+ afs_int32 code;
code = HostAdd(&aconfig->tapeHosts, aname, aport);
int
bc_DeleteTapeHost(struct bc_config *aconfig, char *aname, afs_int32 aport)
{
- register afs_int32 code;
+ afs_int32 code;
code = HostDelete(&aconfig->tapeHosts, aname, aport);
/* protos */
-static char * TapeName(register char *);
-static char * DumpName(register afs_int32 adumpID);
+static char * TapeName(char *);
+static char * DumpName(afs_int32 adumpID);
static FILE * OpenDump(afs_int32 , char * );
FILE * OpenTape(char * , char * );
static afs_int32 ScanForChildren(afs_int32 );
static afs_int32 DeleteDump(afs_int32 );
char * tailCompPtr(char *);
-afs_int32 ScanDumpHdr(register FILE *, char *, char *, afs_int32 *, afs_int32 *,
+afs_int32 ScanDumpHdr(FILE *, char *, char *, afs_int32 *, afs_int32 *,
afs_int32 *, afs_int32 *);
afs_int32 ScanTapeVolume(FILE *, char *, afs_int32 *, char *, afs_int32 *, afs_int32 *,
afs_int32 *, afs_int32 *);
/* return the tape file name corresponding to a particular tape */
-static char * TapeName(register char *atapeName)
+static char * TapeName(char *atapeName)
{
static char tbuffer[AFSDIR_PATH_MAX];
/* return the dump file name corresponding to a particular dump ID */
-static char * DumpName(register afs_int32 adumpID)
+static char * DumpName(afs_int32 adumpID)
{
static char tbuffer[AFSDIR_PATH_MAX];
char buf[AFSDIR_PATH_MAX];
static FILE * OpenDump(afs_int32 adumpID, char * awrite)
{
- register char *tp;
- register FILE *tfile;
+ char *tp;
+ FILE *tfile;
tp = DumpName(adumpID);
tfile = fopen(tp, awrite);
FILE * OpenTape(char * atapeName, char * awrite)
{
- register char *tp;
- register FILE *tfile;
+ char *tp;
+ FILE *tfile;
tp = TapeName(atapeName);
tfile = fopen(tp, awrite);
return tfile;
static afs_int32 ScanForChildren(afs_int32 aparentID)
{
DIR *tdir;
- register struct dirent *tde;
+ struct dirent *tde;
afs_int32 dumpID, parent;
- register FILE *tfile;
- register afs_int32 code;
+ FILE *tfile;
+ afs_int32 code;
afs_int32 j2, j3, j4;
char dname[256];
char dumpName[1024];
static afs_int32 DeleteDump(afs_int32 adumpID)
{
- register char *tp;
- register afs_int32 code;
+ char *tp;
+ afs_int32 code;
tp = DumpName(adumpID);
code = unlink(tp);
if (code)
#if 0
static afs_int32 DeleteTape(char * atapeName)
{
- register char *tp;
- register afs_int32 code;
+ char *tp;
+ afs_int32 code;
tp = TapeName(atapeName);
code = unlink(tp);
return code;
* alevel - level of dump (0 = full, 1+ are incrementals)
*/
afs_int32
-ScanDumpHdr(register FILE *afile, char *aname, char *dumpName, afs_int32 *aparent, afs_int32 *aincTime, afs_int32 *acreateTime, afs_int32 *alevel)
+ScanDumpHdr(FILE *afile, char *aname, char *dumpName, afs_int32 *aparent, afs_int32 *aincTime, afs_int32 *acreateTime, afs_int32 *alevel)
{
char tbuffer[256];
char *tp;
afs_int32 dbmagic, dbversion;
- register afs_int32 code;
+ afs_int32 code;
tp = fgets(tbuffer, sizeof(tbuffer), afile);
if (!tp)
#if 0
/* scan a tape header out of a tape file, leaving the file ptr positioned just past the header */
-static afs_int32 ScanTapeHdr(register FILE *afile, afs_int32 *adumpID, afs_int32 *aseq, afs_int32 *adamage)
+static afs_int32 ScanTapeHdr(FILE *afile, afs_int32 *adumpID, afs_int32 *aseq, afs_int32 *adamage)
{
char tbuffer[256];
char *tp;
- register afs_int32 code;
+ afs_int32 code;
tp = fgets(tbuffer, sizeof(tbuffer), afile);
if (!tp)
afs_int32 ScanTapeVolume(FILE *afile, char *avolName, afs_int32 *avolID, char *atapeName, afs_int32 *apos, afs_int32 *aseq, afs_int32 *alastp, afs_int32 *cloneTime)
{
char tbuffer[256];
- register afs_int32 code;
- register char *tp;
+ afs_int32 code;
+ char *tp;
tp = fgets(tbuffer, sizeof(tbuffer), afile);
if (!tp) { /* something went wrong, or eof hit */
#if 0
/* seek a dump file (after a header scan has been done) to position apos */
-static int SeekDump(register FILE *afile, afs_int32 apos)
+static int SeekDump(FILE *afile, afs_int32 apos)
{
- register afs_int32 i;
- register char *tp;
+ afs_int32 i;
+ char *tp;
char tbuffer[256];
/* now skip to appropriate position */
/*bc_GetPartitionID */
- register char tc;
+ char tc;
char ascii[3];
/* special-case "anything" */
{ /*bc_ParseHost */
- register struct hostent *th; /*Host entry */
+ struct hostent *th; /*Host entry */
afs_uint32 addr; /*Converted address */
afs_int32 b1, b2, b3, b4; /*Byte-sized address chunks */
- register afs_int32 code; /*Return code from sscanf() */
+ afs_int32 code; /*Return code from sscanf() */
afs_int32 tmp1, tmp2;
/*
bc_CreateVolumeSet(struct bc_config *aconfig, char *avolName,
afs_int32 aflags)
{
- register struct bc_volumeSet **tlast, *tset, *nset;
+ struct bc_volumeSet **tlast, *tset, *nset;
if (bc_FindVolumeSet(aconfig, avolName))
return -1; /* already exists */
}
static int
-FreeVolumeEntry(register struct bc_volumeEntry *aentry)
+FreeVolumeEntry(struct bc_volumeEntry *aentry)
{
free(aentry->name);
free(aentry->serverName);
}
static int
-FreeVolumeEntryList(register struct bc_volumeEntry *aentry)
+FreeVolumeEntryList(struct bc_volumeEntry *aentry)
{
- register struct bc_volumeEntry *tnext;
+ struct bc_volumeEntry *tnext;
while (aentry) {
tnext = aentry->next;
bc_DeleteVolumeSet(struct bc_config *aconfig, char *avolName,
afs_int32 *flags)
{
- register struct bc_volumeSet **tlast, *tset;
+ struct bc_volumeSet **tlast, *tset;
*flags = 0;
tlast = &aconfig->vset;
bc_DeleteVolumeItem(struct bc_config *aconfig, char *avolName,
afs_int32 anumber)
{
- register afs_int32 i;
- register struct bc_volumeSet *tset;
- register struct bc_volumeEntry *tentry, **tlast;
+ afs_int32 i;
+ struct bc_volumeSet *tset;
+ struct bc_volumeEntry *tentry, **tlast;
tset = bc_FindVolumeSet(aconfig, avolName);
if (!tset)
char *apart, char *avol)
{
struct bc_volumeSet *tset;
- register struct bc_volumeEntry **tlast, *tentry;
- register afs_int32 code;
+ struct bc_volumeEntry **tlast, *tentry;
+ afs_int32 code;
tset = bc_FindVolumeSet(aconfig, avolName);
if (!tset)
bc_FindVolumeSet(struct bc_config *aconfig, char *aname)
{ /*bc_FindVolumeSet */
- register struct bc_volumeSet *tvs;
+ struct bc_volumeSet *tvs;
for (tvs = aconfig->vset; tvs; tvs = tvs->next) {
if (!strcmp(tvs->name, aname))
bc_CreateDumpSchedule(struct bc_config *aconfig, char *adumpName,
afs_int32 expDate, afs_int32 expType)
{
- register struct bc_dumpSchedule *tdump;
+ struct bc_dumpSchedule *tdump;
struct bc_dumpSchedule *parent, *node;
afs_int32 code;
bc_DeleteDumpScheduleAddr(struct bc_config *aconfig,
struct bc_dumpSchedule *adumpAddr)
{
- register struct bc_dumpSchedule **tlast, *tdump;
- register struct bc_dumpSchedule *tnext;
+ struct bc_dumpSchedule **tlast, *tdump;
+ struct bc_dumpSchedule *tnext;
/* knock off all children first */
for (tdump = adumpAddr->firstChild; tdump; tdump = tnext) {
struct bc_dumpSchedule *
bc_FindDumpSchedule(struct bc_config *aconfig, char *aname)
{
- register struct bc_dumpSchedule *tds;
+ struct bc_dumpSchedule *tds;
for (tds = aconfig->dsched; tds; tds = tds->next) {
if (!strcmp(tds->name, aname))
return tds;
int
bc_DeleteDumpSchedule(struct bc_config *aconfig, char *adumpName)
{
- register struct bc_dumpSchedule *tdump;
+ struct bc_dumpSchedule *tdump;
/* does a linear search of the dump schedules in order to find
* the one to delete
int
bc_ProcessDumpSchedule(struct bc_config *aconfig)
{
- register struct bc_dumpSchedule *tds;
+ struct bc_dumpSchedule *tds;
struct bc_dumpSchedule *parentptr, *nodeptr;
int retval;
bc_Dumper(int aindex)
{
struct rx_connection *tconn;
- register struct bc_volumeDump *tde;
+ struct bc_volumeDump *tde;
afs_int32 count, port;
struct tc_dumpDesc *volDesc = 0;
struct tc_dumpArray volArray;
struct tc_dumpInterface dumpInterface;
struct tc_dumpInterface *tcdiPtr = &dumpInterface;
- register struct bc_dumpTask *dumpTaskPtr;
+ struct bc_dumpTask *dumpTaskPtr;
- register afs_int32 code = 0;
+ afs_int32 code = 0;
dumpTaskPtr = &bc_dumpTasks[aindex];
bc_DmpRstStart(void *param)
{
afs_int32 aindex = (intptr_t)param;
- register struct bc_dumpTask *tdump;
- register afs_int32 code;
+ struct bc_dumpTask *tdump;
+ afs_int32 code;
tdump = &bc_dumpTasks[aindex];
int (*aproc) (int), afs_int32 *ports, afs_int32 portCount,
struct bc_dumpSchedule *dsptr, int append, int dontExecute)
{
- register int i;
- register afs_int32 code;
+ int i;
+ afs_int32 code;
void *junk = NULL;
for (i = 0; i < BC_MAXSIMDUMPS; i++)
int
bc_AddDumpCmd(struct cmd_syndesc *as, void *arock)
{
- register char *dname; /* dump schedule name */
- register int code;
+ char *dname; /* dump schedule name */
+ int code;
afs_int32 expType, expDate;
- register struct cmd_item *ti;
+ struct cmd_item *ti;
udbClientTextP ctPtr;
/* if an expiration date has been specified */
/* parm 0 is vol set name
* parm 1 is dump schedule name
*/
- register char *dname;
- register int code;
+ char *dname;
+ int code;
udbClientTextP ctPtr;
/* lock schedules and check validity */
*/
static int
-ListDumpSchedule(register struct bc_dumpSchedule *adump, int alevel)
+ListDumpSchedule(struct bc_dumpSchedule *adump, int alevel)
{
- register int i;
- register struct bc_dumpSchedule *child;
+ int i;
+ struct bc_dumpSchedule *child;
/* sanity check for loops */
if (alevel > 100) {
{
/* no parms */
int code;
- register struct bc_dumpSchedule *tdump;
+ struct bc_dumpSchedule *tdump;
/* first check to see if schedules must be updated */
code = bc_UpdateDumpSchedule();
int
bc_SetExpCmd(struct cmd_syndesc *as, void *arock)
{
- register char *dname; /* dump schedule name */
- register struct cmd_item *ti;
+ char *dname; /* dump schedule name */
+ struct cmd_item *ti;
struct bc_dumpSchedule *node, *parent;
afs_int32 expType, expDate;
udbClientTextP ctPtr;
- register int code;
+ int code;
/* if an expiration date has been specified */
if (as->parms[1].items) {
char *tp;
afs_int32 code;
udbClientTextP ctPtr;
- register struct bc_dumpSchedule *tds;
+ struct bc_dumpSchedule *tds;
struct bc_dumpSchedule **ppds, *pds;
afs_int32 expDate, expType;
- register FILE *stream;
+ FILE *stream;
/* initialize locally used variables */
ctPtr = &bc_globalConfig->configText[TB_DUMPSCHEDULE];
static int
LineIsBlank(char *aline)
{
- register int tc;
+ int tc;
while ((tc = *aline++))
if ((tc != ' ') && (tc != '\t') && (tc != '\n'))
static int
backupInit(void)
{
- register afs_int32 code;
+ afs_int32 code;
static int initd = 0; /* ever called? */
PROCESS watcherPid;
PROCESS pid; /* LWP process ID */
*/
static int
-MyBeforeProc(register struct cmd_syndesc *as, void *arock)
+MyBeforeProc(struct cmd_syndesc *as, void *arock)
{
afs_int32 code;
char *targv[MAXV]; /*Ptr to parsed argv stuff */
afs_int32 targc; /*Num parsed arguments */
afs_int32 code; /*Return code */
- register struct cmd_syndesc *ts; /*Ptr to parsed command line */
+ struct cmd_syndesc *ts; /*Ptr to parsed command line */
int i;
struct cmd_item *ti;
udbClientTextP ctPtr;
afs_int32 port = 0;
- register afs_int32 code = 0;
+ afs_int32 code = 0;
ctPtr = &bc_globalConfig->configText[TB_TAPEHOSTS];
code = bc_LockText(ctPtr);
struct cmd_item *ti;
afs_int32 port = 0;
udbClientTextP ctPtr;
- register afs_int32 code = 0;
+ afs_int32 code = 0;
ctPtr = &bc_globalConfig->configText[TB_TAPEHOSTS];
code = bc_LockText(ctPtr);
bc_ListHostsCmd(struct cmd_syndesc *as, void *arock)
{
afs_int32 code;
- register struct bc_hostEntry *tentry;
+ struct bc_hostEntry *tentry;
code = bc_UpdateHosts();
if (code) {
int
bc_ClearHosts(void)
{
- register struct bc_hostEntry *tentry, *temp;
+ struct bc_hostEntry *tentry, *temp;
tentry = bc_globalConfig->tapeHosts;
while (tentry != 0) {
int
bc_SaveHosts(void)
{
- register afs_int32 code = 0;
+ afs_int32 code = 0;
udbClientTextP ctPtr;
- register FILE *stream;
+ FILE *stream;
struct bc_hostEntry *hePtr;
extern struct bc_config *bc_globalConfig;
int argc;
char **argv;
{
- register int i;
- register afs_int32 code;
- register struct rx_service *tservice;
+ int i;
+ afs_int32 code;
+ struct rx_service *tservice;
struct rx_securityClass *rxsc[1];
for (i = 1; i < argc; i++) {
struct tc_dumpArray *adumpArray;
afs_int32 *adumpID;
{
- register int i;
- register struct tc_dumpDesc *tdescr;
- register afs_int32 code;
+ int i;
+ struct tc_dumpDesc *tdescr;
+ afs_int32 code;
struct sockaddr_in taddr;
struct budb_dumpEntry tdentry;
struct budb_volumeEntry tventry;
struct tc_restoreArray *arestore;
afs_int32 *adumpID;
{
- register int i;
- register struct tc_restoreDesc *tdescr;
+ int i;
+ struct tc_restoreDesc *tdescr;
struct sockaddr_in taddr;
printf("tape controller received request to start restore %s.\n", aname);
* -------------------------------------
*/
-afs_int32 bcdb_AddVolume(register struct budb_volumeEntry *veptr)
+afs_int32 bcdb_AddVolume(struct budb_volumeEntry *veptr)
{
afs_int32 code;
return (code);
}
-afs_int32 bcdb_AddVolumes(register struct budb_volumeEntry *veptr, afs_int32 count)
+afs_int32 bcdb_AddVolumes(struct budb_volumeEntry *veptr, afs_int32 count)
{
struct budb_volumeList volumeList;
afs_int32 code;
}
-afs_int32 bcdb_CreateDump(register struct budb_dumpEntry *deptr)
+afs_int32 bcdb_CreateDump(struct budb_dumpEntry *deptr)
{
afs_int32 code;
int
bcdb_FindDumpByID(afs_int32 dumpID, struct budb_dumpEntry *deptr)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 nextindex;
afs_int32 dbTime;
budb_dumpList dl;
}
int
-bcdb_FinishDump(register struct budb_dumpEntry *deptr)
+bcdb_FinishDump(struct budb_dumpEntry *deptr)
{
afs_int32 code;
code = ubik_BUDB_FinishDump(udbHandle.uh_client, 0, deptr);
}
int
-bcdb_FinishTape(register struct budb_tapeEntry *teptr)
+bcdb_FinishTape(struct budb_tapeEntry *teptr)
{
afs_int32 code;
code = ubik_BUDB_FinishTape(udbHandle.uh_client, 0, teptr);
*/
int
-bcdb_GetTextFile(register udbClientTextP ctPtr)
+bcdb_GetTextFile(udbClientTextP ctPtr)
{
afs_int32 bufferSize;
afs_int32 offset, nextOffset;
char *p9, char *p10, char *p11, char *p12, char *p13,
char *p14, char *p15, char *p16)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 someCode, newHost, thisHost;
- register afs_int32 i;
- register afs_int32 count;
+ afs_int32 i;
+ afs_int32 count;
int chaseCount;
int pass;
struct rx_connection *tc;
int
bc_AddVolEntryCmd(struct cmd_syndesc *as, void *arock)
{
- register int code;
+ int code;
char *volSetName, *serverName, *partitionName, *volRegExp;
udbClientTextP ctPtr;
struct bc_volumeSet *tset;
bc_AddVolSetCmd(struct cmd_syndesc *as, void *arock)
{
/* parm 0 is vol set name */
- register int code;
- register struct cmd_item *ti;
+ int code;
+ struct cmd_item *ti;
udbClientTextP ctPtr;
afs_int32 flags;
int
bc_DeleteVolEntryCmd(struct cmd_syndesc *as, void *arock)
{
- register int code;
+ int code;
afs_int32 entry;
char *vsname;
udbClientTextP ctPtr;
bc_DeleteVolSetCmd(struct cmd_syndesc *as, void *arock)
{
/* parm 0 is vol set name */
- register int code;
- register struct cmd_item *ti;
+ int code;
+ struct cmd_item *ti;
udbClientTextP ctPtr;
afs_int32 c;
afs_int32 flags, tosave = 0;
bc_ListVolSetCmd(struct cmd_syndesc *as, void *arock)
{
/* parm 0 is optional volume set to display */
- register struct bc_volumeSet *tset;
- register struct cmd_item *ti;
+ struct bc_volumeSet *tset;
+ struct cmd_item *ti;
int code = 0;
code = bc_UpdateVolumeSet();
char vsname[256]; /*Volume set name */
char serverName[256]; /*Server name */
char partName[256]; /*Partition name */
- register struct bc_volumeEntry *tve; /*Ptr to generated volume spec struct */
- register struct bc_volumeSet *tvs = NULL; /*Ptr to volume set struct */
+ struct bc_volumeEntry *tve; /*Ptr to generated volume spec struct */
+ struct bc_volumeSet *tvs = NULL; /*Ptr to volume set struct */
struct bc_volumeEntry **ppve, *pve;
struct bc_volumeSet **ppvs, *pvs;
- register afs_int32 code; /*Generalized return code */
+ afs_int32 code; /*Generalized return code */
char *tp; /*Result of fgets(), malloc() */
int readHeader; /*Is next thing to read a volume set hdr? */
udbClientTextP ctPtr;
- register FILE *stream;
+ FILE *stream;
struct bc_config *configPtr;
extern struct bc_config *bc_globalConfig;
int
bc_SaveVolumeSet(void)
{
- register afs_int32 code = 0;
- register struct bc_volumeSet *tset;
- register struct bc_volumeEntry *tentry;
+ afs_int32 code = 0;
+ struct bc_volumeSet *tset;
+ struct bc_volumeEntry *tentry;
udbClientTextP ctPtr;
- register FILE *stream;
+ FILE *stream;
struct bc_config *configPtr;
extern struct bc_config *bc_globalConfig;
* If it were, this routine would never have been called.
*/
static int
-MyBeforeProc(register struct cmd_syndesc *as, void *arock)
+MyBeforeProc(struct cmd_syndesc *as, void *arock)
{
helpOption = 0;
return 0;
afs_int32
GetNthNode(afs_int32 aindex, afs_int32 *aresult)
{
- register struct dumpNode *tn;
- register int i;
+ struct dumpNode *tn;
+ int i;
tn = dumpQHeader->next;
for (i = 0;; i++) {
PromptForTape(int flag, char *name, afs_uint32 dbDumpId, afs_uint32 taskId,
int tapecount)
{
- register afs_int32 code = 0;
+ afs_int32 code = 0;
afs_int32 wcode;
afs_int32 start = 0;
char inchr;
}
static afs_int32
-SafeATOL(register char *anum)
+SafeATOL(char *anum)
{
- register afs_int32 total;
- register int tc;
+ afs_int32 total;
+ int tc;
total = 0;
while ((tc = *anum)) {
static int
WorkerBee(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
struct rx_securityClass *(securityObjects[3]);
struct rx_service *service;
time_t tokenExpires;
int
main(int argc, char **argv)
{
- register struct cmd_syndesc *ts;
- register struct cmd_item *ti;
+ struct cmd_syndesc *ts;
+ struct cmd_item *ti;
#ifdef AFS_AIX32_ENV
/*
{
char tbuffer[10000];
int fd;
- register afs_int32 code;
- register char *lp;
+ afs_int32 code;
+ char *lp;
afs_int32 count;
#ifdef AFS_AIX32_ENV
afs_uint32 aserver;
afs_int32 port;
{
- register struct rx_connection *tc;
+ struct rx_connection *tc;
struct rx_securityClass *uvclass;
uvclass = rxnull_NewClientSecurityObject();
GetServer(aname)
char *aname;
{
- register struct hostent *th;
+ struct hostent *th;
afs_uint32 addr;
char b1, b2, b3, b4;
- register afs_int32 code;
+ afs_int32 code;
code = sscanf(aname, "%d.%d.%d.%d", &b1, &b2, &b3, &b4);
if (code == 4) {
static int
-PerformDump(register struct cmd_syndesc *as, void *arock)
+PerformDump(struct cmd_syndesc *as, void *arock)
{
struct rx_connection *aconn;
afs_uint32 server;
}
static int
-PerformRestore(register struct cmd_syndesc *as, void *arock)
+PerformRestore(struct cmd_syndesc *as, void *arock)
{
struct rx_connection *aconn;
afs_uint32 server;
}
static int
-CheckDump(register struct cmd_syndesc *as, void *arock)
+CheckDump(struct cmd_syndesc *as, void *arock)
{
struct rx_connection *aconn;
afs_uint32 server;
}
static int
-AbortDump(register struct cmd_syndesc *as, void *arock)
+AbortDump(struct cmd_syndesc *as, void *arock)
{
struct rx_connection *aconn;
afs_uint32 server;
}
static int
-WaitForDump(register struct cmd_syndesc *as, void *arock)
+WaitForDump(struct cmd_syndesc *as, void *arock)
{
struct rx_connection *aconn;
afs_uint32 server;
}
static int
-EndDump(register struct cmd_syndesc *as, void *arock)
+EndDump(struct cmd_syndesc *as, void *arock)
{
struct rx_connection *aconn;
afs_uint32 server;
int argc;
char **argv;
{
- register afs_int32 code;
+ afs_int32 code;
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
#ifdef AFS_AIX32_ENV
/*
/* return true if asub is a substring of amain */
static int
-SubString(register char *amain, register char *asub)
+SubString(char *amain, char *asub)
{
int mlen, slen;
- register int i, j;
+ int i, j;
mlen = (int) strlen(amain);
slen = (int) strlen(asub);
j = mlen - slen;
}
static int
-FindType(register struct cmd_syndesc *as, register char *aname)
+FindType(struct cmd_syndesc *as, char *aname)
{
- register int i;
+ int i;
size_t cmdlen;
int ambig;
int best;
static struct cmd_syndesc *
FindSyntax(char *aname, int *aambig)
{
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
struct cmd_syndesc *best;
size_t cmdLen;
int ambig;
/* print the help for a single parameter */
static void
-PrintParmHelp(register struct cmd_parmdesc *aparm)
+PrintParmHelp(struct cmd_parmdesc *aparm)
{
if (aparm->type == CMD_FLAG) {
#ifdef notdef
extern char *AFSVersion;
static int
-VersionProc(register struct cmd_syndesc *as, void *arock)
+VersionProc(struct cmd_syndesc *as, void *arock)
{
printf("%s\n", AFSVersion);
return 0;
}
void
-PrintSyntax(register struct cmd_syndesc *as)
+PrintSyntax(struct cmd_syndesc *as)
{
- register int i;
- register struct cmd_parmdesc *tp;
+ int i;
+ struct cmd_parmdesc *tp;
/* now print usage, from syntax table */
if (noOpcodes)
/* must print newline in any case, to terminate preceding line */
static void
-PrintAliases(register struct cmd_syndesc *as)
+PrintAliases(struct cmd_syndesc *as)
{
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
if (as->flags & CMD_ALIAS) {
ts = as->aliasOf;
}
void
-PrintFlagHelp(register struct cmd_syndesc *as)
+PrintFlagHelp(struct cmd_syndesc *as)
{
- register int i;
- register struct cmd_parmdesc *tp;
+ int i;
+ struct cmd_parmdesc *tp;
int flag_width;
char *flag_prefix;
}
static int
-AproposProc(register struct cmd_syndesc *as, void *arock)
+AproposProc(struct cmd_syndesc *as, void *arock)
{
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
char *tsub;
int didAny;
}
static int
-HelpProc(register struct cmd_syndesc *as, void *arock)
+HelpProc(struct cmd_syndesc *as, void *arock)
{
- register struct cmd_syndesc *ts;
- register struct cmd_item *ti;
+ struct cmd_syndesc *ts;
+ struct cmd_item *ti;
int ambig;
int code = 0;
static int
SortSyntax(struct cmd_syndesc *as)
{
- register struct cmd_syndesc **ld, *ud;
+ struct cmd_syndesc **ld, *ud;
for (ld = &allSyntax, ud = *ld; ud; ld = &ud->next, ud = *ld) {
if (strcmp(ud->name, as->name) > 0) { /* next guy is bigger than us */
int (*aproc) (struct cmd_syndesc * ts, void *arock),
void *arock, char *ahelp)
{
- register struct cmd_syndesc *td;
+ struct cmd_syndesc *td;
/* can't have two cmds in no opcode mode */
if (noOpcodes)
}
int
-cmd_CreateAlias(register struct cmd_syndesc *as, char *aname)
+cmd_CreateAlias(struct cmd_syndesc *as, char *aname)
{
- register struct cmd_syndesc *td;
+ struct cmd_syndesc *td;
td = (struct cmd_syndesc *)malloc(sizeof(struct cmd_syndesc));
assert(td);
}
int
-cmd_IsAdministratorCommand(register struct cmd_syndesc *as)
+cmd_IsAdministratorCommand(struct cmd_syndesc *as)
{
as->flags |= CMD_ADMIN;
return 0;
}
int
-cmd_Seek(register struct cmd_syndesc *as, int apos)
+cmd_Seek(struct cmd_syndesc *as, int apos)
{
if (apos >= CMD_MAXPARMS)
return CMD_EXCESSPARMS;
}
int
-cmd_AddParm(register struct cmd_syndesc *as, char *aname, int atype,
+cmd_AddParm(struct cmd_syndesc *as, char *aname, int atype,
afs_int32 aflags, char *ahelp)
{
- register struct cmd_parmdesc *tp;
+ struct cmd_parmdesc *tp;
if (as->nParms >= CMD_MAXPARMS)
return CMD_EXCESSPARMS;
/* add a text item to the end of the parameter list */
static int
-AddItem(register struct cmd_parmdesc *aparm, register char *aval)
+AddItem(struct cmd_parmdesc *aparm, char *aval)
{
- register struct cmd_item *ti, *ni;
+ struct cmd_item *ti, *ni;
ti = (struct cmd_item *)calloc(1, sizeof(struct cmd_item));
assert(ti);
ti->data = (char *)malloc(strlen(aval) + 1);
/* skip to next non-flag item, if any */
static int
-AdvanceType(register struct cmd_syndesc *as, register afs_int32 aval)
+AdvanceType(struct cmd_syndesc *as, afs_int32 aval)
{
- register afs_int32 next;
- register struct cmd_parmdesc *tp;
+ afs_int32 next;
+ struct cmd_parmdesc *tp;
/* first see if we should try to grab rest of line for this dude */
if (as->parms[aval].flags & CMD_EXPANDS)
/* discard parameters filled in by dispatch */
static void
-ResetSyntax(register struct cmd_syndesc *as)
+ResetSyntax(struct cmd_syndesc *as)
{
int i;
- register struct cmd_parmdesc *tp;
- register struct cmd_item *ti, *ni;
+ struct cmd_parmdesc *tp;
+ struct cmd_item *ti, *ni;
tp = as->parms;
for (i = 0; i < CMD_MAXPARMS; i++, tp++) {
/* move the expands flag to the last one in the list */
static int
-SetupExpandsFlag(register struct cmd_syndesc *as)
+SetupExpandsFlag(struct cmd_syndesc *as)
{
- register struct cmd_parmdesc *tp;
- register int last, i;
+ struct cmd_parmdesc *tp;
+ int last, i;
last = -1;
/* find last CMD_LIST type parameter, optional or not, and make it expandable
} /*InsertInitOpcode */
static int
-NoParmsOK(register struct cmd_syndesc *as)
+NoParmsOK(struct cmd_syndesc *as)
{
- register int i;
- register struct cmd_parmdesc *td;
+ int i;
+ struct cmd_parmdesc *td;
for (i = 0; i < CMD_MAXPARMS; i++) {
td = &as->parms[i];
/* free token list returned by parseLine */
static int
-FreeTokens(register struct cmd_token *alist)
+FreeTokens(struct cmd_token *alist)
{
- register struct cmd_token *nlist;
+ struct cmd_token *nlist;
for (; alist; alist = nlist) {
nlist = alist->next;
free(alist->key);
/* free an argv list returned by parseline */
int
-cmd_FreeArgv(register char **argv)
+cmd_FreeArgv(char **argv)
{
- register char *tp;
+ char *tp;
for (tp = *argv; tp; argv++, tp = *argv)
free(tp);
return 0;
later on */
#define INITSTR ""
static int
-CopyBackArgs(register struct cmd_token *alist, register char **argv,
+CopyBackArgs(struct cmd_token *alist, char **argv,
afs_int32 * an, afs_int32 amaxn)
{
- register struct cmd_token *next;
+ struct cmd_token *next;
afs_int32 count;
count = 0;
}
static int
-quote(register int x)
+quote(int x)
{
if (x == '"' || x == 39 /* single quote */ )
return 1;
}
static int
-space(register int x)
+space(int x)
{
if (x == 0 || x == ' ' || x == '\t' || x == '\n')
return 1;
cmd_ParseLine(char *aline, char **argv, afs_int32 * an, afs_int32 amaxn)
{
char tbuffer[256];
- register char *tptr = 0;
+ char *tptr = 0;
int inToken, inQuote;
struct cmd_token *first, *last;
- register struct cmd_token *ttok;
- register int tc;
+ struct cmd_token *ttok;
+ int tc;
inToken = 0; /* not copying token chars at start */
first = (struct cmd_token *)0;
extern int cmd_FreeArgv(char **argv);
extern int cmd_ParseLine(char *aline, char **argv, afs_int32 * an,
afs_int32 amaxn);
-extern int cmd_IsAdministratorCommand(register struct cmd_syndesc *as);
-extern void PrintSyntax(register struct cmd_syndesc *as);
-extern void PrintFlagHelp(register struct cmd_syndesc *as);
+extern int cmd_IsAdministratorCommand(struct cmd_syndesc *as);
+extern void PrintSyntax(struct cmd_syndesc *as);
+extern void PrintFlagHelp(struct cmd_syndesc *as);
#endif /* __CMD_INCL__ */
static int
cproc2(struct cmd_syndesc *as, void *arock)
{
- register struct cmd_item *ti;
+ struct cmd_item *ti;
printf("in the pear command\n");
printf("number is %s\n", as->parms[0].items->data);
if (as->parms[1].items)
int
main(int argc, char **argv)
{
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
ts = cmd_CreateSyntax("apple", cproc1, NULL, "describe apple");
cmd_CreateAlias(ts, "appl");
static int
cproc(struct cmd_syndesc *as, void *arock)
{
- register struct cmd_item *ti;
+ struct cmd_item *ti;
printf("in the pear command\n");
printf("number is %s\n", as->parms[0].items->data);
if (as->parms[1].items)
int
main(int argc, char **argv)
{
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
ts = cmd_CreateSyntax(NULL, cproc, NULL, "describe pear");
cmd_AddParm(ts, "-num", CMD_SINGLE, 0, "number of pears");
static int
cproc2(struct cmd_syndesc *as, void *arock)
{
- register struct cmd_item *ti;
+ struct cmd_item *ti;
printf("in the pear command\n");
printf("number is %s\n", as->parms[0].items->data);
if (as->parms[1].items)
int
main(int argc, char **argv)
{
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
char tline[1000];
long tc;
char *tp;
void set_table_fun(char *astring)
{
- register char *tp;
+ char *tp;
unsigned int tc;
for(tp=astring; (tc = *tp) != 0; tp++) {
char *to;
int count;
{
- register char *f = from;
- register char *t = to;
- register int i = count;
+ char *f = from;
+ char *t = to;
+ int i = count;
while (i-- > 0)
*t++ = *f++;
static void
__yy_memcpy(char *from, char *to, int count)
{
- register char *f = from;
- register char *t = to;
- register int i = count;
+ char *f = from;
+ char *t = to;
+ int i = count;
while (i-- > 0)
*t++ = *f++;
yyparse(YYPARSE_PARAM)
YYPARSE_PARAM_DECL
{
- register int yystate;
- register int yyn;
- register short *yyssp;
- register YYSTYPE *yyvsp;
+ int yystate;
+ int yyn;
+ short *yyssp;
+ int YYSTYPE *yyvsp;
int yyerrstatus; /* number of tokens to shift before error messages enabled */
int yychar1 = 0; /* lookahead token as an internal (translated) token number */
void
set_table_fun(char *astring)
{
- register char *tp;
+ char *tp;
unsigned int tc;
for (tp = astring; (tc = *tp) != 0; tp++) {
[\t\n\r ] ;
-\"{PC}*\" { register char *p; yylval.dynstr = ds((char *)yytext+1);
+\"{PC}*\" { char *p; yylval.dynstr = ds((char *)yytext+1);
if ((p=strrchr(yylval.dynstr, '"'))) *p='\0';
return QUOTED_STRING;
}
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
+ int yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
#line 3 "et_lex.lex.l"
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ int YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
case 7:
YY_RULE_SETUP
#line 13 "et_lex.lex.l"
-{ register char *p; yylval.dynstr = ds((char *)yytext+1);
+{ char *p; yylval.dynstr = ds((char *)yytext+1);
if (p=strrchr(yylval.dynstr, '"')) *p='\0';
return QUOTED_STRING;
}
static int yy_get_next_buffer()
{
- register char *dest = yy_current_buffer->yy_ch_buf;
- register char *source = yytext_ptr;
- register int number_to_move, i;
+ char *dest = yy_current_buffer->yy_ch_buf;
+ char *source = yytext_ptr;
+ int number_to_move, i;
int ret_val;
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
static yy_state_type yy_get_previous_state()
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ int yy_state_type yy_current_state;
+ char *yy_cp;
yy_current_state = yy_start;
yy_state_ptr = yy_state_buf;
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ int YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
yy_state_type yy_current_state;
#endif
{
- register int yy_is_jam;
+ int yy_is_jam;
- register YY_CHAR yy_c = 1;
+ int YY_CHAR yy_c = 1;
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
+static void yyunput( int c, char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
-register char *yy_bp;
+char *yy_bp;
#endif
{
- register char *yy_cp = yy_c_buf_p;
+ char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register int number_to_move = yy_n_chars + 2;
- register char *dest = &yy_current_buffer->yy_ch_buf[
+ int number_to_move = yy_n_chars + 2;
+ char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
- register char *source =
+ char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];
while ( source > yy_current_buffer->yy_ch_buf )
int n;
#endif
{
- register int i;
+ int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
int
main(int argc, char **argv)
{
- register FILE *infile;
- register FILE *outfile;
+ FILE *infile;
+ FILE *outfile;
char *alist[5];
- register int code;
+ int code;
char *sysname;
if (argc != 4) {
/* free token list returned by parseLine */
static int
-FreeTokens(register struct token *alist)
+FreeTokens(struct token *alist)
{
- register struct token *nlist;
+ struct token *nlist;
for (; alist; alist = nlist) {
nlist = alist->next;
free(alist->key);
ParseLine(char *aline, struct token **alist)
{
char tbuffer[MAXTOKLEN + 1];
- register char *tptr = NULL;
+ char *tptr = NULL;
int inToken;
struct token *first, *last;
- register struct token *ttok;
- register int tc;
+ struct token *ttok;
+ int tc;
int dontUse = 0;
inToken = 0; /* not copying token chars at start */
/* read a line into a buffer, putting in null termination and stopping on appropriate
end of line char. Returns 0 at eof, > 0 at normal line end, and < 0 on error */
static int
-GetLine(FILE * afile, register char *abuffer, int amax)
+GetLine(FILE * afile, char *abuffer, int amax)
{
- register int tc;
+ int tc;
int first;
first = 1;
}
int
-mc_copy(register FILE * ain, register FILE * aout, char *alist[])
+mc_copy(FILE * ain, FILE * aout, char *alist[])
{
char tbuffer[MAXLINELEN];
struct token *tokens;
- register char **tp;
- register struct token *tt;
- register int code;
+ char **tp;
+ struct token *tt;
+ int code;
int copying;
int done;
/*
des_cblock *in; * >= length bytes of input text *
des_cblock *out; * >= length bytes of output text *
- register afs_int32 length; * in bytes *
+ afs_int32 length; * in bytes *
int encrypt; * 0 ==> decrypt, else encrypt *
des_key_schedule key; * precomputed key schedule *
des_cblock *iv; * 8 bytes of ivec *
*/
afs_int32
-des_cbc_encrypt(void * in, void * out, register afs_int32 length,
+des_cbc_encrypt(void * in, void * out, afs_int32 length,
des_key_schedule key, des_cblock * iv, int encrypt)
{
- register afs_uint32 *input = (afs_uint32 *) in;
- register afs_uint32 *output = (afs_uint32 *) out;
- register afs_uint32 *ivec = (afs_uint32 *) iv;
+ afs_uint32 *input = (afs_uint32 *) in;
+ afs_uint32 *output = (afs_uint32 *) out;
+ afs_uint32 *ivec = (afs_uint32 *) iv;
afs_uint32 i, j;
afs_uint32 t_input[2];
/*
des_cblock *in; * >= length bytes of inputtext *
des_cblock *out; * >= length bytes of outputtext *
- register afs_int32 length; * in bytes *
+ afs_int32 length; * in bytes *
des_key_schedule key; * precomputed key schedule *
des_cblock *iv; * 8 bytes of ivec *
*/
afs_uint32
-des_cbc_cksum(des_cblock * in, des_cblock * out, register afs_int32 length,
+des_cbc_cksum(des_cblock * in, des_cblock * out, afs_int32 length,
des_key_schedule key, des_cblock * iv)
{
- register afs_uint32 *input = (afs_uint32 *) in;
- register afs_uint32 *output = (afs_uint32 *) out;
+ afs_uint32 *input = (afs_uint32 *) in;
+ afs_uint32 *output = (afs_uint32 *) out;
afs_uint32 *ivec = (afs_uint32 *) iv;
afs_uint32 i, j;
{ C_block tblk; permute(cpp,&tblk,p,4); LOAD (d,d0,d1,tblk); }
STATIC void
-permute(unsigned char *cp, C_block *out, register C_block *p, int chars_in)
+permute(unsigned char *cp, C_block *out, C_block *p, int chars_in)
{
- register DCL_BLOCK(D, D0, D1);
- register C_block *tp;
- register int t;
+ DCL_BLOCK(D, D0, D1);
+ C_block *tp;
+ int t;
ZERO(D, D0, D1);
do {
* followed by an encryption produced by the "key" and "setting".
*/
char *
-crypt(register const char *key, register const char *setting)
+crypt(const char *key, const char *setting)
{
- register char *encp;
- register long i;
- register int t;
+ char *encp;
+ long i;
+ int t;
long salt;
int num_iter, salt_size;
C_block keyblock, rsltblock;
* Set up the key schedule from the key.
*/
STATIC int
-des_setkey(register const char *key)
+des_setkey(const char *key)
{
- register DCL_BLOCK(K, K0, K1);
- register C_block *ptabp;
- register int i;
+ DCL_BLOCK(K, K0, K1);
+ C_block *ptabp;
+ int i;
static int des_ready = 0;
if (!des_ready) {
{
/* variables that we want in registers, most important first */
#if defined(pdp11)
- register int j;
+ int j;
#endif
- register long L0, L1, R0, R1, k;
- register C_block *kp;
- register int ks_inc, loop_count;
+ long L0, L1, R0, R1, k;
+ C_block *kp;
+ int ks_inc, loop_count;
C_block B;
L0 = salt;
STATIC void
init_des(void)
{
- register int i, j;
- register long k;
- register int tableno;
+ int i, j;
+ long k;
+ int tableno;
static unsigned char perm[64], tmp32[32]; /* "static" for speed */
/*
init_perm(C_block perm[64 / CHUNKBITS][1 << CHUNKBITS],
unsigned char p[64], int chars_in, int chars_out)
{
- register int i, j, k, l;
+ int i, j, k, l;
for (k = 0; k < chars_out * 8; k++) { /* each output bit position */
l = p[k] - 1; /* where this bit comes from */
#if 0 /* static and doesn't appear to be referenced */
STATIC int
setkey(key)
- register const char *key;
+ const char *key;
{
- register int i, j, k;
+ int i, j, k;
C_block keyblock;
for (i = 0; i < 8; i++) {
*/
int
encrypt(block, flag)
- register char *block;
+ char *block;
int flag;
{
- register int i, j, k;
+ int i, j, k;
C_block cblock;
for (i = 0; i < 8; i++) {
STATIC
prtab(char *s, unsigned char *t, int num_rows)
{
- register int i, j;
+ int i, j;
(void)printf("%s:\n", s);
for (i = 0; i < num_rows; i++) {
afs_int32
des_ecb_encrypt(void * clear, void * cipher,
- register des_key_schedule schedule, int encrypt)
+ des_key_schedule schedule, int encrypt)
{
/* better pass 8 bytes, length not checked here */
- register afs_uint32 R1 = 0;
- register afs_uint32 L1 = 0; /* R1 = r10, L1 = r9 */
- register afs_uint32 R2 = 0, L2 = 0; /* R2 = r8, L2 = r7 */
+ afs_uint32 R1 = 0;
+ afs_uint32 L1 = 0; /* R1 = r10, L1 = r9 */
+ afs_uint32 R2 = 0, L2 = 0; /* R2 = r8, L2 = r7 */
afs_int32 i;
/* one more registers left on VAX, see below P_temp_p */
#ifdef BITS16
/* cbc_encrypt.c */
extern afs_int32 des_cbc_encrypt(void * in, void * out,
- register afs_int32 length,
+ afs_int32 length,
des_key_schedule key, des_cblock * iv,
int encrypt);
/* pcbc_encrypt.c */
extern afs_int32 des_pcbc_encrypt(void * in, void * out,
- register afs_int32 length,
+ afs_int32 length,
des_key_schedule key, des_cblock * iv,
int encrypt);
/* des.c */
extern afs_int32 des_ecb_encrypt(void * clear, void * cipher,
- register des_key_schedule schedule,
+ des_key_schedule schedule,
int encrypt);
/* util.c */
extern int des_is_weak_key(des_cblock key);
/* key_parity.c */
-extern void des_fixup_key_parity(register des_cblock key);
-extern int des_check_key_parity(register des_cblock key);
+extern void des_fixup_key_parity(des_cblock key);
+extern int des_check_key_parity(des_cblock key);
/* cksum.c */
extern afs_uint32 des_cbc_cksum(des_cblock * in, des_cblock * out,
- register afs_int32 length,
+ afs_int32 length,
des_key_schedule key, des_cblock * iv);
/* quad_cksum.c */
des_cblock * c_seed);
/* key_sched.c */
-extern int afs_des_key_sched(register des_cblock k,
+extern int afs_des_key_sched(des_cblock k,
des_key_schedule schedule);
-extern int des_key_sched(register des_cblock k, des_key_schedule schedule);
+extern int des_key_sched(des_cblock k, des_key_schedule schedule);
/* strng_to_key.c */
-extern void des_string_to_key(char *str, register des_cblock * key);
+extern void des_string_to_key(char *str, des_cblock * key);
/* new_rnd_key.c */
extern int des_random_key(des_cblock key);
int argc;
char *argv[];
{
- register int encrypt;
- register afs_int32 length;
- register int *p;
+ int encrypt;
+ afs_int32 length;
+ int *p;
afs_int32 ivec[2];
if (argc != 4) {
fprintf(stderr, "%s: Usage: %s infile outfile mode.\n", argv[0],
* vax order.
*/
void
-des_fixup_key_parity(register des_cblock key)
+des_fixup_key_parity(des_cblock key)
{
int i;
* correct des parity.
*/
int
-des_check_key_parity(register des_cblock key)
+des_check_key_parity(des_cblock key)
{
int i;
#ifdef AFS_DUX40_ENV
#pragma weak des_key_sched = afs_des_key_sched
int
-afs_des_key_sched(register des_cblock k, des_key_schedule schedule)
+afs_des_key_sched(des_cblock k, des_key_schedule schedule)
#else
int
-des_key_sched(register des_cblock k, des_key_schedule schedule)
+des_key_sched(des_cblock k, des_key_schedule schedule)
#endif
{
/* better pass 8 bytes, length not checked here */
- register int i, j, n; /* i = r10, j = r9, n = r8 */
- register unsigned int temp; /* r7 */
- register char *p_char; /* r6 */
+ int i, j, n; /* i = r10, j = r9, n = r8 */
+ unsigned int temp; /* r7 */
+ char *p_char; /* r6 */
key k_char;
i = 8;
n = 0;
}
static int
-make_key_sched(register key Key, des_key_schedule Schedule)
+make_key_sched(key Key, des_key_schedule Schedule)
{
/*
* The key has been converted to an array to make this run faster;
*/
/* r10, unroll by AUTH_DES_ITER */
- register int iter = AUTH_DES_ITER;
- register afs_uint32 *k; /* r9 */
- register int *kp; /* r8 */
- register afs_uint32 temp; /* r7 */
+ int iter = AUTH_DES_ITER;
+ afs_uint32 *k; /* r9 */
+ int *kp; /* r8 */
+ afs_uint32 temp; /* r7 */
kp = (int *)key_perm;
k = (afs_uint32 *) Schedule;
main()
{
- register i;
+ int i;
/* clear the output */
fprintf(stdout, "\n\tL2 = 0; R2 = 0;");
void
gen(FILE * stream)
{
- register int i;
+ int i;
#ifdef AFS_DARWIN80_ENV
int j;
void
gen(FILE * stream)
{
- register int i;
+ int i;
#ifdef AFS_DARWIN80_ENV
int j;
gen(FILE * stream)
{
/* Local Declarations */
- register int i, j, iter;
+ int i, j, iter;
/*
* initialize the key_position array s.t. key_position[i] = i;
* map a byte into its equivalent with odd parity, where odd
* parity is in the least significant bit
*/
- register int i, j, k, odd;
+ int i, j, k, odd;
fprintf(stream, "static unsigned char const odd_parity[256] = {\n");
void
gen(FILE * stream)
{
- register int i, j, k, m;
+ int i, j, k, m;
/* P permutes 32 bit input R1 into 32 bit output R2 */
#ifdef BIG
void
gen(FILE * stream)
{
- register afs_uint32 i, j, k, l, m, n;
+ afs_uint32 i, j, k, l, m, n;
/* rearrange the S table entries, and adjust for host bit order */
/* just return */
return;
#else /* LSBFIRST */
- register int old, new, i, j;
+ int old, new, i, j;
/* for an eight byte block-- */
/* flips the bit order within each byte from 0 lsb to 0 msb */
return x;
#else
char *array = (char *)&x;
- register int old, new, i, j;
+ int old, new, i, j;
/* flips the bit order within each byte from 0 lsb to 0 msb */
for (i = 0; i <= (sizeof(afs_int32) - 1); i++) {
afs_uint32
swap_six_bits_to_ansi(afs_uint32 old)
{
- register afs_uint32 new, j;
+ afs_uint32 new, j;
/* flips the bit order within each byte from 0 lsb to 0 msb */
new = 0;
afs_uint32
swap_four_bits_to_ansi(afs_uint32 old)
{
- register afs_uint32 new, j;
+ afs_uint32 new, j;
/* flips the bit order within each byte from 0 lsb to 0 msb */
new = 0;
* given the number of a bit position, >=1, flips the bit order
* each byte. e.g. bit 3 --> bit 6, bit 13 --> bit 12
*/
- register int y, z;
+ int y, z;
/* always do it, only used by des_make_key_perm.c so far */
y = (x - 1) / 8;
#ifdef MSBFIRST
return x;
#else /* LSBFIRST */
- register int y, z;
+ int y, z;
/*
* given the number of a bit position, >=0, flips the bit order
* bit 0 ==> msb, bit 7 lsb.
*/
- register int y, z;
+ int y, z;
/*
* given the number of a bit position, >=0, flips the bit order each
* byte. e.g. bit 3 --> bit 6, bit 13 --> bit 12
return x;
#else /* MSBFIRST */
- register int y, z;
+ int y, z;
/*
* given the number of a bit position, >=0, flips the bit order each
#else /* LSBFIRST */
char *array = (char *)&x;
- register afs_uint32 old, new, j;
+ afs_uint32 old, new, j;
/* flips the bit order within each byte from 0 lsb to 0 msb */
old = *array;
void
des_set_random_generator_seed(des_cblock key)
{
- register int i;
+ int i;
/* select the new stream: (note errors are not possible here...) */
LOCK_RANDOM;
/*
des_cblock *in; * >= length bytes of input text *
des_cblock *out; * >= length bytes of output text *
- register afs_int32 length; * in bytes *
+ afs_int32 length; * in bytes *
int encrypt; * 0 ==> decrypt, else encrypt *
des_key_schedule key; * precomputed key schedule *
des_cblock *iv; * 8 bytes of ivec *
*/
afs_int32
-des_pcbc_encrypt(void * in, void * out, register afs_int32 length,
+des_pcbc_encrypt(void * in, void * out, afs_int32 length,
des_key_schedule key, des_cblock * iv, int encrypt)
{
- register afs_uint32 *input = (afs_uint32 *) in;
- register afs_uint32 *output = (afs_uint32 *) out;
- register afs_uint32 *ivec = (afs_uint32 *) iv;
+ afs_uint32 *input = (afs_uint32 *) in;
+ afs_uint32 *output = (afs_uint32 *) out;
+ afs_uint32 *ivec = (afs_uint32 *) iv;
afs_uint32 i, j;
afs_uint32 t_input[2];
* checksum is written unto the address pointed to.
*/
- register afs_uint32 z;
- register afs_uint32 z2;
- register afs_uint32 x;
- register afs_uint32 x2;
- register unsigned char *p;
- register afs_int32 len;
- register int i;
+ afs_uint32 z;
+ afs_uint32 z2;
+ afs_uint32 x;
+ afs_uint32 x2;
+ unsigned char *p;
+ afs_int32 len;
+ int i;
/* use all 8 bytes of seed */
int ok = 0, cnt1 = 0;
char *ptr;
#if defined(AFS_HPUX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
- register int fno;
+ int fno;
struct sigaction newsig, oldsig;
struct termios save_ttyb, ttyb;
#endif
static
push_signals()
{
- register i;
+ int i;
for (i = 0; i < NSIG; i++)
old_sigfunc[i] = signal(i, sig_restore);
}
static
pop_signals()
{
- register i;
+ int i;
for (i = 0; i < NSIG; i++)
(void)signal(i, old_sigfunc[i]);
}
* convert an arbitrary length string to a DES key
*/
void
-des_string_to_key(char *str, register des_cblock * key)
+des_string_to_key(char *str, des_cblock * key)
{
- register char *in_str;
- register unsigned temp, i, j;
- register afs_int32 length;
+ char *in_str;
+ unsigned temp, i, j;
+ afs_int32 length;
unsigned char *k_p;
int forward;
- register char *p_char;
+ char *p_char;
char k_char[64];
des_key_schedule key_sked;
flip(array)
char *array;
{
- register old, new, i, j;
+ int old, new, i, j;
/* flips the bit order within each byte from 0 lsb to 0 msb */
for (i = 0; i <= 7; i++) {
old = *array;
flip(array)
char *array;
{
- register old, new, i, j;
+ int old, new, i, j;
/* flips the bit order within each byte from 0 lsb to 0 msb */
for (i = 0; i <= 7; i++) {
old = *array;
des_cblock_print_file(des_cblock * x, FILE * fp)
{
unsigned char *y = (unsigned char *)x;
- register int i = 0;
+ int i = 0;
fprintf(fp, " 0x { ");
while (i++ < 8) {
DInit(int abuffers)
{
/* Initialize the venus buffer system. */
- register int i, tsize;
- register struct buffer *tb;
- register char *tp;
+ int i, tsize;
+ struct buffer *tb;
+ char *tp;
Lock_Init(&afs_bufferLock);
/* Align each element of Buffers on a doubleword boundary */
* @retval NULL read failed
*/
void *
-DRead(register afs_int32 *fid, register int page)
+DRead(afs_int32 *fid, int page)
{
/* Read a page from the disk. */
- register struct buffer *tb, *tb2, **bufhead;
+ struct buffer *tb, *tb2, **bufhead;
ObtainWriteLock(&afs_bufferLock);
calls++;
}
static int
-FixupBucket(register struct buffer *ap)
+FixupBucket(struct buffer *ap)
{
- register struct buffer **lp, *tp;
- register int i;
+ struct buffer **lp, *tp;
+ int i;
/* first try to get it out of its current hash bucket, in which it might not be */
i = ap->hashIndex;
}
struct buffer *
-newslot(afs_int32 *afid, afs_int32 apage, register struct buffer *lp)
+newslot(afs_int32 *afid, afs_int32 apage, struct buffer *lp)
{
/* Find a usable buffer slot */
- register afs_int32 i;
+ afs_int32 i;
afs_int32 lt;
- register struct buffer **tbp;
+ struct buffer **tbp;
if (lp && (lp->lockers == 0)) {
lt = lp->accesstime;
DRelease(void *loc, int flag)
{
struct buffer *bp = (struct buffer *)loc;
- register int index;
+ int index;
if (!bp)
return;
}
int
-DVOffset(register void *ap)
+DVOffset(void *ap)
{
/* Return the byte within a file represented by a buffer pointer. */
- register struct buffer *bp = ap;
- register int index;
+ struct buffer *bp = ap;
+ int index;
index = ((char *)bp - BufferData) >> LOGPS;
if (index < 0 || index >= nbuffers)
}
void
-DZap(register afs_int32 *fid)
+DZap(afs_int32 *fid)
{
/* Destroy all buffers pertaining to a particular fid. */
- register struct buffer *tb;
+ struct buffer *tb;
ObtainReadLock(&afs_bufferLock);
for (tb = phTable[pHash(fid)]; tb; tb = tb->hashNext)
if (FidEq(tb->fid, fid)) {
}
int
-DFlushVolume(register afs_int32 vid)
+DFlushVolume(afs_int32 vid)
{
/* Flush all data and release all inode handles for a particular volume */
- register struct buffer *tb;
- register int code, rcode = 0;
+ struct buffer *tb;
+ int code, rcode = 0;
ObtainReadLock(&afs_bufferLock);
for (tb = phTable[vHash(vid)]; tb; tb = tb->hashNext)
if (FidVolEq(tb->fid, vid)) {
}
int
-DFlushEntry(register afs_int32 *fid)
+DFlushEntry(afs_int32 *fid)
{
/* Flush pages modified by one entry. */
- register struct buffer *tb;
+ struct buffer *tb;
int code;
ObtainReadLock(&afs_bufferLock);
DFlush(void)
{
/* Flush all the modified buffers. */
- register int i;
- register struct buffer **tbp;
+ int i;
+ struct buffer **tbp;
afs_int32 code, rcode;
rcode = 0;
}
void *
-DNew(register afs_int32 *fid, register int page)
+DNew(afs_int32 *fid, int page)
{
/* Same as read, only do *not* even try to read the page,
* since it probably doesn't exist.
*/
- register struct buffer *tb;
+ struct buffer *tb;
ObtainWriteLock(&afs_bufferLock);
if ((tb = newslot(fid, page, 0)) == 0) {
ReleaseWriteLock(&afs_bufferLock);
/* afs_buffer.c */
/* These are needed because afs_prototypes.h is not included here */
-extern void *DRead(register afs_int32 *fid, register int page);
-extern void *DNew(register afs_int32 *fid, register int page);
+extern void *DRead(afs_int32 *fid, int page);
+extern void *DNew(afs_int32 *fid, int page);
#endif /* !defined(UKERNEL) */
#include "afs/afs_osi.h"
int
NameBlobs(char *name)
{
- register int i;
+ int i;
i = strlen(name) + 1;
return 1 + ((i + 15) >> 5);
}
{
afs_int32 *vfid = (afs_int32 *) voidfid;
int blobs, firstelt;
- register int i;
- register struct DirEntry *ep;
+ int i;
+ struct DirEntry *ep;
unsigned short *pp = NULL;
- register struct DirHeader *dhp;
+ struct DirHeader *dhp;
/* check name quality */
if (*entry == 0)
{
/* Delete an entry from a directory, including update of all free entry descriptors. */
int nitems, index;
- register struct DirEntry *firstitem;
+ struct DirEntry *firstitem;
unsigned short *previtem;
firstitem = FindItem(dir, entry, &previtem);
if (firstitem == 0)
FindBlobs(void *dir, int nblobs)
{
/* Find a bunch of contiguous entries; at least nblobs in a row. */
- register int i, j, k;
+ int i, j, k;
int failed = 0;
- register struct DirHeader *dhp;
+ struct DirHeader *dhp;
struct PageHeader *pp;
int pgcount;
void
AddPage(void *dir, int pageno)
{ /* Add a page to a directory. */
- register int i;
- register struct PageHeader *pp;
+ int i;
+ struct PageHeader *pp;
pp = (struct PageHeader *)DNew(dir, pageno); /* Get a new buffer labelled dir,pageno */
pp->tag = htons(1234);
/* Free a whole bunch of directory entries. */
void
-FreeBlobs(void *dir, register int firstblob, int nblobs)
+FreeBlobs(void *dir, int firstblob, int nblobs)
{
- register int i;
+ int i;
int page;
struct DirHeader *dhp;
struct PageHeader *pp;
int
MakeDir(void *dir, afs_int32 * me, afs_int32 * parent)
{
- register int i;
- register struct DirHeader *dhp;
+ int i;
+ struct DirHeader *dhp;
dhp = (struct DirHeader *)DNew(dir, 0);
dhp->header.pgcount = htons(1);
dhp->header.tag = htons(1234);
Lookup(void *dir, char *entry, void *voidfid)
{
afs_int32 *fid = (afs_int32 *) voidfid;
- register struct DirEntry *firstitem;
+ struct DirEntry *firstitem;
unsigned short *previtem;
firstitem = FindItem(dir, entry, &previtem);
LookupOffset(void *dir, char *entry, void *voidfid, long *offsetp)
{
afs_int32 *fid = (afs_int32 *) voidfid;
- register struct DirEntry *firstitem;
+ struct DirEntry *firstitem;
unsigned short *previtem;
firstitem = FindItem(dir, entry, &previtem);
/* Enumerate the contents of a directory.
* Break when hook function returns non 0.
*/
- register int i;
+ int i;
int num;
- register struct DirHeader *dhp;
- register struct DirEntry *ep;
+ struct DirHeader *dhp;
+ struct DirEntry *ep;
int code = 0;
dhp = (struct DirHeader *)DRead(dir, 0);
IsEmpty(void *dir)
{
/* Enumerate the contents of a directory. */
- register int i;
+ int i;
int num;
- register struct DirHeader *dhp;
- register struct DirEntry *ep;
+ struct DirHeader *dhp;
+ struct DirEntry *ep;
dhp = (struct DirHeader *)DRead(dir, 0);
if (!dhp)
return 0;
}
int
-DirHash(register char *string)
+DirHash(char *string)
{
/* Hash a string to a number between 0 and NHASHENT. */
- register unsigned char tc;
+ unsigned char tc;
unsigned int hval;
- register int tval;
+ int tval;
hval = 0;
while ((tc = (*string++))) {
hval *= 173;
static struct DirEntry *
FindItem(void *dir, char *ename, unsigned short **previtem)
{
- register int i;
- register struct DirHeader *dhp;
- register unsigned short *lp;
- register struct DirEntry *tp;
+ int i;
+ struct DirHeader *dhp;
+ unsigned short *lp;
+ struct DirEntry *tp;
i = DirHash(ename);
dhp = (struct DirHeader *)DRead(dir, 0);
if (!dhp)
* however, no items are left locked, and a null pointer is returned
* instead.
*/
- register int i;
- register struct DirHeader *dhp;
- register unsigned short *lp;
- register struct DirEntry *tp;
+ int i;
+ struct DirHeader *dhp;
+ unsigned short *lp;
+ struct DirEntry *tp;
dhp = (struct DirHeader *) DRead(dir,0);
if (!dhp) return 0;
for (i=0; i<NHASHENT; i++) {
afs_uint32 length)
{
/* Look for the name pointing to given vnode and unique in a directory */
- register struct DirEntry *entry;
+ struct DirEntry *entry;
int code = 0;
entry = FindFid(dir, vnode, unique);
extern int Delete(void *dir, char *entry);
extern int FindBlobs(void *dir, int nblobs);
extern void AddPage(void *dir, int pageno);
-extern void FreeBlobs(void *dir, register int firstblob, int nblobs);
+extern void FreeBlobs(void *dir, int firstblob, int nblobs);
extern int MakeDir(void *dir, afs_int32 * me, afs_int32 * parent);
extern int Lookup(void *dir, char *entry, void *fid);
extern int LookupOffset(void *dir, char *entry, void *fid, long *offsetp);
void *hook);
extern int IsEmpty(void *dir);
extern struct DirEntry *GetBlob(void *dir, afs_int32 blobno);
-extern int DirHash(register char *string);
+extern int DirHash(char *string);
extern int DStat(int *abuffers, int *acalls, int *aios);
extern void DRelease(void *loc, int flag);
-extern int DVOffset(register void *ap);
-extern int DFlushVolume(register afs_int32 vid);
-extern int DFlushEntry(register afs_int32 *fid);
+extern int DVOffset(void *ap);
+extern int DFlushVolume(afs_int32 vid);
+extern int DFlushEntry(afs_int32 *fid);
extern int InverseLookup (void *dir, afs_uint32 vnode, afs_uint32 unique,
char *name, afs_uint32 length);
in afs_prototypes.h */
#ifndef KERNEL
extern int DInit(int abuffers);
-extern void *DRead(register afs_int32 *fid, register int page);
+extern void *DRead(afs_int32 *fid, int page);
extern int DFlush(void);
-extern void *DNew(register afs_int32 *fid, register int page);
-extern void DZap(register afs_int32 *fid);
+extern void *DNew(afs_int32 *fid, int page);
+extern void DZap(afs_int32 *fid);
/* salvage.c */
/* figure out how many pages in use in a directory, given ptr to its (locked)
* header */
static int
-ComputeUsedPages(register struct DirHeader *dhp)
+ComputeUsedPages(struct DirHeader *dhp)
{
- register afs_int32 usedPages, i;
+ afs_int32 usedPages, i;
if (dhp->header.pgcount != 0) {
/* new style */
/* First do a MakeDir on the target. */
afs_int32 dot[3], dotdot[3], lfid[3], code, usedPages;
char tname[256];
- register int i;
- register char *tp;
+ int i;
+ char *tp;
struct DirHeader *dhp;
struct DirEntry *ep;
int entry;
}
LookupDir(dname, ename)
- register char *dname, *ename;
+ char *dname, *ename;
{
dirhandle dir;
long fid[3], code;
}
AddEntry(dname, ename)
- register char *dname, *ename;
+ char *dname, *ename;
{
dirhandle dir;
long fid[3], code;
char *ename;
{
dirhandle dir;
- register long code;
+ long code;
OpenDir(dname, &dir);
code = Delete(&dir, ename);
int count;
{
char tbuffer[200];
- register long i, code;
+ long i, code;
long fid[3];
dirhandle dir;
int
FidZap(afid)
- register long *afid;
+ long *afid;
{ /* Zero out a file */
*afid = 0;
}
int
FidZero(afid)
- register long *afid;
+ long *afid;
{ /* Zero out a file */
*afid = 0;
}
int
FidEq(afid, bfid)
- register long *afid, *bfid;
+ long *afid, *bfid;
{ /* Compare two fids for equality. */
if (*afid != *bfid)
return 0;
int
FidVolEq(afid, bfid)
- register long *afid, *bfid;
+ long *afid, *bfid;
{ /* Is fid in a particular volume */
return 1;
}
int
FidCpy(dfid, sfid)
- register long *dfid, *sfid;
+ long *dfid, *sfid;
{ /* Assign one fid to another. */
*dfid = *sfid;
}
main(argc, argv)
char **argv;
{
- register add, del;
- register c;
+ int add, del;
+ int c;
int res;
char *file;
mid_t kmid;
main(argc, argv)
char **argv;
{
- register add, del, opts;
- register c;
+ int add, del, opts;
+ int c;
char *file;
mid_t kmid;
struct cfg_load cload;
*/
#define SYMBUFSIZE 1048576
xlate_xtok(xp, kp, strp, szp)
- register struct syment *xp;
- register sym_t *kp;
+ struct syment *xp;
+ sym_t *kp;
char **strp;
uint *szp;
{
- register len;
+ int len;
static char *export_strings = NULL, *prev = "";
static left, offset, sz;
* This is rather inefficient.
*/
find_suffix(p, strings, max, offp)
- register char *p, *strings;
+ char *p, *strings;
uint *offp;
{
- register char *q, *e;
- register len = strlen(p) - 1;
+ char *q, *e;
+ int len = strlen(p) - 1;
strings += sizeof(uint);
max -= sizeof(uint);
* C_EXT < C_HIDEXT;
*/
xsym_compar(xp, xq)
- register struct syment *xp, *xq;
+ struct syment *xp, *xq;
{
- register char *p, *q;
- register compar;
+ char *p, *q;
+ int compar;
#ifndef __XCOFF64__
p = (xp->n_zeroes ? xp->n_name : xp->n_nptr);
* config - process configuration data
*/
config(uiop)
- register struct uio *uiop;
+ struct uio *uiop;
{
struct k_conf conf;
- register struct export_nl *np;
- register sym_t *sym;
- register err;
+ struct export_nl *np;
+ sym_t *sym;
+ int err;
if (err = uiomove((char *)&conf, sizeof(conf), UIO_WRITE, uiop))
return err;
import_kfunc(struct k_func * kfp)
{
- register sym_t *sym;
- register i, pri;
+ sym_t *sym;
+ int i, pri;
#if 0
static caddr_t *g_toc;
#endif
*/
import_kvar(struct k_var * kvp, caddr_t * toc)
{
- register sym_t *sym;
- register i, pri;
+ sym_t *sym;
+ int i, pri;
label_t jmpbuf;
switch (setjmpx(&jmpbuf)) {
{
static sym_t *symsrch(), *search();
char buf[64];
- register sym_t *sym;
+ sym_t *sym;
if (name) {
/*
search(addr)
unsigned addr;
{
- register sym_t *sp;
- register sym_t *save;
+ sym_t *sp;
+ sym_t *save;
unsigned value;
value = 0;
static sym_t *
symsrch(s)
- register char *s;
+ char *s;
{
- register sym_t *sp;
- register sym_t *found;
- register len;
- register char *p;
+ sym_t *sp;
+ sym_t *found;
+ int len;
+ char *p;
/*
* determine length of symbol
*/
sym_t *
sym_flex(sym)
- register sym_t *sym;
+ sym_t *sym;
{
static sym_t symbol;
static char name[48];
* > xdr_elem: routine to XDR each element
*/
bool_t
-xdr_vector(register XDR * xdrs, register char *basep, register u_int nelem,
- register u_int elemsize, register xdrproc_t xdr_elem)
+xdr_vector(XDR * xdrs, char *basep, u_int nelem,
+ u_int elemsize, xdrproc_t xdr_elem)
{
- register u_int i;
- register char *elptr;
+ u_int i;
+ char *elptr;
elptr = basep;
for (i = 0; i < nelem; i++) {
{ /*fsprobe_LWP */
static char rn[] = "fsprobe_LWP"; /*Routine name */
- register afs_int32 code; /*Results of calls */
+ afs_int32 code; /*Results of calls */
struct timeval tv; /*Time structure */
int conn_idx; /*Connection index */
struct fsprobe_ConnectionInfo *curr_conn; /*Current connection */
{
struct pIDs partIds;
struct partEntries partEnts;
- register int i, j = 0, code;
+ int i, j = 0, code;
*cntp = 0;
if (newvolserver == 1) {
{ /*fsprobe_Init */
static char rn[] = "fsprobe_Init"; /*Routine name */
- register afs_int32 code; /*Return value */
+ afs_int32 code; /*Return value */
static struct rx_securityClass *CBsecobj; /*Callback security object */
struct rx_securityClass *secobj; /*Client security object */
struct rx_service *rxsrv_afsserver; /*Server for AFS */
{ /*Main routine */
static char rn[] = "fsprobe_test"; /*Routine name */
- register afs_int32 code; /*Return code */
+ afs_int32 code; /*Return code */
struct sockaddr_in FSSktArray[3]; /*socket array */
struct hostent *he; /*Host entry */
struct timeval tv; /*Time structure */
{ /*main */
- register afs_int32 code; /*Return code */
+ afs_int32 code; /*Return code */
struct gator_textcb_hdr *newCB; /*Ptr to new CB hdr */
char buf[1024]; /*Text buffer */
int do_debugging; /*Print out debugging info? */
{
struct gwin *awindow = (struct gwin *) aparam;
- register struct gtx_frame *tframe;
- register char *tp;
- register int pos;
+ struct gtx_frame *tframe;
+ char *tp;
+ int pos;
tframe = awindow->w_frame;
if (!(tp = tframe->defaultLine))
{
struct gwin *awindow = (struct gwin *) aparam;
- register struct gtx_frame *tframe;
+ struct gtx_frame *tframe;
tframe = awindow->w_frame;
tframe->flags |= GTXFRAME_RECURSIVEEND;
{
struct gwin *awindow = (struct gwin *) aparam;
- register struct gtx_frame *tframe;
+ struct gtx_frame *tframe;
tframe = awindow->w_frame;
tframe->flags |= GTXFRAME_RECURSIVEEND;
int arock = (intptr_t)rockparam;
- register struct gtx_frame *tframe;
- register int pos;
- register char *tp;
+ struct gtx_frame *tframe;
+ int pos;
+ char *tp;
tframe = awindow->w_frame;
if (!(tp = tframe->defaultLine))
SaveMap(struct gtx_frame *aframe)
{
char tstring[2];
- register int i;
+ int i;
if (!recursiveMap) {
/* setup recursive edit map if not previously done */
int
gtxframe_AddMenu(struct gtx_frame *aframe, char *alabel, char *astring)
{
- register struct gtxframe_menu *tmenu;
+ struct gtxframe_menu *tmenu;
if (aframe->menus)
for (tmenu = aframe->menus; tmenu; tmenu = tmenu->next) {
int
gtxframe_DeleteMenu(struct gtx_frame *aframe, char *alabel)
{
- register struct gtxframe_menu *tm, **lm;
+ struct gtxframe_menu *tm, **lm;
for (lm = &aframe->menus, tm = *lm; tm; lm = &tm->next, tm = *lm) {
if (strcmp(alabel, tm->name) == 0) {
gtxframe_ClearMenus(struct gtx_frame *aframe)
{
- register struct gtxframe_menu *tm, *nm;
+ struct gtxframe_menu *tm, *nm;
if (aframe->menus != (struct gtxframe_menu *)0) {
for (tm = aframe->menus; tm; tm = nm) {
gtxframe_AskForString(struct gtx_frame *aframe, char *aprompt,
char *adefault, char *aresult, int aresultSize)
{
- register int code;
- register char *tp;
+ int code;
+ char *tp;
/* Ensure recursive-edit map is initialized */
SaveMap(aframe);
{
struct gwin_strparams strparms;
struct gwin_sizeparams sizeparms;
- register char *tp;
+ char *tp;
if (!aframe->window)
return -1;
int
gtxframe_Display(struct gtx_frame *aframe, struct gwin *awm)
{
- register struct gtxframe_dlist *tlist;
- register struct gtxframe_menu *tm;
+ struct gtxframe_dlist *tlist;
+ struct gtxframe_menu *tm;
struct gwin_strparams strparms;
/* Run through the menus, displaying them on the top line */
int
gtxframe_AddToList(struct gtx_frame *aframe, struct onode *aobj)
{
- register struct gtxframe_dlist *tlist;
+ struct gtxframe_dlist *tlist;
for (tlist = aframe->display; tlist; tlist = tlist->next) {
if (tlist->data == (char *)aobj) {
int
gtxframe_RemoveFromList(struct gtx_frame *aframe, struct onode *aobj)
{
- register struct gtxframe_dlist *tlist, **plist;
+ struct gtxframe_dlist *tlist, **plist;
plist = &aframe->display;
for (tlist = *plist; tlist; plist = &tlist->next, tlist = *plist) {
int
gtxframe_ClearList(struct gtx_frame *aframe)
{
- register struct gtxframe_dlist *tlist, *nlist;
+ struct gtxframe_dlist *tlist, *nlist;
if (aframe->display != (struct gtxframe_dlist *)0) {
/*
struct gwin * awin = (struct gwin *) param1;
afs_int32 arock = (intptr_t)param2;
- register struct gtx_frame *tf;
- register afs_int32 code;
+ struct gtx_frame *tf;
+ afs_int32 code;
tf = awin->w_frame;
if (!tf)
struct gwin *awin = (struct gwin *) param1;
afs_int32 arock = (intptr_t)param2;
- register struct gtx_frame *tf;
- register afs_int32 code;
+ struct gtx_frame *tf;
+ afs_int32 code;
tf = awin->w_frame;
if (!tf)
{
struct gwin *awin = (struct gwin *) param;
char tbuffer[100];
- register afs_int32 code;
+ afs_int32 code;
code =
gtxframe_AskForString(awin->w_frame, "New object string: ", "TestNew",
struct gwin *win;
struct gator_textobj_params textcrparams;
struct gator_light_crparams lightcrparams;
- register struct keymap_map *tmap;
+ struct keymap_map *tmap;
win = gtx_Init(0, -1);
{
struct gwin *awin = (struct gwin *) param;
- register int tc;
- register int code;
- register struct gtx_frame *tframe;
+ int tc;
+ int code;
+ struct gtx_frame *tframe;
WOP_DISPLAY(awin); /* start off with a clean display */
while (1) {
PROCESS junk;
struct onode_initparams oi_params; /* object init params */
struct gwin_initparams wi_params; /* window initialization params */
- register struct gwin *twin;
- register int code;
+ struct gwin *twin;
+ int code;
/* setup the main window structure */
wi_params.i_type = GATOR_WIN_CURSES;
struct keymap_map *
keymap_Create(void)
{
- register struct keymap_map *tmap;
+ struct keymap_map *tmap;
tmap = (struct keymap_map *)malloc(sizeof(struct keymap_map));
if (tmap != (struct keymap_map *)0)
/* make a copy of a string; generic utility */
char *
-gtx_CopyString(register char *aval)
+gtx_CopyString(char *aval)
{
- register char *tp;
+ char *tp;
if (!aval)
return NULL; /* propagate null strings around */
static int
BindIt(struct keymap_map *amap, int aslot, int atype, void *aproc, char *aname, void *arock)
{
- register char *tp;
- register struct keymap_entry *tentry;
+ char *tp;
+ struct keymap_entry *tentry;
if (aslot < 0 || aslot >= KEYMAP_NENTRIES)
return -1;
int (*aproc)(void *, void *),
char *aname, void *arock)
{
- register char *cptr;
- register int tc;
- register afs_int32 code;
+ char *cptr;
+ int tc;
+ afs_int32 code;
struct keymap_map *tmap;
cptr = astring;
int
keymap_Delete(struct keymap_map *amap)
{
- register int i;
- register struct keymap_entry *tentry;
+ int i;
+ struct keymap_entry *tentry;
for (i = 0; i < KEYMAP_NENTRIES; i++) {
tentry = &amap->entries[i];
int
keymap_ProcessKey(struct keymap_state *astate, int akey, void *arock)
{
- register struct keymap_entry *tentry;
- register afs_int32 code;
+ struct keymap_entry *tentry;
+ afs_int32 code;
if (akey < 0 || akey >= KEYMAP_NENTRIES)
return -1;
{ /*test_objects */
static char rn[] = "test_objects"; /*Routine name */
- register int code; /*Return code */
+ int code; /*Return code */
struct onode_initparams oi_params; /*Init params */
struct gwin_initparams wi_params; /*Window initialization params */
#if 0
{ /*main */
static char rn[] = "main"; /*Routine name */
- register afs_int32 code; /*Return code */
- register struct cmd_syndesc *ts; /*Ptr to cmd line syntax descriptor */
+ afs_int32 code; /*Return code */
+ struct cmd_syndesc *ts; /*Ptr to cmd line syntax descriptor */
/*
* Set up the commands we understand.
static char rn[] = "gator_objects_init"; /*Routine name */
static int initialized = 0; /*Have we been called? */
- register int code; /*Return code */
+ int code; /*Return code */
/*
* If we've already been called, just return.
{ /*gator_objects_create */
static char rn[] = "gator_objects_create"; /*Routine name */
- register int code; /*Return code */
+ int code; /*Return code */
struct onode *new_onode; /*Ptr to new onode */
if (objects_debug) {
{ /*test_this_package */
static char rn[] = "test_this_package"; /*Routine name */
- register int code; /*Return code */
+ int code; /*Return code */
struct gwin_initparams init_params; /*Window initialization params */
struct gator_cursesgwin_params c_crparams; /*Curses window creation params */
struct gator_dumbgwin_params d_crparams; /*Dumb terminal window creation params */
{ /*main */
static char rn[] = "main"; /*Routine name */
- register afs_int32 code; /*Return code */
- register struct cmd_syndesc *ts; /*Ptr to cmd line syntax descriptor */
+ afs_int32 code; /*Return code */
+ struct cmd_syndesc *ts; /*Ptr to cmd line syntax descriptor */
/*
* There really aren't any opcodes here, but we do want to interpret switches
{ /*gator_text_Write */
static char rn[] = "gator_text_Write"; /*Routine name */
- register int code; /*Return value on routines */
+ int code; /*Return value on routines */
struct gator_textobj *text_data; /*Ptr to text obj data */
struct gator_textcb_hdr *cbHdr; /*Ptr to text CB header */
int i; /*Loop variable */
{ /*gator_text_BlankLine */
static char rn[] = "gator_text_BlankLine"; /*Routine name */
- register int code; /*Return value on routines */
+ int code; /*Return value on routines */
struct gator_textobj *text_data; /*Ptr to text obj data */
/*
{ /*gw_init */
static char rn[] = "gw_init"; /*Routine name */
- register int code; /*Return code */
+ int code; /*Return code */
int gwin_debug; /*Is debugging turned on? */
/*
}
static void
-add_std_args(register struct cmd_syndesc *ts)
+add_std_args(struct cmd_syndesc *ts)
{
cmd_Seek(ts, 12);
/* 12 */ cmd_AddParm(ts, "-admin_username", CMD_SINGLE, CMD_OPTIONAL,
afs_int32
ka_AdminInteractive(int cmd_argc, char *cmd_argv[])
{
- register int code;
- register struct cmd_syndesc *ts;
+ int code;
+ struct cmd_syndesc *ts;
char line[BUFSIZ];
afs_int32 argc;
int argc;
char **argv;
{
- register int i;
- register long code;
+ int i;
+ long code;
long cc, upos = 0, gpos;
struct ubik_hdr *uh;
char *dfile = 0;
display_entry(offset)
int offset;
{
- register int i;
+ int i;
struct kaentry dbentry;
int count;
unsigned char x[8];
static int index_OK(afs_int32);
afs_int32
-NameHash(register char *aname, register char *ainstance)
+NameHash(char *aname, char *ainstance)
{
- register unsigned int hash;
- register int i;
+ unsigned int hash;
+ int i;
/* stolen directly from the HashString function in the vol package */
hash = 0;
afs_int32
AllocBlock(struct ubik_trans *at, struct kaentry *tentry)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 temp;
if (cheader.freePtr) {
FindBlock(struct ubik_trans *at, char *aname, char *ainstance, afs_int32 *toP,
struct kaentry *tentry)
{
- register afs_int32 i, code;
- register afs_int32 to;
+ afs_int32 i, code;
+ afs_int32 to;
*toP = 0;
i = NameHash(aname, ainstance);
afs_int32
UnthreadBlock(struct ubik_trans *at, struct kaentry *aentry)
{
- register afs_int32 i, code;
- register afs_int32 to;
+ afs_int32 i, code;
+ afs_int32 to;
afs_int32 lo;
struct kaentry tentry;
struct ktc_encryptionKey *key, afs_int32 caller,
afs_int32 flags)
{
- register int code;
+ int code;
afs_int32 to;
struct kaentry tentry;
afs_int32 maxLifetime;
kamCreateUser(struct rx_call *call, char *aname, char *ainstance,
EncryptionKey ainitpw)
{
- register int code;
+ int code;
struct ubik_trans *tt;
afs_int32 caller; /* Disk offset of caller's entry */
ChangePassWord(struct rx_call *call, char *aname, char *ainstance,
ka_CBS *arequest, ka_BBS *oanswer)
{
- register int code;
+ int code;
struct ubik_trans *tt;
afs_int32 to; /* offset of block */
struct kaentry tentry;
kamSetPassword(struct rx_call *call, char *aname, char *ainstance,
afs_int32 akvno, EncryptionKey apassword)
{
- register int code;
+ int code;
struct ubik_trans *tt;
afs_int32 caller; /* Disk offset of caller's entry */
struct kaentry tentry;
afs_int32
kamDeleteUser(struct rx_call *call, char *aname, char *ainstance)
{
- register int code;
+ int code;
struct ubik_trans *tt;
afs_int32 caller;
afs_int32 to;
afs_int32 aversion, /* major version assumed by caller */
kaentryinfo *aentry) /* entry data copied here */
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
afs_int32 callerIndex;
struct kaentry caller;
afs_int32 *count, /* total entries in database */
kaident *name) /* name & instance of this entry */
{
- register int code;
+ int code;
struct ubik_trans *tt;
afs_int32 caller;
struct kaentry tentry;
afs_int32 spare3,
afs_int32 spare4)
{
- register int code;
+ int code;
struct ubik_trans *tt;
afs_int32 caller;
afs_int32 to;
afs_int32 spare3,
afs_int32 spare4)
{
- register int code;
+ int code;
struct ubik_trans *tt;
afs_int32 callerIndex;
afs_int32 to;
/* is the key all zeros? */
int
-ka_KeyIsZero(register char *akey, register int alen)
+ka_KeyIsZero(char *akey, int alen)
{
- register int i;
+ int i;
for (i = 0; i < alen; i++) {
if (*akey++ != 0)
return 0;
extern afs_int32 ka_KeyCheckSum(char *key, afs_uint32 * cksumP);
-extern int ka_KeyIsZero(register char *akey, register int alen);
+extern int ka_KeyIsZero(char *akey, int alen);
extern void ka_timestr(afs_int32 time, char *tstr, afs_int32 tlen);
const char *dbmfile;
static int
-cmdproc(register struct cmd_syndesc *as, void * arock)
+cmdproc(struct cmd_syndesc *as, void * arock)
{
DBM *kdb;
datum key, data;
kalog_elt rdata;
afs_int32 cnt = 0;
- register struct cmd_item *ti;
+ struct cmd_item *ti;
if (as->parms[0].items) {
dbmfile = as->parms[0].items->data;
int
main(int argc, char **argv)
{
- register struct cmd_syndesc *ts;
- register afs_int32 code;
+ struct cmd_syndesc *ts;
+ afs_int32 code;
char dbmfile_help[AFSDIR_PATH_MAX];
sprintf(dbmfile_help, "dbmfile to use (default %s)",
/* this function returns TRUE (1) if the file is in AFS, otherwise false (0) */
static int
-InAFS(register char *apath)
+InAFS(char *apath)
{
struct ViceIoctl blob;
- register afs_int32 code;
+ afs_int32 code;
char space[AFS_PIOCTL_MAXSIZE];
blob.in_size = 0;
{
static char gpbuf[BUFSIZ];
/* read a password from stdin, stop on \n or eof */
- register int i, tc;
+ int i, tc;
memset(gpbuf, 0, sizeof(gpbuf));
for (i = 0; i < (sizeof(gpbuf) - 1); i++) {
tc = fgetc(stdin);
#include <grp.h>
static gid_t tty_gid(int default_gid);
-static void getloginname(register struct utmp *up);
+static void getloginname(struct utmp *up);
#define TTYGRPNAME "tty" /* name of group to own ttys */
#define TTYGID(gid) tty_gid(gid) /* gid that owns all ttys */
int
main(int argc, char **argv)
{
- register char *namep;
+ char *namep;
int pflag = 0, hflag = 0, t, f, c;
int invalid, quietlog;
FILE *nlfd;
}
static void
-getloginname(register struct utmp *up)
+getloginname(struct utmp *up)
{
- register char *namep;
+ char *namep;
int c;
while (up->ut_name[0] == '\0') {
int
rootterm(char *tty)
{
- register struct ttyent *t;
+ struct ttyent *t;
if ((t = getttynam(tty)) != NULL) {
if (t->ty_status & TTY_SECURE)
showmotd(void)
{
FILE *mf;
- register c;
+ int c;
signal(SIGINT, catch);
if ((mf = fopen("/etc/motd", "r")) != NULL) {
char *
stypeof(char *ttyid)
{
- register struct ttyent *t;
+ struct ttyent *t;
if (ttyid == NULL || (t = getttynam(ttyid)) == NULL)
return (UNKNOWN);
static void
doremoteterm(char *term, struct sgttyb *tp)
{
- register char *cp = strchr(term, '/'), **cpp;
+ char *cp = strchr(term, '/'), **cpp;
char *speed;
if (cp) {
int index, newIndex;
char *stp; /* secret token ptr */
struct ClearToken ct;
- register char *tp;
+ char *tp;
afs_int32 temp, gotit = 0;
int maxLen; /* biggest ticket we can copy */
int tktLen; /* server ticket length */
}
static int
-cmdproc(register struct cmd_syndesc *as, void *arock)
+cmdproc(struct cmd_syndesc *as, void *arock)
{
- register struct hostent *the;
+ struct hostent *the;
char *tp, *sysname = 0;
afs_int32 uid, addr;
- register afs_int32 code;
+ afs_int32 code;
the = (struct hostent *)
hostutil_GetHostByName(tp = as->parms[0].items->data);
int
main(int argc, char **argv)
{
- register struct cmd_syndesc *ts;
- register afs_int32 code;
+ struct cmd_syndesc *ts;
+ afs_int32 code;
#ifdef AFS_AIX32_ENV
/*
getpipepass(char *gpbuf, int len)
{
/* read a password from stdin, stop on \n or eof */
- register int i, tc;
+ int i, tc;
memset(gpbuf, 0, len);
for (i = 0; i < len; i++) {
tc = fgetc(stdin);
{
static char gpbuf[BUFSIZ];
/* read a password from stdin, stop on \n or eof */
- register int i, tc;
+ int i, tc;
memset(gpbuf, 0, sizeof(gpbuf));
for (i = 0; i < (sizeof(gpbuf) - 1); i++) {
tc = fgetc(stdin);
static
push_signals(void)
{
- register i;
+ int i;
for (i = 0; i < NSIG; i++)
old_sigfunc[i] = signal(i, sig_restore);
}
static
pop_signals(void)
{
- register i;
+ int i;
for (i = 0; i < NSIG; i++)
signal(i, old_sigfunc[i]);
}
{
static char gpbuf[BUFSIZ];
/* read a password from stdin, stop on \n or eof */
- register int i, tc;
+ int i, tc;
memset(gpbuf, 0, sizeof(gpbuf));
for (i = 0; i < (sizeof(gpbuf) - 1); i++) {
tc = fgetc(stdin);
IN int argc;
IN char *argv[];
{
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
long code;
initialize_U_error_table();
static void
ListCellsCmd()
{
- register long code;
+ long code;
long i, j;
char *tcp;
long clear;
char *
SkipLine(astr)
- register char *astr;
+ char *astr;
{
while (*astr != '\n')
astr++;
ZapList(alist)
struct AclEntry *alist;
{
- register struct AclEntry *tp, *np;
+ struct AclEntry *tp, *np;
for (tp = alist; tp; tp = np) {
np = tp->next;
free(tp);
AddTester(pathname)
char *pathname;
{
- register long code;
+ long code;
struct ViceIoctl blob;
struct Acl *al;
char space[AFS_PIOCTL_MAXSIZE];
IN int argc;
IN char *argv[];
{
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
long code;
initialize_U_error_table();
* exceeds ACL_MAXENTRIES, or a failure code from the protection server
* if the problem occured there. */
- register int i;
- register int j;
- register int code;
- register char *nextc;
+ int i;
+ int j;
+ int code;
+ char *nextc;
idlist lids;
namelist lnames;
/* Converts the external access list elist into the access list acl.
* Returns 0 on success, -1 if ANY name is not translatable, or if
* the number of entries exceeds al_maxExtEntries. */
- register int i;
- register int j;
- register char *nextc;
- register afs_int32 code;
+ int i;
+ int j;
+ char *nextc;
+ afs_int32 code;
int p, n;
namelist lnames;
idlist lids;
int
PRights(arights)
- register long arights;
+ long arights;
{
if (arights & PRSFS_READ)
printf("r");
long
Convert(arights)
- register char *arights;
+ char *arights;
{
- register int i, len;
+ int i, len;
long mode;
- register char tc;
+ char tc;
if (!strcmp(arights, "read"))
return PRSFS_READ | PRSFS_LOOKUP;
if (!strcmp(arights, "write"))
main()
{
- register long code;
+ long code;
char op[3];
char name[64];
static int
Parent(char *directory, char *parentDirectory)
{
- register char *tp;
+ char *tp;
int rc = 0;
strcpy(parentDirectory, directory);
static int
LocalFreeTokens(struct token *alist)
{
- register struct token *nlist;
+ struct token *nlist;
for (; alist; alist = nlist) {
nlist = alist->next;
free(alist->key);
char *tptr = NULL;
int inToken;
struct token *first, *last;
- register struct token *ttok;
- register int tc;
+ struct token *ttok;
+ int tc;
inToken = 0; /* not copying token chars at start */
first = NULL;
{
int field;
short temp;
- register char *tp;
- register int tc;
+ char *tp;
+ int tc;
field = 0; /* 0=hour, 1=min, 2=sec */
temp = 0;
ktime_ParsePeriodic(char *adate, bos_RestartTime_p ak)
{
struct token *tt;
- register afs_int32 code;
+ afs_int32 code;
struct ptemp *tp;
memset(ak, 0, sizeof(*ak));
static afs_uint32
GetServer(char *aname)
{
- register struct hostent *th;
+ struct hostent *th;
afs_uint32 addr;
int b1, b2, b3, b4;
- register afs_int32 code;
+ afs_int32 code;
char hostname[MAXHOSTCHARS];
code = sscanf(aname, "%d.%d.%d.%d", &b1, &b2, &b3, &b4);
size_t prefix_len = 0;
nbulkentries arrayEntries;
afs_int32 nentries = 0;
- register struct nvldbentry *entry;
+ struct nvldbentry *entry;
int i;
afs_int32 rw_volid, rw_server, rw_partition;
int previdx;
OldVLDB_to_NewVLDB(struct vldbentry *source, struct nvldbentry *dest,
afs_status_p st)
{
- register int i;
+ int i;
int rc = 0;
afs_status_t tst = 0;
NewVLDB_to_OldVLDB(struct nvldbentry *source, struct vldbentry *dest,
afs_status_p st)
{
- register int i;
+ int i;
afs_status_t tst = 0;
int rc = 0;
}
static int
-ReceiveFile(register int fd, register struct rx_call *call,
- register struct stat *status)
+ReceiveFile(int fd, struct rx_call *call,
+ struct stat *status)
{
- register char *buffer = (char *)0;
- register int blockSize;
+ char *buffer = (char *)0;
+ int blockSize;
afs_int32 bytesread, nbytes, bytesleft, w;
fd_set out;
afs_int32 error = 0;
}
int
-SendFile(register int fd, register struct rx_call *call,
- register struct stat *status)
+SendFile(int fd, struct rx_call *call,
+ struct stat *status)
{
char *buffer = (char *)0;
int blockSize;
afs_status_t tst = 0;
struct pIDs partIds;
struct partEntries partEnts;
- register int i, j = 0;
+ int i, j = 0;
*cntp = 0;
struct VldbListByAttributes attributes;
nbulkentries arrayEntries;
int totalF;
- register struct nvldbentry *vllist;
- register int j;
+ struct nvldbentry *vllist;
+ int j;
afs_int32 si, nsi;
afs_int32 modified = 0;
{
struct ktc_token token;
struct ktc_principal sname;
- register afs_int32 code;
+ afs_int32 code;
struct afsconf_dir *dir;
afs_int32 now;
char skey[9];
main(int argc, char *argv[])
{ /*Main routine */
struct cmd_syndesc *ts;
- register afs_int32 code;
+ afs_int32 code;
#ifdef AFS_AIX32_ENV
/*
int
FT_GetTimeOfDay(struct timeval *tv, struct timezone *tz)
{
- register int ret;
+ int ret;
ret = gettimeofday(tv, tz);
if (!ret) {
/* need to bounds check 'cause Unix can fail these checks, (esp on Suns)
FT_GetTimeOfDay(&junk, 0); /* force accurate time check */
TM_Rescan(Requests);
for (;;) {
- register struct IoRequest *req;
+ struct IoRequest *req;
struct TM_Elem *expired;
expired = TM_GetExpired(Requests);
if (expired == NULL) break;
IOMGR_nfds = 0;
FOR_ALL_ELTS(r, Requests, {
- register struct IoRequest *req;
+ struct IoRequest *req;
req = (struct IoRequest *) r -> BackPointer;
FDSetSet(req->nfds, &IOMGR_readfds, req->readfds);
FDSetSet(req->nfds, &IOMGR_writefds, req->writefds);
int nfds;
/* Look at everyone who's bit mask was affected */
FOR_ALL_ELTS(r, Requests, {
- register struct IoRequest *req;
- register PROCESS pid;
+ struct IoRequest *req;
+ PROCESS pid;
req = (struct IoRequest *) r -> BackPointer;
nfds = MIN(fds, req->nfds);
if (FDSetCmp(nfds, req->readfds, readfds) ||
{
/* Find everyone who has specified timeout */
FOR_ALL_ELTS(r, Requests, {
- register struct IoRequest *req;
- register PROCESS pid;
+ struct IoRequest *req;
+ PROCESS pid;
req = (struct IoRequest *) r -> BackPointer;
if (TM_eql(&r->TimeLeft, timeout)) {
req -> result = code;
static int SignalSignals (void)
{
bool gotone = FALSE;
- register int i;
- register void *(*p)(void *);
+ int i;
+ void *(*p)(void *);
afs_int32 stackSize;
anySigsDelivered = FALSE;
int IOMGR_SoftSig(void *(*aproc)(void *), void *arock)
{
- register int i;
+ int i;
for (i=0;i<NSOFTSIG;i++) {
if (sigProc[i] == 0) {
/* a free entry */
FT_GetTimeOfDay(&tv, 0); /* force accurate time check */
TM_Rescan(Requests);
for (;;) {
- register struct IoRequest *req;
+ struct IoRequest *req;
struct TM_Elem *expired;
expired = TM_GetExpired(Requests);
if (expired == NULL) break;
fds = 0;
FOR_ALL_ELTS(r, Requests, {
- register struct IoRequest *req;
+ struct IoRequest *req;
req = (struct IoRequest *) r -> BackPointer;
FDSetSet(req->nfds, readfds, req->readfds);
FDSetSet(req->nfds, writefds, req->writefds);
int IOMGR_Select(int fds, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, struct timeval *timeout)
{
- register struct IoRequest *request;
+ struct IoRequest *request;
int result;
#ifndef AFS_NT40_ENV
\f
int IOMGR_Cancel(PROCESS pid)
{
- register struct IoRequest *request;
+ struct IoRequest *request;
if ((request = pid->iomgrRequest) == 0) return -1; /* Pid not found */
/* release a write lock and sleep on an address, atomically */
void
-LWP_WaitProcessR(register void *addr, register struct Lock *alock)
+LWP_WaitProcessR(void *addr, struct Lock *alock)
{
ReleaseReadLock(alock);
LWP_WaitProcess(addr);
/* release a write lock and sleep on an address, atomically */
void
-LWP_WaitProcessW(register void *addr, register struct Lock *alock)
+LWP_WaitProcessW(void *addr, struct Lock *alock)
{
ReleaseWriteLock(alock);
LWP_WaitProcess(addr);
/* release a write lock and sleep on an address, atomically */
void
-LWP_WaitProcessS(register void *addr, register struct Lock *alock)
+LWP_WaitProcessS(void *addr, struct Lock *alock)
{
ReleaseSharedLock(alock);
LWP_WaitProcess(addr);
static void Create_Process_Part2(void);
static void Exit_LWP(void);
static afs_int32 Initialize_Stack(char *stackptr, int stacksize);
-static int Stack_Used(register char *stackptr, int stacksize);
+static int Stack_Used(char *stackptr, int stacksize);
static void Abort_LWP(char *msg);
static void Overflow_Complain(void);
int lwp_MinStackSize = 0;
static int
-lwp_remove(register PROCESS p, register struct QUEUE *q)
+lwp_remove(PROCESS p, struct QUEUE *q)
{
/* Special test for only element on queue */
if (q->count == 1)
}
static int
-insert(register PROCESS p, register struct QUEUE *q)
+insert(PROCESS p, struct QUEUE *q)
{
if (q->head == NULL) { /* Queue is empty */
q->head = p;
/* Iterator macro */
#define for_all_elts(var, q, body)\
{\
- register PROCESS var, _NEXT_;\
- register int _I_;\
+ PROCESS var, _NEXT_;\
+ int _I_;\
for (_I_=q.count, var = q.head; _I_>0; _I_--, var=_NEXT_) {\
_NEXT_ = var -> next;\
body\
int
LWP_QWait(void)
{
- register PROCESS tp;
+ PROCESS tp;
(tp = lwp_cpptr)->status = QWAITING;
move(tp, &runnable[tp->priority], &qwaiting);
Set_LWP_RC();
}
int
-LWP_QSignal(register PROCESS pid)
+LWP_QSignal(PROCESS pid)
{
if (pid->status == QWAITING) {
pid->status = READY;
#ifdef AFS_AIX32_ENV
char *
-reserveFromStack(register afs_int32 size)
+reserveFromStack(afs_int32 size)
{
char *x;
x = alloca(size);
Dump_Processes(void)
{
if (lwp_init) {
- register int i;
+ int i;
for (i = 0; i < MAX_PRIORITIES; i++)
for_all_elts(x, runnable[i], {
printf("[Priority %d]\n", i);
{
PROCESS temp;
struct lwp_pcb dummy;
- register int i;
+ int i;
char *value;
Debug(0, ("Entered LWP_InitializeProcessSupport"));
int
LWP_TerminateProcessSupport(void)
{ /* terminate all LWP support */
- register int i;
+ int i;
Debug(0, ("Entered Terminate_Process_Support"));
if (lwp_init == NULL)
int
LWP_MwaitProcess(int wcount, void *evlist[])
{ /* wait on m of n events */
- register int ecount, i;
+ int ecount, i;
Debug(0, ("Entered Mwait_Process [waitcnt = %d]", wcount));
}
static int
-Delete_PCB(register PROCESS pid)
+Delete_PCB(PROCESS pid)
{ /* remove a PCB from the process list */
Debug(4, ("Entered Delete_PCB"));
lwp_remove(pid,
static void
Dispatcher(void)
{ /* Lightweight process dispatcher */
- register int i;
+ int i;
#ifdef DEBUG
static int dispatch_count = 0;
Initialize_PCB(PROCESS temp, int priority, char *stack, int stacksize,
void *(*ep) (void *), void *parm, char *name)
{
- register int i = 0;
+ int i = 0;
Debug(4, ("Entered Initialize_PCB"));
if (name != NULL)
}
static int
-Internal_Signal(register void *event)
+Internal_Signal(void *event)
{
int rc = LWP_ENOWAIT;
- register int i;
+ int i;
Debug(0, ("Entered Internal_Signal [event id 0x%x]", event));
if (!lwp_init)
static afs_int32
Initialize_Stack(char *stackptr, int stacksize)
{
- register int i;
+ int i;
Debug(4, ("Entered Initialize_Stack"));
if (lwp_stackUseEnabled)
}
static int
-Stack_Used(register char *stackptr, int stacksize)
+Stack_Used(char *stackptr, int stacksize)
{
- register int i;
+ int i;
#if defined(__hp9000s800) || defined(AFS_PARISC_LINUX24_ENV)
if (*(afs_int32 *) (stackptr + stacksize - 4) == STACKMAGIC)
* a rock whose contents can change.
*/
{
- register int i;
- register struct rock *ra; /* rock array */
+ int i;
+ struct rock *ra; /* rock array */
ra = lwp_cpptr->lwp_rlist;
* LWP_EBADROCK rock specified does not exist
*/
{
- register int i;
- register struct rock *ra;
+ int i;
+ struct rock *ra;
ra = lwp_cpptr->lwp_rlist;
extern int LWP_WaitProcess(void *event);
extern PROCESS LWP_ThreadId(void);
extern int LWP_QWait(void);
-extern int LWP_QSignal(register PROCESS pid);
+extern int LWP_QSignal(PROCESS pid);
#endif
extern afs_int32 savecontext(void (*ep)(void),
/* Iterator macro */
#define for_all_elts(var, q, body)\
{\
- register PROCESS var, _NEXT_;\
- register int _I_;\
+ PROCESS var, _NEXT_;\
+ int _I_;\
for (_I_=q.count, var = q.head; _I_>0; _I_--, var=_NEXT_) {\
_NEXT_ = var -> next;\
body\
int LWP_InitializeProcessSupport(int priority, PROCESS *pid)
{
PROCESS pcb;
- register int i;
+ int i;
char* value;
Debug(0, ("Entered LWP_InitializeProcessSupport"))
static void Dump_Processes(void)
{
if (lwp_init) {
- register int i;
+ int i;
for (i=0; i<MAX_PRIORITIES; i++)
for_all_elts(x, runnable[i], {
printf("[Priority %d]\n", i);
int LWP_TerminateProcessSupport() /* terminate all LWP support */
{
- register int i;
+ int i;
Debug(0, ("Entered Terminate_Process_Support"))
if (lwp_init == NULL) return LWP_EINIT;
static void Dispatcher(void)
{
- register int i;
+ int i;
#ifdef DEBUG
static int dispatch_count = 0;
PRE_PreemptMe();
for (;;) {
- register int i;
+ int i;
/* Wait until there is something in the queue */
asleep++;
{
struct timeval t1, t2;
int pid, otherpid;
- register int i, count, x;
+ int i, count, x;
char *waitarray[2];
static char c[] = "OtherProcess";
int stack_offset;
static remove(p, q)
- register PROCESS p;
- register struct QUEUE *q;
+ PROCESS p;
+ struct QUEUE *q;
{
/* Special test for only element on queue */
if (q->count == 1)
}
static insert(p, q)
- register PROCESS p;
- register struct QUEUE *q;
+ PROCESS p;
+ struct QUEUE *q;
{
if (q->head == NULL) { /* Queue is empty */
q -> head = p;
/* Iterator macro */
#define for_all_elts(var, q, body)\
{\
- register PROCESS var, _NEXT_;\
- register int _I_;\
+ PROCESS var, _NEXT_;\
+ int _I_;\
for (_I_=q.count, var = q.head; _I_>0; _I_--, var=_NEXT_) {\
_NEXT_ = var -> next;\
body\
Dump_Processes()
{
if (lwp_init) {
- register int i;
+ int i;
for (i=0; i<MAX_PRIORITIES; i++)
for_all_elts(x, runnable[i], {
printf("[Priority %d]\n", i);
{
PROCESS temp;
struct lwp_pcb dummy;
- register int i;
+ int i;
Debug(0, ("Entered LWP_InitializeProcessSupport"))
if (lwp_init != NULL) return LWP_EINIT;
int LWP_TerminateProcessSupport() /* terminate all LWP support */
{
int pc;
- register int i;
+ int i;
Debug(0, ("Entered Terminate_Process_Support"))
if (lwp_init == NULL) return LWP_EINIT;
}
int LWP_MwaitProcess(wcount, evlist, ecount) /* wait on m of n events */
- register int wcount, ecount;
- register char *evlist[];
+ int wcount, ecount;
+ char *evlist[];
{
Debug(0, ("Entered Mwait_Process [waitcnt = %d]", wcount))
}
static Delete_PCB(pid) /* remove a PCB from the process list */
- register PROCESS pid;
+ PROCESS pid;
{
Debug(4, ("Entered Delete_PCB"))
remove(pid, (pid->blockflag || pid->status==WAITING || pid->status==DESTROYED
static Dispatcher() /* Lightweight process dispatcher */
{
- register int i;
+ int i;
#ifdef DEBUG
static int dispatch_count = 0;
char *parm;
char *name,*stack;
{
- register int i = 0;
+ int i = 0;
Debug(4, ("Entered Initialize_PCB"))
if (name != NULL)
}
static int Internal_Signal(event)
- register char *event;
+ char *event;
{
int rc = LWP_ENOWAIT;
- register int i;
+ int i;
Debug(0, ("Entered Internal_Signal [event id 0x%x]", event))
if (!lwp_init) return LWP_EINIT;
char *stackptr;
int stacksize;
{
- register int i;
+ int i;
Debug(4, ("Entered Initialize_Stack"))
for (i=0; i<stacksize; i++) stackptr[i] = i & 0xff;
}
static int Stack_Used(stackptr, stacksize)
- register char *stackptr;
+ char *stackptr;
int stacksize;
{
- register int i;
+ int i;
for (i=0;i<stacksize;i++)
if ((unsigned char) stackptr[i] != (i & 0xff))
/* t1 = t2 - t3 */
static void
-subtract(register struct timeval *t1, register struct timeval *t2,
- register struct timeval *t3)
+subtract(struct timeval *t1, struct timeval *t2,
+ struct timeval *t3)
{
- register int sec2, usec2, sec3, usec3;
+ int sec2, usec2, sec3, usec3;
sec2 = t2->tv_sec;
usec2 = t2->tv_usec;
/* t1 += t2; */
static void
-add(register struct timeval *t1, register struct timeval *t2)
+add(struct timeval *t1, struct timeval *t2)
{
t1->tv_usec += t2->tv_usec;
t1->tv_sec += t2->tv_sec;
/*
obsolete, commentless procedure, all done by hand expansion now.
-static bool geq(register struct timeval *t1, register struct timeval *t2)
+static bool geq(struct timeval *t1, struct timeval *t2)
{
return (t1->tv_sec > t2->tv_sec) ||
(t1->tv_sec == t2->tv_sec && t1->tv_usec >= t2->tv_usec);
*/
static bool
-blocking(register struct TM_Elem *t)
+blocking(struct TM_Elem *t)
{
return (t->TotalTime.tv_sec < 0 || t->TotalTime.tv_usec < 0);
}
*/
int
-TM_Init(register struct TM_Elem **list)
+TM_Init(struct TM_Elem **list)
{
if (!globalInitDone) {
FT_Init(0, 0);
}
int
-TM_Final(register struct TM_Elem **list)
+TM_Final(struct TM_Elem **list)
{
if (list == NULL || *list == NULL)
return -1;
void
TM_Insert(struct TM_Elem *tlistPtr, struct TM_Elem *elem)
{
- register struct TM_Elem *next;
+ struct TM_Elem *next;
/* TimeLeft must be set for function IOMGR with infinite timeouts */
elem->TimeLeft = elem->TotalTime;
TM_Rescan(struct TM_Elem *tlist) /* head pointer of timer list */
{
struct timeval time;
- register int expired;
+ int expired;
FT_AGetTimeOfDay(&time, 0);
expired = 0;
struct TM_Elem *
TM_GetEarliest(struct TM_Elem *tlist)
{
- register struct TM_Elem *e;
+ struct TM_Elem *e;
e = tlist->Next;
return (e == tlist ? NULL : e);
extern struct TM_Elem *TM_GetEarliest(struct TM_Elem *tlist);
#endif
-extern int TM_Init(register struct TM_Elem **list);
-extern int TM_Final(register struct TM_Elem **list);
+extern int TM_Init(struct TM_Elem **list);
+extern int TM_Final(struct TM_Elem **list);
#define FOR_ALL_ELTS(var, list, body)\
{\
- register struct TM_Elem *_LIST_, *var, *_NEXT_;\
+ struct TM_Elem *_LIST_, *var, *_NEXT_;\
_LIST_ = (list);\
for (var = _LIST_ -> Next; var != _LIST_; var = _NEXT_) {\
_NEXT_ = var -> Next;\
/* converts string to integer */
char *
-cv2string(register char *ttp, register unsigned long aval)
+cv2string(char *ttp, unsigned long aval)
{
- register char *tp = ttp;
- register int i;
+ char *tp = ttp;
+ int i;
int any = 0;
*(--tp) = 0;
void nil_cleanup(pam_handle_t * pamh, void *data, int pam_end_status);
-extern char *cv2string(register char *ttp, register unsigned long aval);
+extern char *cv2string(char *ttp, unsigned long aval);
extern int do_klog(const char *user, const char *password,
const char *lifetime, const char *cell_name);
extern afs_int32 getPAG(void);
static int
handleit(struct cmd_syndesc *as)
{
- register struct cmd_item *ti;
+ struct cmd_item *ti;
char *dname;
afs_int32 haspart = 0, hasDevice = 0;
struct vfstab mnt;
main(argc, argv)
char **argv;
{
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
afs_int32 code;
if (geteuid() != 0) {
}
static afs_int32
-NameHash(register char *aname)
+NameHash(char *aname)
{
/* returns hash bucket for aname */
- register unsigned int hash = 0;
- register int i;
+ unsigned int hash = 0;
+ int i;
/* stolen directly from the HashString function in the vol package */
for (i = strlen(aname), aname += i - 1; i--; aname--)
hash = (hash * 31) + (*(unsigned char *)aname - 31);
main(int argc, char **argv)
{
- register struct cmd_syndesc *cs; /*Command line syntax descriptor */
- register afs_int32 code; /*Return code */
+ struct cmd_syndesc *cs; /*Command line syntax descriptor */
+ afs_int32 code; /*Return code */
cs = cmd_CreateSyntax(NULL, CommandProc, NULL,
"access protection database");
}
static int
-CommandProc(register struct cmd_syndesc *a_as, void *arock)
+CommandProc(struct cmd_syndesc *a_as, void *arock)
{
- register int i;
+ int i;
long code = 0;
long upos;
long gpos = 0;
add_group(long id)
{
struct grp_list *g;
- register long i;
+ long i;
i = grp_count++ % 1024;
if (i == 0) {
static void
display_groups(void)
{
- register int i, id;
+ int i, id;
struct grp_list *g;
g = grp_head;
static void
display_group(int id)
{
- register int i, offset;
+ int i, offset;
int print_grp = 0;
offset = ntohl(prh.idHash[IDHash(id)]);
static void
fix_pre(struct prentry *pre)
{
- register int i;
+ int i;
pre->flags = ntohl(pre->flags);
pre->id = ntohl(pre->id);
static char *
id_to_name(int id)
{
- register int offset;
+ int offset;
static struct prentry pre;
char *name;
checkin(struct prentry *pre)
{
struct hash_entry *he, *last;
- register int id;
+ int id;
id = pre->id;
last = (struct hash_entry *)0;
}
static char *
-check_core(register int id)
+check_core(int id)
{
struct hash_entry *he;
he = hat[IDHash(id)];
int
main(int argc, char **argv)
{
- register afs_int32 code;
+ afs_int32 code;
char op[8];
char name[PR_MAXNAMELEN];
afs_int32 id, oid = ANONYMOUSID, gid;
int foreign = 0;
/* aid is set to the identity of the caller, if known, else ANONYMOUSID */
/* returns -1 and sets aid to ANONYMOUSID on any failure */
- register struct rx_connection *tconn;
- register afs_int32 code;
+ struct rx_connection *tconn;
+ afs_int32 code;
char tcell[MAXKTCREALMLEN];
char name[MAXKTCNAMELEN];
char inst[MAXKTCNAMELEN];
/* used primarily for conversion - not intended to be used as usual means
* of entering people into the database. */
struct ubik_trans *tt;
- register afs_int32 code;
+ afs_int32 code;
afs_int32 gflag = 0;
int admin;
newEntry(struct rx_call *call, char aname[], afs_int32 flag, afs_int32 oid,
afs_int32 *aid, afs_int32 *cid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
int admin;
char cname[PR_MAXNAMELEN];
static afs_int32
whereIsIt(struct rx_call *call, afs_int32 aid, afs_int32 *apos, afs_int32 *cid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
afs_int32 temp;
dumpEntry(struct rx_call *call, afs_int32 apos, struct prdebugentry *aentry,
afs_int32 *cid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
code = Initdb();
static afs_int32
addToGroup(struct rx_call *call, afs_int32 aid, afs_int32 gid, afs_int32 *cid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
afs_int32 tempu;
afs_int32 tempg;
static afs_int32
nameToID(struct rx_call *call, namelist *aname, idlist *aid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
afs_int32 i;
int size;
static afs_int32
idToName(struct rx_call *call, idlist *aid, namelist *aname)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
afs_int32 i;
int size;
static afs_int32
Delete(struct rx_call *call, afs_int32 aid, afs_int32 *cid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
struct prentry tentry;
afs_int32 loc, nptr;
UpdateEntry(struct rx_call *call, afs_int32 aid, char *name,
struct PrUpdateEntry *uentry, afs_int32 *cid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
struct prentry tentry;
afs_int32 loc;
removeFromGroup(struct rx_call *call, afs_int32 aid, afs_int32 gid,
afs_int32 *cid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
afs_int32 tempu;
afs_int32 tempg;
getCPS(struct rx_call *call, afs_int32 aid, prlist *alist, afs_int32 *over,
afs_int32 *cid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
afs_int32 temp;
struct prentry tentry;
getCPS2(struct rx_call *call, afs_int32 aid, afs_uint32 ahost, prlist *alist,
afs_int32 *over, afs_int32 *cid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
afs_int32 temp;
struct prentry tentry;
getHostCPS(struct rx_call *call, afs_uint32 ahost, prlist *alist,
afs_int32 *over)
{
- register afs_int32 code, temp;
+ afs_int32 code, temp;
struct ubik_trans *tt;
struct prentry host_tentry;
afs_int32 hostid;
afs_int32
listMax(struct rx_call *call, afs_int32 *uid, afs_int32 *gid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
code = Initdb();
static afs_int32
setMax(struct rx_call *call, afs_int32 aid, afs_int32 gflag, afs_int32 *cid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
code = Initdb();
listEntry(struct rx_call *call, afs_int32 aid, struct prcheckentry *aentry,
afs_int32 *cid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
afs_int32 temp;
struct prentry tentry;
changeEntry(struct rx_call *call, afs_int32 aid, char *name, afs_int32 oid,
afs_int32 newid, afs_int32 *cid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
afs_int32 pos;
afs_int32 flags, afs_int32 ngroups, afs_int32 nusers,
afs_int32 spare1, afs_int32 spare2, afs_int32 *cid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
afs_int32 pos;
struct prentry tentry;
listElements(struct rx_call *call, afs_int32 aid, prlist *alist,
afs_int32 *over, afs_int32 *cid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
afs_int32 temp;
struct prentry tentry;
listSuperGroups(struct rx_call *call, afs_int32 aid, prlist *alist,
afs_int32 *over, afs_int32 *cid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
afs_int32 temp;
struct prentry tentry;
listOwned(struct rx_call *call, afs_int32 aid, prlist *alist, afs_int32 *lastP,
afs_int32 *cid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
struct prentry tentry;
afs_int32 head = 0;
isAMemberOf(struct rx_call *call, afs_int32 uid, afs_int32 gid, afs_int32 *flag,
afs_int32 *cid)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_trans *tt;
code = Initdb();
{
/* aid is set to the identity of the caller, if known, else ANONYMOUSID */
/* returns -1 and sets aid to ANONYMOUSID on any failure */
- register struct rx_connection *tconn;
- register afs_int32 code;
+ struct rx_connection *tconn;
+ afs_int32 code;
char tcell[MAXKTCREALMLEN];
char name[MAXKTCNAMELEN];
char inst[MAXKTCNAMELEN];
extern void pt_hook_write(void);
#endif
-extern afs_int32 NameHash(register unsigned char *aname);
+extern afs_int32 NameHash(unsigned char *aname);
extern afs_int32 pr_Write(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos,
void *buff, afs_int32 len);
extern afs_int32 pr_Read(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos,
struct contentry *tentry);
extern int pr_ReadCoEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos,
struct contentry *tentry);
-extern afs_int32 AllocBlock(register struct ubik_trans *at);
-extern afs_int32 FreeBlock(register struct ubik_trans *at, afs_int32 pos);
-extern afs_int32 FindByID(register struct ubik_trans *at, afs_int32 aid);
-extern afs_int32 FindByName(register struct ubik_trans *at,
+extern afs_int32 AllocBlock(struct ubik_trans *at);
+extern afs_int32 FreeBlock(struct ubik_trans *at, afs_int32 pos);
+extern afs_int32 FindByID(struct ubik_trans *at, afs_int32 aid);
+extern afs_int32 FindByName(struct ubik_trans *at,
char aname[PR_MAXNAMELEN], struct prentry *tentryp);
-extern afs_int32 AllocID(register struct ubik_trans *at, afs_int32 flag,
+extern afs_int32 AllocID(struct ubik_trans *at, afs_int32 flag,
afs_int32 *aid);
-extern afs_int32 IDToName(register struct ubik_trans *at, afs_int32 aid,
+extern afs_int32 IDToName(struct ubik_trans *at, afs_int32 aid,
char aname[PR_MAXNAMELEN]);
-extern afs_int32 NameToID(register struct ubik_trans *at,
+extern afs_int32 NameToID(struct ubik_trans *at,
char aname[PR_MAXNAMELEN], afs_int32 *aid);
extern int IDCmp(const void *a, const void *b);
extern afs_int32 RemoveFromIDHash(struct ubik_trans *tt, afs_int32 aid,
static int
popsource(void)
{
- register struct sourcestack *sp;
+ struct sourcestack *sp;
if (!(sp = shead))
return 0;
if (source != stdin)
static int
CreateGroup(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 id;
char *owner;
struct cmd_item *namei;
static int
CreateUser(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 id;
struct cmd_item *namei;
struct cmd_item *idi;
static int
GetNameOrId(struct cmd_syndesc *as, struct idlist *lids, struct namelist *lnames)
{
- register afs_int32 code = 0;
+ afs_int32 code = 0;
int n = 0;
struct cmd_item *i;
int goodCount;
GetNameOrId(struct cmd_syndesc *as, struct idlist *lids,
struct namelist *lnames)
{
- register afs_int32 code = 0;
+ afs_int32 code = 0;
int n = 0, nd = 0, nm = 0, id, x;
struct cmd_item *i;
struct namelist names, tnames; /* local copy, if not ret. names */
static int
AddToGroup(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
struct cmd_item *u, *g;
for (u = as->parms[0].items; u; u = u->next) {
static int
RemoveFromGroup(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
struct cmd_item *u, *g;
for (u = as->parms[0].items; u; u = u->next) {
static int
ListMembership(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
idlist ids;
namelist names;
int i;
static int
Delete(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
idlist ids;
namelist names;
int i;
static int
CheckEntry(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 rcode = 1;
int i, flag = 0, admin = 0;
namelist lnames, names;
static int
ChownGroup(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
char *name;
char *owner;
static int
ChangeName(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
char *oldname;
char *newname;
static int
ListMax(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 maxUser, maxGroup;
code = pr_ListMaxUserId(&maxUser);
static int
SetMaxCommand(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 maxid;
code = 0;
static int
SetFields(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
idlist ids;
namelist names;
int i;
static int
ListOwned(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
idlist ids;
namelist names;
namelist list;
/*
static void add_NameOrId_args (ts)
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
{
cmd_AddParm(ts,"-name",CMD_LIST,CMD_OPTIONAL,"user or group name");
cmd_AddParm(ts,"-id",CMD_LIST,CMD_OPTIONAL,"user or group id");
int
main(int argc, char **argv)
{
- register afs_int32 code;
- register struct cmd_syndesc *ts;
+ afs_int32 code;
+ struct cmd_syndesc *ts;
char line[2048];
char *cp, *lastp;
int
main(int argc, char **argv)
{
- register afs_int32 code;
+ afs_int32 code;
afs_uint32 myHost;
- register struct hostent *th;
+ struct hostent *th;
char hostname[64];
struct rx_service *tservice;
struct rx_securityClass **securityClasses;
int
pr_CreateUser(char name[PR_MAXNAMELEN], afs_int32 *id)
{
- register afs_int32 code;
+ afs_int32 code;
stolower(name);
if (*id) {
int
pr_CreateGroup(char name[PR_MAXNAMELEN], char owner[PR_MAXNAMELEN], afs_int32 *id)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 oid = 0;
afs_int32 flags = 0;
int
pr_Delete(char *name)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 id;
stolower(name);
int
pr_DeleteByID(afs_int32 id)
{
- register afs_int32 code;
+ afs_int32 code;
code = ubik_PR_Delete(pruclient, 0, id);
return code;
int
pr_AddToGroup(char *user, char *group)
{
- register afs_int32 code;
+ afs_int32 code;
namelist lnames;
idlist lids;
int
pr_RemoveUserFromGroup(char *user, char *group)
{
- register afs_int32 code;
+ afs_int32 code;
namelist lnames;
idlist lids;
int
pr_NameToId(namelist *names, idlist *ids)
{
- register afs_int32 code;
- register afs_int32 i;
+ afs_int32 code;
+ afs_int32 i;
for (i = 0; i < names->namelist_len; i++)
stolower(names->namelist_val[i]);
{
namelist lnames;
idlist lids;
- register afs_int32 code;
+ afs_int32 code;
lids.idlist_len = 0;
lids.idlist_val = 0;
int
pr_IdToName(idlist *ids, namelist *names)
{
- register afs_int32 code;
+ afs_int32 code;
code = ubik_PR_IDToName(pruclient, 0, ids, names);
return code;
{
namelist lnames;
idlist lids;
- register afs_int32 code;
+ afs_int32 code;
lids.idlist_len = 1;
lids.idlist_val = malloc(sizeof(afs_int32));
int
pr_GetCPS(afs_int32 id, prlist *CPS)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 over;
over = 0;
int
pr_GetCPS2(afs_int32 id, afs_uint32 host, prlist *CPS)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 over;
over = 0;
int
pr_GetHostCPS(afs_uint32 host, prlist *CPS)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 over;
over = 0;
int
pr_ListMembers(char *group, namelist *lnames)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 gid;
code = pr_SNameToId(group, &gid);
int
pr_ListOwned(afs_int32 oid, namelist *lnames, afs_int32 *moreP)
{
- register afs_int32 code;
+ afs_int32 code;
prlist alist;
idlist *lids;
int
pr_IDListMembers(afs_int32 gid, namelist *lnames)
{
- register afs_int32 code;
+ afs_int32 code;
prlist alist;
idlist *lids;
afs_int32 over;
int
pr_ListEntry(afs_int32 id, struct prcheckentry *aentry)
{
- register afs_int32 code;
+ afs_int32 code;
code = ubik_PR_ListEntry(pruclient, 0, id, aentry);
return code;
pr_CheckEntryByName(char *name, afs_int32 *id, char *owner, char *creator)
{
/* struct prcheckentry returns other things, which aren't useful to show at this time. */
- register afs_int32 code;
+ afs_int32 code;
struct prcheckentry aentry;
code = pr_SNameToId(name, id);
pr_CheckEntryById(char *name, afs_int32 id, char *owner, char *creator)
{
/* struct prcheckentry returns other things, which aren't useful to show at this time. */
- register afs_int32 code;
+ afs_int32 code;
struct prcheckentry aentry;
code = pr_SIdToName(id, name);
int
pr_ChangeEntry(char *oldname, char *newname, afs_int32 *newid, char *newowner)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 id;
afs_int32 oid = 0;
int
pr_IsAMemberOf(char *uname, char *gname, afs_int32 *flag)
{
- register afs_int32 code;
+ afs_int32 code;
namelist lnames;
idlist lids;
int
pr_ListMaxUserId(afs_int32 *mid)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 gid;
code = ubik_PR_ListMax(pruclient, 0, mid, &gid);
return code;
int
pr_SetMaxUserId(afs_int32 mid)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 flag = 0;
code = ubik_PR_SetMax(pruclient, 0, mid, flag);
return code;
int
pr_ListMaxGroupId(afs_int32 *mid)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 id;
code = ubik_PR_ListMax(pruclient, 0, &id, mid);
return code;
int
pr_SetMaxGroupId(afs_int32 mid)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 flag = 0;
flag |= PRGRP;
afs_int32
pr_SetFieldsEntry(afs_int32 id, afs_int32 mask, afs_int32 flags, afs_int32 ngroups, afs_int32 nusers)
{
- register afs_int32 code;
+ afs_int32 code;
code =
ubik_PR_SetFieldsEntry(pruclient, 0, id, mask, flags, ngroups,
* entry if appropriate */
afs_int32
-ChangeIDEntry(register struct ubik_trans *at, register afs_int32 aid, afs_int32 newid, register afs_int32 bid)
+ChangeIDEntry(struct ubik_trans *at, afs_int32 aid, afs_int32 newid, afs_int32 bid)
{
- register afs_int32 code;
+ afs_int32 code;
struct prentry tentry;
struct contentry centry;
afs_int32 temp;
* continuation entry if appropriate */
afs_int32
-RemoveFromSGEntry(register struct ubik_trans *at, register afs_int32 aid, register afs_int32 bid)
+RemoveFromSGEntry(struct ubik_trans *at, afs_int32 aid, afs_int32 bid)
{
- register afs_int32 code;
+ afs_int32 code;
struct prentry tentry;
struct prentryg *tentryg;
struct contentry centry;
afs_int32
AddToSGEntry(struct ubik_trans *tt, struct prentry *entry, afs_int32 loc, afs_int32 aid)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 i;
struct contentry nentry;
struct contentry aentry;
afs_int32
GetListSG2(struct ubik_trans *at, afs_int32 gid, prlist *alist, afs_int32 *sizeP, afs_int32 depth)
{
- register afs_int32 code;
+ afs_int32 code;
struct prentry tentry;
struct prentryg *tentryg = (struct prentryg *)&tentry;
afs_int32 i;
afs_int32
GetSGList(struct ubik_trans *at, struct prentry *tentry, prlist *alist)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 i;
struct contentry centry;
struct prentryg *tentryg;
int
main(int argc, char **argv)
{
- register afs_int32 code;
+ afs_int32 code;
char name[PR_MAXNAMELEN];
char gname[PR_MAXNAMELEN];
char owner[PR_MAXNAMELEN];
main(afs_int32 argc, char **argv)
{
- register afs_int32 code;
+ afs_int32 code;
char name[PR_MAXNAMELEN];
afs_int32 id;
char buf[150];
}
fprintf(f, ">%s\n", lcell);
for (i = 0; i < cellinfo.numServers; i++) {
- register unsigned char *tp =
+ unsigned char *tp =
(unsigned char *)&cellinfo.hostAddr[i].sin_addr;
fprintf(f, "%d.%d.%d.%d\t#%s\n", tp[0], tp[1], tp[2], tp[3],
cellinfo.hostName[i]);
}
static void
-add_std_args(register struct cmd_syndesc *ts)
+add_std_args(struct cmd_syndesc *ts)
{
cmd_Seek(ts, 12);
cmd_AddParm(ts, "-confdir", CMD_SINGLE, CMD_OPTIONAL,
}
int
-ubik_BeginTrans(register struct ubik_dbase *dbase, afs_int32 transMode,
+ubik_BeginTrans(struct ubik_dbase *dbase, afs_int32 transMode,
struct ubik_trans **transPtr)
{
static int init = 0;
}
int
-ubik_BeginTransReadAny(register struct ubik_dbase *dbase, afs_int32 transMode,
+ubik_BeginTransReadAny(struct ubik_dbase *dbase, afs_int32 transMode,
struct ubik_trans **transPtr)
{
return (0);
}
int
-ubik_AbortTrans(register struct ubik_trans *transPtr)
+ubik_AbortTrans(struct ubik_trans *transPtr)
{
return (0);
}
int
-ubik_EndTrans(register struct ubik_trans *transPtr)
+ubik_EndTrans(struct ubik_trans *transPtr)
{
return (0);
}
int
-ubik_Tell(register struct ubik_trans *transPtr, afs_int32 * fileid,
+ubik_Tell(struct ubik_trans *transPtr, afs_int32 * fileid,
afs_int32 * position)
{
return (0);
}
int
-ubik_Truncate(register struct ubik_trans *transPtr, afs_int32 length)
+ubik_Truncate(struct ubik_trans *transPtr, afs_int32 length)
{
return (0);
}
}
int
-ubik_WaitVersion(register struct ubik_dbase *adatabase,
- register struct ubik_version *aversion)
+ubik_WaitVersion(struct ubik_dbase *adatabase,
+ struct ubik_version *aversion)
{
return (0);
}
}
afs_int32
-NameHash(register char *aname)
+NameHash(char *aname)
{
/* returns hash bucket for aname */
- register unsigned int hash = 0;
- register size_t i;
+ unsigned int hash = 0;
+ size_t i;
/* stolen directly from the HashString function in the vol package */
for (i = strlen(aname), aname += i - 1; i--; aname--)
hash = (hash * 31) + (*(unsigned char *)aname - 31);
pr_WriteEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, struct prentry *tentry)
{
afs_int32 code;
- register afs_int32 i;
+ afs_int32 i;
struct prentry nentry;
if (ntohl(1) != 1) { /* Need to swap bytes. */
pr_ReadEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, struct prentry *tentry)
{
afs_int32 code;
- register afs_int32 i;
+ afs_int32 i;
struct prentry nentry;
code = ubik_Seek(tt, afd, pos);
if (code)
pr_WriteCoEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, struct contentry *tentry)
{
afs_int32 code;
- register afs_int32 i;
+ afs_int32 i;
struct contentry nentry;
if (ntohl(1) != 1) { /* No need to swap */
pr_ReadCoEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos, struct contentry *tentry)
{
afs_int32 code;
- register afs_int32 i;
+ afs_int32 i;
struct contentry nentry;
code = ubik_Seek(tt, afd, pos);
if (code)
* new entry */
afs_int32
-AllocBlock(register struct ubik_trans *at)
+AllocBlock(struct ubik_trans *at)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 temp;
struct prentry tentry;
}
afs_int32
-FreeBlock(register struct ubik_trans *at, afs_int32 pos)
+FreeBlock(struct ubik_trans *at, afs_int32 pos)
{
/* add a block of storage to the free list */
- register afs_int32 code;
+ afs_int32 code;
struct prentry tentry;
memset(&tentry, 0, sizeof(tentry));
}
afs_int32
-FindByID(register struct ubik_trans *at, afs_int32 aid)
+FindByID(struct ubik_trans *at, afs_int32 aid)
{
/* returns address of entry if found, 0 otherwise */
- register afs_int32 code;
+ afs_int32 code;
afs_int32 i;
struct prentry tentry;
afs_int32 entry;
}
afs_int32
-FindByName(register struct ubik_trans *at, char aname[PR_MAXNAMELEN], struct prentry *tentryp)
+FindByName(struct ubik_trans *at, char aname[PR_MAXNAMELEN], struct prentry *tentryp)
{
/* ditto */
- register afs_int32 code;
+ afs_int32 code;
afs_int32 i;
afs_int32 entry;
}
afs_int32
-AllocID(register struct ubik_trans *at, afs_int32 flag, afs_int32 *aid)
+AllocID(struct ubik_trans *at, afs_int32 flag, afs_int32 *aid)
{
/* allocs an id from the proper area of address space, based on flag */
- register afs_int32 code = 1;
- register afs_int32 i = 0;
- register int maxcount = 50; /* to prevent infinite loops */
+ afs_int32 code = 1;
+ afs_int32 i = 0;
+ int maxcount = 50; /* to prevent infinite loops */
if (flag & PRGRP) {
*aid = ntohl(cheader.maxGroup);
}
afs_int32
-IDToName(register struct ubik_trans *at, afs_int32 aid, char aname[PR_MAXNAMELEN])
+IDToName(struct ubik_trans *at, afs_int32 aid, char aname[PR_MAXNAMELEN])
{
afs_int32 temp;
struct prentry tentry;
- register afs_int32 code;
+ afs_int32 code;
temp = FindByID(at, aid);
if (temp == 0)
}
afs_int32
-NameToID(register struct ubik_trans *at, char aname[PR_MAXNAMELEN], afs_int32 *aid)
+NameToID(struct ubik_trans *at, char aname[PR_MAXNAMELEN], afs_int32 *aid)
{
afs_int32 temp;
struct prentry tentry;
RemoveFromIDHash(struct ubik_trans *tt, afs_int32 aid, afs_int32 *loc) /* ??? in case ID hashed twice ??? */
{
/* remove entry designated by aid from id hash table */
- register afs_int32 code;
+ afs_int32 code;
afs_int32 current, trail, i;
struct prentry tentry;
struct prentry bentry;
AddToIDHash(struct ubik_trans *tt, afs_int32 aid, afs_int32 loc)
{
/* add entry at loc designated by aid to id hash table */
- register afs_int32 code;
+ afs_int32 code;
afs_int32 i;
struct prentry tentry;
RemoveFromNameHash(struct ubik_trans *tt, char *aname, afs_int32 *loc)
{
/* remove from name hash */
- register afs_int32 code;
+ afs_int32 code;
afs_int32 current, trail, i;
struct prentry tentry;
struct prentry bentry;
AddToNameHash(struct ubik_trans *tt, char *aname, afs_int32 loc)
{
/* add to name hash */
- register afs_int32 code;
+ afs_int32 code;
afs_int32 i;
struct prentry tentry;
AddToOwnerChain(struct ubik_trans *at, afs_int32 gid, afs_int32 oid)
{
/* add entry designated by gid to owner chain of entry designated by oid */
- register afs_int32 code;
+ afs_int32 code;
afs_int32 loc;
struct prentry tentry;
struct prentry gentry;
afs_int32
RemoveFromOwnerChain(struct ubik_trans *at, afs_int32 gid, afs_int32 oid)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 nptr;
struct prentry thisEntry;
struct prentry thatEntry;
afs_int32
AddToOrphan(struct ubik_trans *at, afs_int32 gid)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 loc;
struct prentry tentry;
RemoveFromOrphan(struct ubik_trans *at, afs_int32 gid)
{
/* remove gid from the orphan list */
- register afs_int32 code;
+ afs_int32 code;
afs_int32 loc;
afs_int32 nptr;
struct prentry tentry;
IsOwnerOf(struct ubik_trans *at, afs_int32 aid, afs_int32 gid)
{
/* returns 1 if aid is the owner of gid, 0 otherwise */
- register afs_int32 code;
+ afs_int32 code;
struct prentry tentry;
afs_int32 loc;
OwnerOf(struct ubik_trans *at, afs_int32 gid)
{
/* returns the owner of gid */
- register afs_int32 code;
+ afs_int32 code;
afs_int32 loc;
struct prentry tentry;
#if !defined(SUPERGROUPS)
struct prentry tentry;
struct contentry centry;
- register afs_int32 code;
+ afs_int32 code;
afs_int32 i;
afs_int32 loc;
#endif
/* returns true if aid is a member of gid */
struct prentry tentry;
struct contentry centry;
- register afs_int32 code;
+ afs_int32 code;
afs_int32 i;
afs_int32 loc;
struct socket *asocket = (struct socket *)so;
struct uio u;
#endif
- register afs_int32 code;
+ afs_int32 code;
int i;
struct iovec iov[RX_MAXIOVECS];
int haveGlock = ISAFS_GLOCK();
osi_NetSend(osi_socket asocket, struct sockaddr_in *addr, struct iovec *dvec,
int nvecs, afs_int32 alength, int istack)
{
- register afs_int32 code;
+ afs_int32 code;
int i;
struct iovec iov[RX_MAXIOVECS];
struct uio u;
/* start intercepting basic calls */
rxk_init()
{
- register struct protosw *tpro, *last;
+ struct protosw *tpro, *last;
if (rxk_initDone)
return 0;
rxk_input(struct mbuf *am, int iphlen)
{
void (*tproc) ();
- register unsigned short *tsp;
+ unsigned short *tsp;
int hdr;
struct udphdr *tu;
- register struct ip *ti;
+ struct ip *ti;
struct udpiphdr *tvu;
- register int i;
+ int i;
char *phandle;
afs_int32 code;
struct sockaddr_in taddr;
* sometimes */
static
trysblock(sb)
- register struct sockbuf *sb;
+ struct sockbuf *sb;
{
AFS_STATCNT(trysblock);
if (sb->sb_flags & SB_LOCK) {
osi_NetSend(osi_socket asocket, struct sockaddr_in *addr, struct iovec *dvec,
int nvec, afs_int32 asize, int istack)
{
- register struct mbuf *tm, *um;
- register afs_int32 code;
+ struct mbuf *tm, *um;
+ afs_int32 code;
int s;
struct mbuf *top = 0;
- register struct mbuf *m, **mp;
+ struct mbuf *m, **mp;
int len;
char *tdata;
caddr_t tpa;
int
rxk_init()
{
- register struct protosw *tpro, *last;
+ struct protosw *tpro, *last;
if (rxk_initDone)
return 0;
/* basic packet handling routine called at splnet from softnet loop */
static struct mbuf *
-rxk_input(register struct mbuf *am, struct ifnet *aif)
+rxk_input(struct mbuf *am, struct ifnet *aif)
{
int (*tproc) ();
- register unsigned short *tsp;
+ unsigned short *tsp;
int hdr;
struct udphdr *tu;
- register struct ip *ti;
+ struct ip *ti;
struct udpiphdr *tvu;
- register int i;
+ int i;
char *phandle;
afs_int32 code;
struct sockaddr_in taddr;
/* steal decl from sgi_65 */
int
-osi_NetSend(register struct socket *asocket, struct sockaddr_in *addr,
- struct iovec *dvec, int nvec, register afs_int32 asize,
+osi_NetSend(struct socket *asocket, struct sockaddr_in *addr,
+ struct iovec *dvec, int nvec, afs_int32 asize,
int istack)
{
struct uio uio;
#endif
{
void (*tproc) ();
- register unsigned short *tsp;
+ unsigned short *tsp;
int hdr;
struct udphdr *tu;
- register struct ip *ti;
+ struct ip *ti;
struct udpiphdr *tvu;
- register int i;
+ int i;
char *phandle;
struct sockaddr_in taddr;
int tlen;
void
rxk_init(void)
{
- register struct protosw *tpro, *last;
+ struct protosw *tpro, *last;
if (rxk_initDone)
return;
#ifdef AFS_SGI65_ENV
osi_NetSend(asocket, addr, dvec, nvec, asize, istack)
- register osi_socket *asocket;
+ osi_socket *asocket;
struct iovec *dvec;
int nvec;
- register afs_int32 asize;
+ afs_int32 asize;
struct sockaddr_in *addr;
int istack;
{
*/
int
osi_NetSend(asocket, addr, dvec, nvec, asize, istack)
- register struct socket *asocket;
+ struct socket *asocket;
struct iovec *dvec;
int nvec;
- register afs_int32 asize;
+ afs_int32 asize;
struct sockaddr_in *addr;
int istack;
{
- register struct mbuf *tm, *um;
- register afs_int32 code;
+ struct mbuf *tm, *um;
+ afs_int32 code;
int s;
struct mbuf *top = 0;
- register struct mbuf *m, **mp;
+ struct mbuf *m, **mp;
int len;
char *tdata;
caddr_t tpa;
}
int
-osi_FreeSocket(register osi_socket asocket)
+osi_FreeSocket(osi_socket asocket)
{
extern int rxk_ListenerPid;
struct sonode *so = (struct sonode *)asocket;
}
int
-osi_FreeSocket(register osi_socket *asocket)
+osi_FreeSocket(osi_socket *asocket)
{
extern int rxk_ListenerPid;
TIUSER *udp_tiptr = (TIUSER *) asocket;
#include "bulk.h"
int
-bulk_SendFile(register int fd, register struct rx_call *call,
- register struct stat *status)
+bulk_SendFile(int fd, struct rx_call *call,
+ struct stat *status)
{
char *buffer = (char *)0;
int blockSize;
if (!xdr_long(&xdr, &length))
error = BULK_ERROR;
while (!error && length) {
- register nbytes = (length > blockSize ? blockSize : length);
+ int nbytes = (length > blockSize ? blockSize : length);
nbytes = read(fd, buffer, nbytes);
if (nbytes <= 0) {
fprintf(stderr, "File system read failed\n");
/* Copy the appropriate number of bytes from the call to fd. The status should reflect the file's status coming into the routine and will reflect it going out of the routine, in the absence of errors */
int
-bulk_ReceiveFile(register int fd, register struct rx_call *call,
- register struct stat *status)
+bulk_ReceiveFile(int fd, struct rx_call *call,
+ struct stat *status)
{
- register char *buffer = (char *)0;
+ char *buffer = (char *)0;
long length;
XDR xdr;
- register int blockSize;
+ int blockSize;
long error = 0;
xdrrx_create(&xdr, call, XDR_DECODE);
return BULK_ERROR;
}
while (!error && length) {
- register nbytes = (length > blockSize ? blockSize : length);
+ int nbytes = (length > blockSize ? blockSize : length);
nbytes = rx_Read(call, buffer, nbytes);
if (!nbytes)
error = BULK_ERROR;
int
bulk_SendFile(fd, call, status)
- register int fd;
- register struct rx_call *call;
- register struct stat *status;
+ int fd;
+ struct rx_call *call;
+ struct stat *status;
{
char *buffer = (char *)0;
int blockSize;
if (!xdr_long(&xdr, &length))
error = BULK_ERROR;
while (!error && length) {
- register nbytes = (length > blockSize ? blockSize : length);
+ int nbytes = (length > blockSize ? blockSize : length);
nbytes = read(fd, buffer, nbytes);
if (nbytes <= 0) {
fprintf(stderr, "File system read failed\n");
/* Copy the appropriate number of bytes from the call to fd. The status should reflect the file's status coming into the routine and will reflect it going out of the routine, in the absence of errors */
int
bulk_ReceiveFile(fd, call, status)
- register int fd;
- register struct rx_call *call;
- register struct stat *status;
+ int fd;
+ struct rx_call *call;
+ struct stat *status;
{
- register char *buffer = (char *)0;
+ char *buffer = (char *)0;
long length;
XDR xdr;
- register int blockSize;
+ int blockSize;
long error = 0;
xdrrx_create(&xdr, call, XDR_DECODE);
return BULK_ERROR;
}
while (!error && length) {
- register nbytes = (length > blockSize ? blockSize : length);
+ int nbytes = (length > blockSize ? blockSize : length);
nbytes = rx_Read(call, buffer, nbytes);
if (!nbytes)
error = BULK_ERROR;
char **argv;
{
struct rx_securityClass *null_securityObject;
- register int i, nHosts = 0;
+ int i, nHosts = 0;
struct {
u_long ipaddr;
char *name;
int arg[50];
struct rx_connection *conns[50];
int nSuccesses = 0;
- register int trials = 1;
- register int verbose = 0;
- register int abort = 0;
+ int trials = 1;
+ int verbose = 0;
+ int abort = 0;
int msec;
struct clock startTime, endTime;
int result;
#undef kmem_free
#undef mem_alloc
#undef mem_free
-#undef register
#endif /* AFS_OSF_ENV */
#else /* !UKERNEL */
#include "afs/sysincludes.h"
#undef kmem_free
#undef mem_alloc
#undef mem_free
-#undef register
#endif /* AFS_OSF_ENV */
#else /* KERNEL */
# include <sys/types.h>
int argc;
char **argv;
{
- register int i;
- register struct hostent *th;
+ int i;
+ struct hostent *th;
for (i = 1; i < argc; i++) {
if (!strcmp(argv[i], "-port")) {
port = atoi(argv[i + 1]);
int argc;
char **argv;
{
- register int i;
+ int i;
for (i = 1; i < argc; i++) {
if (!strcmp(argv[i], "-port")) {
port = atoi(argv[i + 1]);
int argc;
char **argv;
{
- register long code;
+ long code;
static struct rx_securityClass *sc[3]; /* so other kernel procs can reference it */
- register struct rx_service *tservice;
+ struct rx_service *tservice;
port = htons(10000);
if (ParseCmd(argc, argv) != 0) {
# undef kmem_free
# undef mem_alloc
# undef mem_free
-# undef register
# endif /* AFS_OSF_ENV */
# ifdef AFS_LINUX22_ENV
# ifndef quad_t
static short
PortNumber(char *aport)
{
- register int tc;
- register short total;
+ int tc;
+ short total;
total = 0;
while ((tc = *aport++)) {
static short
PortName(char *aname)
{
- register struct servent *ts;
+ struct servent *ts;
ts = getservbyname(aname, NULL);
if (!ts)
return -1;
int
MainCommand(struct cmd_syndesc *as, void *arock)
{
- register int i;
+ int i;
osi_socket s;
int j;
struct sockaddr_in taddr;
struct in_addr hostAddr;
short port;
struct hostent *th;
- register afs_int32 code;
+ afs_int32 code;
int nodally;
int allconns;
int rxstats;
if (callTconnF == 1) {
f_print(fout, "\t/*IN */ struct rx_call *z_call");
} else if (callTconnF == 2) {
- f_print(fout, "\tregister struct ubik_client *aclient, afs_int32 aflags");
+ f_print(fout, "\tstruct ubik_client *aclient, afs_int32 aflags");
} else {
f_print(fout, "\t/*IN */ struct rx_connection *z_conn");
}
if (ansic_flag) {
if (split_flag) {
- first_arg = "register struct rx_call *z_call";
+ first_arg = "struct rx_call *z_call";
} else {
- first_arg = "register struct rx_connection *z_conn";
+ first_arg = "struct rx_connection *z_conn";
}
} else {
if (split_flag) {
return;
if (!split_flag)
- f_print(fout, "\tregister struct rx_connection *z_conn;\n");
+ f_print(fout, "\tstruct rx_connection *z_conn;\n");
if (split_flag) {
- f_print(fout, "\tregister struct rx_call *z_call;\n");
+ f_print(fout, "\tstruct rx_call *z_call;\n");
}
for (plist = defp->pc.plists; plist; plist = plist->next) {
if (plist->component_kind == DEF_PARAM
if (!cflag) {
if (ansic_flag) {
- f_print(fout, "int %s%s%s%s(register struct ubik_client *aclient, afs_int32 aflags",
+ f_print(fout, "int %s%s%s%s(struct ubik_client *aclient, afs_int32 aflags",
procheader, prefix, PackagePrefix[PackageIndex],
defp->pc.proc_name);
} else {
if (ansic_flag)
return;
- f_print(fout, "\tregister struct ubik_client *aclient;\n\tafs_int32 aflags;\n");
+ f_print(fout, "\tstruct ubik_client *aclient;\n\tafs_int32 aflags;\n");
for (plist = defp->pc.plists; plist; plist = plist->next) {
if (plist->component_kind == DEF_PARAM
&& !(plist->pl.param_flag & PROCESSED_PARAM)) {
static void
er_ProcMainBody_setup(void)
{
- f_print(fout, "int %s%sExecuteRequest(register struct rx_call *z_call)\n",
+ f_print(fout, "int %s%sExecuteRequest(struct rx_call *z_call)\n",
prefix, PackagePrefix[PackageIndex]);
f_print(fout, "{\n\tint op;\n");
f_print(fout, "\tXDR z_xdrs;\n");
er_HeadofOldStyleProc_setup(void)
{
f_print(fout,
- "\nint %s%sExecuteRequest (register struct rx_call *z_call)\n",
+ "\nint %s%sExecuteRequest (struct rx_call *z_call)\n",
prefix,
(combinepackages ? MasterPrefix : PackagePrefix[PackageIndex]));
f_print(fout, "{\n");
rxkad_SetupEndpoint(struct rx_connection *aconnp,
struct rxkad_endpoint *aendpointp)
{
- register afs_int32 i;
+ afs_int32 i;
aendpointp->cuid[0] = htonl(aconnp->epoch);
i = aconnp->cid & RX_CIDMASK;
afs_int32 * aivec)
{
afs_uint32 word[2];
- register afs_uint32 t;
+ afs_uint32 t;
t = apacket->header.callNumber;
word[0] = htonl(t);
GetServer(aname)
IN char *aname;
{
- register struct hostent *th;
+ struct hostent *th;
long addr;
th = gethostbyname(aname);
*/
extern afs_int32 des_cbc_encrypt(void * in, void * out,
- register afs_int32 length,
+ afs_int32 length,
des_key_schedule key, des_cblock *iv,
int encrypt);
-extern int des_key_sched(register des_cblock k, des_key_schedule schedule);
+extern int des_key_sched(des_cblock k, des_key_schedule schedule);
struct krb_convert {
char *v4_str;
static char rn[] = "execute_scout"; /*Routine name */
static char fullsrvname[128]; /*Full server name */
- register int code; /*Return code */
+ int code; /*Return code */
struct sockaddr_in *FSSktArray; /*Server socket array */
int sktbytes; /*Num bytes in above */
struct sockaddr_in *curr_skt; /*Ptr to current socket */
main(int argc, char **argv)
{ /*main */
- register afs_int32 code; /*Return code */
- register struct cmd_syndesc *ts; /*Ptr to cmd line syntax descriptor */
+ afs_int32 code; /*Return code */
+ struct cmd_syndesc *ts; /*Ptr to cmd line syntax descriptor */
#ifdef AFS_AIX32_ENV
/*
char *s;
{
struct iovec iov[4];
- register struct iovec *v = iov;
+ struct iovec *v = iov;
if (s && *s) {
v->iov_base = s;
FILE *hostf;
char fhost[MAXHOSTNAMELEN];
int first = 1;
- register char *sp, *p;
+ char *sp, *p;
int baselen = -1;
int suid, sgid;
int group_list_size = -1;
{
char *user;
char ahost[MAXHOSTNAMELEN * 4];
- register char *p;
+ char *p;
#ifdef AFS_AIX32_ENV
#include <arpa/nameser.h>
int hostmatch, usermatch;
static char ldomain[MAXHOSTNAMELEN + 1];
static char *domainp = NULL;
static int nodomain = 0;
- register char *cp;
+ char *cp;
#ifdef AFS_AIX32_ENV
struct hostent *hp;
afs_int32
GetAfsServerAddr(char *syscall)
{
- register struct hostent *th;
+ struct hostent *th;
if (hostAddrLookup) {
/* Take advantage of caching and assume that the remote host
};
char *
-RSkipLine(register char *astr)
+RSkipLine(char *astr)
{
while (*astr != '\n')
astr++;
void
RCleanAcl(struct Acl *aa)
{
- register struct AclEntry *te, *ne;
+ struct AclEntry *te, *ne;
for (te = aa->pluslist; te; te = ne) {
ne = te->next;
{
afs_uint32 blob[PIOCTL_HEADER];
struct ViceIoctl data;
- register afs_int32 error;
+ afs_int32 error;
*errornumber = 0;
SETCLIENTCONTEXT(blob, rx_HostOf(call->conn->peer), creds->uid,
afs_int32 cmd, afs_int32 follow, rmtbulk *InData,
rmtbulk *OutData, afs_int32 *errornumber)
{
- register afs_int32 error;
+ afs_int32 error;
struct ViceIoctl data;
char *pathp = path;
afs_uint32 blob[PIOCTL_HEADER];
DirHash(char *string)
{
/* Hash a string to a number between 0 and NHASHENT. */
- register unsigned char tc;
- register int hval;
- register int tval;
+ unsigned char tc;
+ int hval;
+ int tval;
hval = 0;
while ((tc = (*string++)) != '\0') {
hval *= 173;
static int
common_prolog(struct cmd_syndesc * as, struct state * state)
{
- register struct cmd_item *ti;
+ struct cmd_item *ti;
VolumePackageOptions opts;
#ifdef AFS_NT40_ENV
static int
common_salv_prolog(struct cmd_syndesc * as, struct state * state)
{
- register struct cmd_item *ti;
+ struct cmd_item *ti;
state->sop = (struct salv_state *) calloc(1, sizeof(struct salv_state));
assert(state->sop != NULL);
/*! \brief procedure called from debug rpc call to get this module's state for debugging */
void
-ubeacon_Debug(register struct ubik_debug *aparm)
+ubeacon_Debug(struct ubik_debug *aparm)
{
/* fill in beacon's state fields in the ubik_debug structure */
aparm->syncSiteUntil = syncSiteUntil;
int
ubeacon_AmSyncSite(void)
{
- register afs_int32 now;
- register afs_int32 rcode;
+ afs_int32 now;
+ afs_int32 rcode;
/* special case for fast startup */
if (nServers == 1 && !amIClone) {
* \see ubeacon_InitServerListCommon()
*/
int
-ubeacon_InitServerList(afs_uint32 ame, register afs_uint32 aservers[])
+ubeacon_InitServerList(afs_uint32 ame, afs_uint32 aservers[])
{
afs_int32 code;
*/
int
ubeacon_InitServerListCommon(afs_uint32 ame, struct afsconf_cell *info,
- char clones[], register afs_uint32 aservers[])
+ char clones[], afs_uint32 aservers[])
{
- register struct ubik_server *ts;
+ struct ubik_server *ts;
afs_int32 me = -1;
- register afs_int32 servAddr;
- register afs_int32 i, code;
+ afs_int32 servAddr;
+ afs_int32 i, code;
afs_int32 magicHost;
struct ubik_server *magicServer;
void *
ubeacon_Interact(void *dummy)
{
- register afs_int32 code;
+ afs_int32 code;
struct timeval tt;
struct rx_connection *connections[MAXSERVERS];
struct ubik_server *servers[MAXSERVERS];
- register afs_int32 i;
- register struct ubik_server *ts;
+ afs_int32 i;
+ struct ubik_server *ts;
afs_int32 temp, yesVotes, lastWakeupTime, oldestYesVote, syncsite;
struct ubik_tid ttid;
afs_int32 startTime;
* \warning Beware, when using this function, of the header in front of most files.
*/
static int
-uphys_open(register struct ubik_dbase *adbase, afs_int32 afid)
+uphys_open(struct ubik_dbase *adbase, afs_int32 afid)
{
- register int fd;
+ int fd;
static int initd;
- register int i;
- register struct fdcache *tfd;
+ int i;
+ struct fdcache *tfd;
struct fdcache *bestfd;
/* initialize package */
* \brief Close the file, maintaining ref count in cache structure.
*/
int
-uphys_close(register int afd)
+uphys_close(int afd)
{
- register int i;
- register struct fdcache *tfd;
+ int i;
+ struct fdcache *tfd;
if (afd < 0)
return EBADF;
int
uphys_stat(struct ubik_dbase *adbase, afs_int32 afid, struct ubik_stat *astat)
{
- register int fd;
+ int fd;
struct stat tstat;
- register afs_int32 code;
+ afs_int32 code;
fd = uphys_open(adbase, afid);
if (fd < 0)
}
int
-uphys_read(register struct ubik_dbase *adbase, afs_int32 afile,
- register void *abuffer, afs_int32 apos, afs_int32 alength)
+uphys_read(struct ubik_dbase *adbase, afs_int32 afile,
+ void *abuffer, afs_int32 apos, afs_int32 alength)
{
- register int fd;
- register afs_int32 code;
+ int fd;
+ afs_int32 code;
fd = uphys_open(adbase, afile);
if (fd < 0)
}
int
-uphys_write(register struct ubik_dbase *adbase, afs_int32 afile,
- register void *abuffer, afs_int32 apos, afs_int32 alength)
+uphys_write(struct ubik_dbase *adbase, afs_int32 afile,
+ void *abuffer, afs_int32 apos, afs_int32 alength)
{
- register int fd;
- register afs_int32 code;
+ int fd;
+ afs_int32 code;
afs_int32 length;
fd = uphys_open(adbase, afile);
}
int
-uphys_truncate(register struct ubik_dbase *adbase, afs_int32 afile,
+uphys_truncate(struct ubik_dbase *adbase, afs_int32 afile,
afs_int32 asize)
{
- register afs_int32 code, fd;
+ afs_int32 code, fd;
fd = uphys_open(adbase, afile);
if (fd < 0)
return UNOENT;
* \todo Really should scan dir for data.
*/
int
-uphys_getnfiles(register struct ubik_dbase *adbase)
+uphys_getnfiles(struct ubik_dbase *adbase)
{
/* really should scan dir for data */
return 1;
* \brief Get database label, with \p aversion in host order.
*/
int
-uphys_getlabel(register struct ubik_dbase *adbase, afs_int32 afile,
+uphys_getlabel(struct ubik_dbase *adbase, afs_int32 afile,
struct ubik_version *aversion)
{
struct ubik_hdr thdr;
- register afs_int32 code, fd;
+ afs_int32 code, fd;
fd = uphys_open(adbase, afile);
if (fd < 0)
* \brief Label database, with \p aversion in host order.
*/
int
-uphys_setlabel(register struct ubik_dbase *adbase, afs_int32 afile,
+uphys_setlabel(struct ubik_dbase *adbase, afs_int32 afile,
struct ubik_version *aversion)
{
struct ubik_hdr thdr;
- register afs_int32 code, fd;
+ afs_int32 code, fd;
fd = uphys_open(adbase, afile);
if (fd < 0)
}
int
-uphys_sync(register struct ubik_dbase *adbase, afs_int32 afile)
+uphys_sync(struct ubik_dbase *adbase, afs_int32 afile)
{
- register afs_int32 code, fd;
+ afs_int32 code, fd;
fd = uphys_open(adbase, afile);
code = fsync(fd);
uphys_close(fd);
}
void
-uphys_invalidate(register struct ubik_dbase *adbase, afs_int32 afid)
+uphys_invalidate(struct ubik_dbase *adbase, afs_int32 afid)
{
- register int i;
- register struct fdcache *tfd;
+ int i;
+ struct fdcache *tfd;
/* scan file descr cache */
for (tfd = fdcache, i = 0; i < MAXFDCACHE; i++, tfd++) {
* and we must have a currently-good sync site.
*/
int
-urecovery_AllBetter(register struct ubik_dbase *adbase, int areadAny)
+urecovery_AllBetter(struct ubik_dbase *adbase, int areadAny)
{
- register afs_int32 rcode;
+ afs_int32 rcode;
ubik_dprint_25("allbetter checking\n");
rcode = 0;
int
urecovery_AbortAll(struct ubik_dbase *adbase)
{
- register struct ubik_trans *tt;
+ struct ubik_trans *tt;
for (tt = adbase->activeTrans; tt; tt = tt->next) {
udisk_abort(tt);
}
* \brief this routine aborts the current remote transaction, if any, if the tid is wrong
*/
int
-urecovery_CheckTid(register struct ubik_tid *atid)
+urecovery_CheckTid(struct ubik_tid *atid)
{
if (ubik_currentTrans) {
/* there is remote write trans, see if we match, see if this
* the log.
*/
static int
-ReplayLog(register struct ubik_dbase *adbase)
+ReplayLog(struct ubik_dbase *adbase)
{
afs_int32 opcode;
- register afs_int32 code, tpos;
+ afs_int32 code, tpos;
int logIsGood;
afs_int32 len, thisSize, tfile, filePos;
afs_int32 buffer[4];
* This routine is called after replaying the log; it reads the restored labels.
*/
static int
-InitializeDB(register struct ubik_dbase *adbase)
+InitializeDB(struct ubik_dbase *adbase)
{
- register afs_int32 code;
+ afs_int32 code;
code = (*adbase->getlabel) (adbase, 0, &adbase->version);
if (code) {
* We replay the logs and then read the resulting file to figure out what version we've really got.
*/
int
-urecovery_Initialize(register struct ubik_dbase *adbase)
+urecovery_Initialize(struct ubik_dbase *adbase)
{
- register afs_int32 code;
+ afs_int32 code;
code = ReplayLog(adbase);
if (code)
struct ubik_trans *ubik_currentTrans = 0;
int
-ubik_CheckAuth(register struct rx_call *acall)
+ubik_CheckAuth(struct rx_call *acall)
{
- register afs_int32 code;
+ afs_int32 code;
if (ubik_CheckRXSecurityProc) {
code = (*ubik_CheckRXSecurityProc) (ubik_CheckRXSecurityRock, acall);
return code;
* sync site is executing a write transaction.
*/
afs_int32
-SDISK_Begin(register struct rx_call *rxcall, struct ubik_tid *atid)
+SDISK_Begin(struct rx_call *rxcall, struct ubik_tid *atid)
{
- register afs_int32 code;
+ afs_int32 code;
if ((code = ubik_CheckAuth(rxcall))) {
return code;
afs_int32
-SDISK_Commit(register struct rx_call *rxcall, struct ubik_tid *atid)
+SDISK_Commit(struct rx_call *rxcall, struct ubik_tid *atid)
{
- register afs_int32 code;
- register struct ubik_dbase *dbase;
+ afs_int32 code;
+ struct ubik_dbase *dbase;
if ((code = ubik_CheckAuth(rxcall))) {
return code;
}
afs_int32
-SDISK_ReleaseLocks(register struct rx_call *rxcall, struct ubik_tid *atid)
+SDISK_ReleaseLocks(struct rx_call *rxcall, struct ubik_tid *atid)
{
- register struct ubik_dbase *dbase;
- register afs_int32 code;
+ struct ubik_dbase *dbase;
+ afs_int32 code;
if ((code = ubik_CheckAuth(rxcall))) {
return code;
}
afs_int32
-SDISK_Abort(register struct rx_call *rxcall, struct ubik_tid *atid)
+SDISK_Abort(struct rx_call *rxcall, struct ubik_tid *atid)
{
- register afs_int32 code;
- register struct ubik_dbase *dbase;
+ afs_int32 code;
+ struct ubik_dbase *dbase;
if ((code = ubik_CheckAuth(rxcall))) {
return code;
/* apos and alen are not used */
afs_int32
-SDISK_Lock(register struct rx_call *rxcall, struct ubik_tid *atid,
+SDISK_Lock(struct rx_call *rxcall, struct ubik_tid *atid,
afs_int32 afile, afs_int32 apos, afs_int32 alen, afs_int32 atype)
{
- register afs_int32 code;
- register struct ubik_dbase *dbase;
+ afs_int32 code;
+ struct ubik_dbase *dbase;
struct ubik_trans *ubik_thisTrans;
if ((code = ubik_CheckAuth(rxcall))) {
* \brief Write a vector of data
*/
afs_int32
-SDISK_WriteV(register struct rx_call *rxcall, struct ubik_tid *atid,
+SDISK_WriteV(struct rx_call *rxcall, struct ubik_tid *atid,
iovec_wrt *io_vector, iovec_buf *io_buffer)
{
afs_int32 code, i, offset;
}
afs_int32
-SDISK_Write(register struct rx_call *rxcall, struct ubik_tid *atid,
- afs_int32 afile, afs_int32 apos, register bulkdata *adata)
+SDISK_Write(struct rx_call *rxcall, struct ubik_tid *atid,
+ afs_int32 afile, afs_int32 apos, bulkdata *adata)
{
- register afs_int32 code;
- register struct ubik_dbase *dbase;
+ afs_int32 code;
+ struct ubik_dbase *dbase;
if ((code = ubik_CheckAuth(rxcall))) {
return code;
}
afs_int32
-SDISK_Truncate(register struct rx_call *rxcall, struct ubik_tid *atid,
+SDISK_Truncate(struct rx_call *rxcall, struct ubik_tid *atid,
afs_int32 afile, afs_int32 alen)
{
- register afs_int32 code;
- register struct ubik_dbase *dbase;
+ afs_int32 code;
+ struct ubik_dbase *dbase;
if ((code = ubik_CheckAuth(rxcall))) {
return code;
}
afs_int32
-SDISK_GetVersion(register struct rx_call *rxcall,
- register struct ubik_version *aversion)
+SDISK_GetVersion(struct rx_call *rxcall,
+ struct ubik_version *aversion)
{
- register afs_int32 code;
+ afs_int32 code;
if ((code = ubik_CheckAuth(rxcall))) {
return code;
}
afs_int32
-SDISK_GetFile(register struct rx_call *rxcall, register afs_int32 file,
+SDISK_GetFile(struct rx_call *rxcall, afs_int32 file,
struct ubik_version *version)
{
- register afs_int32 code;
- register struct ubik_dbase *dbase;
- register afs_int32 offset;
+ afs_int32 code;
+ struct ubik_dbase *dbase;
+ afs_int32 offset;
struct ubik_stat ubikstat;
char tbuffer[256];
afs_int32 tlen;
}
afs_int32
-SDISK_SendFile(register struct rx_call *rxcall, afs_int32 file,
+SDISK_SendFile(struct rx_call *rxcall, afs_int32 file,
afs_int32 length, struct ubik_version *avers)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_dbase *dbase = NULL;
char tbuffer[1024];
afs_int32 offset;
struct ubik_version tversion;
- register int tlen;
+ int tlen;
struct rx_peer *tpeer;
struct rx_connection *tconn;
afs_uint32 otherHost = 0;
afs_int32
-SDISK_Probe(register struct rx_call *rxcall)
+SDISK_Probe(struct rx_call *rxcall)
{
return 0;
}
* \return zero on success, else 1.
*/
afs_int32
-SDISK_UpdateInterfaceAddr(register struct rx_call *rxcall,
+SDISK_UpdateInterfaceAddr(struct rx_call *rxcall,
UbikInterfaceAddr *inAddr,
UbikInterfaceAddr *outAddr)
{
struct ubik_server *ubik_servers;
short ubik_callPortal;
-static int BeginTrans(register struct ubik_dbase *dbase, afs_int32 transMode,
+static int BeginTrans(struct ubik_dbase *dbase, afs_int32 transMode,
struct ubik_trans **transPtr, int readAny);
struct rx_securityClass *ubik_sc[3];
*/
afs_int32
ContactQuorum_NoArguments(afs_int32 (*proc)(struct rx_connection *, ubik_tid *),
- register struct ubik_trans *atrans, int aflags)
+ struct ubik_trans *atrans, int aflags)
{
- register struct ubik_server *ts;
- register afs_int32 code;
+ struct ubik_server *ts;
+ afs_int32 code;
afs_int32 rcode, okcalls;
rcode = 0;
}
afs_int32
-ContactQuorum_DISK_Lock(register struct ubik_trans *atrans, int aflags,afs_int32 file,
+ContactQuorum_DISK_Lock(struct ubik_trans *atrans, int aflags,afs_int32 file,
afs_int32 position, afs_int32 length, afs_int32 type)
{
- register struct ubik_server *ts;
- register afs_int32 code;
+ struct ubik_server *ts;
+ afs_int32 code;
afs_int32 rcode, okcalls;
rcode = 0;
}
afs_int32
-ContactQuorum_DISK_Write(register struct ubik_trans *atrans, int aflags,
+ContactQuorum_DISK_Write(struct ubik_trans *atrans, int aflags,
afs_int32 file, afs_int32 position, bulkdata *data)
{
- register struct ubik_server *ts;
- register afs_int32 code;
+ struct ubik_server *ts;
+ afs_int32 code;
afs_int32 rcode, okcalls;
rcode = 0;
}
afs_int32
-ContactQuorum_DISK_Truncate(register struct ubik_trans *atrans, int aflags,
+ContactQuorum_DISK_Truncate(struct ubik_trans *atrans, int aflags,
afs_int32 file, afs_int32 length)
{
- register struct ubik_server *ts;
- register afs_int32 code;
+ struct ubik_server *ts;
+ afs_int32 code;
afs_int32 rcode, okcalls;
rcode = 0;
}
afs_int32
-ContactQuorum_DISK_WriteV(register struct ubik_trans *atrans, int aflags,
+ContactQuorum_DISK_WriteV(struct ubik_trans *atrans, int aflags,
iovec_wrt * io_vector, iovec_buf *io_buffer)
{
- register struct ubik_server *ts;
- register afs_int32 code;
+ struct ubik_server *ts;
+ afs_int32 code;
afs_int32 rcode, okcalls;
rcode = 0;
}
afs_int32
-ContactQuorum_DISK_SetVersion(register struct ubik_trans *atrans, int aflags,
+ContactQuorum_DISK_SetVersion(struct ubik_trans *atrans, int aflags,
ubik_version *OldVersion,
ubik_version *NewVersion)
{
- register struct ubik_server *ts;
- register afs_int32 code;
+ struct ubik_server *ts;
+ afs_int32 code;
afs_int32 rcode, okcalls;
rcode = 0;
afs_uint32 serverList[], const char *pathName,
struct ubik_dbase **dbase)
{
- register struct ubik_dbase *tdb;
- register afs_int32 code;
+ struct ubik_dbase *tdb;
+ afs_int32 code;
#ifdef AFS_PTHREAD_ENV
pthread_t rxServerThread; /* pthread variables */
pthread_t ubeacon_InteractThread;
* \note We can only begin transaction when we have an up-to-date database.
*/
static int
-BeginTrans(register struct ubik_dbase *dbase, afs_int32 transMode,
+BeginTrans(struct ubik_dbase *dbase, afs_int32 transMode,
struct ubik_trans **transPtr, int readAny)
{
struct ubik_trans *jt;
- register struct ubik_trans *tt;
- register afs_int32 code;
+ struct ubik_trans *tt;
+ afs_int32 code;
#if defined(UBIK_PAUSE)
int count;
#endif /* UBIK_PAUSE */
* \see BeginTrans()
*/
int
-ubik_BeginTrans(register struct ubik_dbase *dbase, afs_int32 transMode,
+ubik_BeginTrans(struct ubik_dbase *dbase, afs_int32 transMode,
struct ubik_trans **transPtr)
{
return BeginTrans(dbase, transMode, transPtr, 0);
* \see BeginTrans()
*/
int
-ubik_BeginTransReadAny(register struct ubik_dbase *dbase, afs_int32 transMode,
+ubik_BeginTransReadAny(struct ubik_dbase *dbase, afs_int32 transMode,
struct ubik_trans **transPtr)
{
return BeginTrans(dbase, transMode, transPtr, 1);
* \brief This routine ends a read or write transaction by aborting it.
*/
int
-ubik_AbortTrans(register struct ubik_trans *transPtr)
+ubik_AbortTrans(struct ubik_trans *transPtr)
{
- register afs_int32 code;
+ afs_int32 code;
afs_int32 code2;
- register struct ubik_dbase *dbase;
+ struct ubik_dbase *dbase;
dbase = transPtr->dbase;
* \return an error code.
*/
int
-ubik_EndTrans(register struct ubik_trans *transPtr)
+ubik_EndTrans(struct ubik_trans *transPtr)
{
- register afs_int32 code;
+ afs_int32 code;
struct timeval tv;
afs_int32 realStart;
- register struct ubik_server *ts;
+ struct ubik_server *ts;
afs_int32 now;
- register struct ubik_dbase *dbase;
+ struct ubik_dbase *dbase;
if (transPtr->type == UBIK_WRITETRANS) {
code = ubik_Flush(transPtr);
* \note *length is an INOUT parameter: at the start it represents the size of the buffer, and when done, it contains the number of bytes actually transferred.
*/
int
-ubik_Read(register struct ubik_trans *transPtr, void *buffer,
+ubik_Read(struct ubik_trans *transPtr, void *buffer,
afs_int32 length)
{
- register afs_int32 code;
+ afs_int32 code;
/* reads are easy to do: handle locally */
DBHOLD(transPtr->dbase);
}
int
-ubik_Write(register struct ubik_trans *transPtr, void *vbuffer,
+ubik_Write(struct ubik_trans *transPtr, void *vbuffer,
afs_int32 length)
{
struct ubik_iovec *iovec;
* and a byte position relative to the specified file \p position.
*/
int
-ubik_Seek(register struct ubik_trans *transPtr, afs_int32 fileid,
+ubik_Seek(struct ubik_trans *transPtr, afs_int32 fileid,
afs_int32 position)
{
- register afs_int32 code;
+ afs_int32 code;
DBHOLD(transPtr->dbase);
if (!urecovery_AllBetter(transPtr->dbase, transPtr->flags & TRREADANY)) {
* transaction in \p fileid and \p position.
*/
int
-ubik_Tell(register struct ubik_trans *transPtr, afs_int32 * fileid,
+ubik_Tell(struct ubik_trans *transPtr, afs_int32 * fileid,
afs_int32 * position)
{
DBHOLD(transPtr->dbase);
* bytes, if length is less than the file's current size.
*/
int
-ubik_Truncate(register struct ubik_trans *transPtr, afs_int32 length)
+ubik_Truncate(struct ubik_trans *transPtr, afs_int32 length)
{
afs_int32 code, error = 0;
* \brief utility to wait for a version # to change
*/
int
-ubik_WaitVersion(register struct ubik_dbase *adatabase,
- register struct ubik_version *aversion)
+ubik_WaitVersion(struct ubik_dbase *adatabase,
+ struct ubik_version *aversion)
{
DBHOLD(adatabase);
while (1) {
* \brief utility to get the version of the dbase a transaction is dealing with
*/
int
-ubik_GetVersion(register struct ubik_trans *atrans,
- register struct ubik_version *avers)
+ubik_GetVersion(struct ubik_trans *atrans,
+ struct ubik_version *avers)
{
*avers = atrans->dbase->version;
return 0;
* Ubik database, it should invalidate that cache.
*/
static int
-ubik_CacheUpdate(register struct ubik_trans *atrans)
+ubik_CacheUpdate(struct ubik_trans *atrans)
{
if (!(atrans && atrans->dbase))
return -1;
/* this extern gives the sync site's db version, with epoch of 0 if none yet */
/* phys.c */
-extern int uphys_close(register int afd);
+extern int uphys_close(int afd);
extern int uphys_stat(struct ubik_dbase *adbase, afs_int32 afid,
struct ubik_stat *astat);
-extern int uphys_read(register struct ubik_dbase *adbase, afs_int32 afile,
- register void *abuffer, afs_int32 apos,
+extern int uphys_read(struct ubik_dbase *adbase, afs_int32 afile,
+ void *abuffer, afs_int32 apos,
afs_int32 alength);
-extern int uphys_write(register struct ubik_dbase *adbase, afs_int32 afile,
- register void *abuffer, afs_int32 apos,
+extern int uphys_write(struct ubik_dbase *adbase, afs_int32 afile,
+ void *abuffer, afs_int32 apos,
afs_int32 alength);
-extern int uphys_truncate(register struct ubik_dbase *adbase, afs_int32 afile,
+extern int uphys_truncate(struct ubik_dbase *adbase, afs_int32 afile,
afs_int32 asize);
-extern int uphys_getnfiles(register struct ubik_dbase *adbase);
-extern int uphys_getlabel(register struct ubik_dbase *adbase, afs_int32 afile,
+extern int uphys_getnfiles(struct ubik_dbase *adbase);
+extern int uphys_getlabel(struct ubik_dbase *adbase, afs_int32 afile,
struct ubik_version *aversion);
-extern int uphys_setlabel(register struct ubik_dbase *adbase, afs_int32 afile,
+extern int uphys_setlabel(struct ubik_dbase *adbase, afs_int32 afile,
struct ubik_version *aversion);
-extern int uphys_sync(register struct ubik_dbase *adbase, afs_int32 afile);
-extern void uphys_invalidate(register struct ubik_dbase *adbase,
+extern int uphys_sync(struct ubik_dbase *adbase, afs_int32 afile);
+extern void uphys_invalidate(struct ubik_dbase *adbase,
afs_int32 afid);
/*! \name recovery.c */
extern int urecovery_ResetState(void);
extern int urecovery_LostServer(void);
-extern int urecovery_AllBetter(register struct ubik_dbase *adbase,
+extern int urecovery_AllBetter(struct ubik_dbase *adbase,
int areadAny);
extern int urecovery_AbortAll(struct ubik_dbase *adbase);
-extern int urecovery_CheckTid(register struct ubik_tid *atid);
-extern int urecovery_Initialize(register struct ubik_dbase *adbase);
+extern int urecovery_CheckTid(struct ubik_tid *atid);
+extern int urecovery_Initialize(struct ubik_dbase *adbase);
extern void *urecovery_Interact(void *);
extern int DoProbe(struct ubik_server *server);
/*\}*/
extern int ubik_ServerInit(afs_uint32 myHost, short myPort,
afs_uint32 serverList[],
const char *pathName, struct ubik_dbase **dbase);
-extern int ubik_BeginTrans(register struct ubik_dbase *dbase,
+extern int ubik_BeginTrans(struct ubik_dbase *dbase,
afs_int32 transMode, struct ubik_trans **transPtr);
-extern int ubik_BeginTransReadAny(register struct ubik_dbase *dbase,
+extern int ubik_BeginTransReadAny(struct ubik_dbase *dbase,
afs_int32 transMode,
struct ubik_trans **transPtr);
-extern int ubik_AbortTrans(register struct ubik_trans *transPtr);
+extern int ubik_AbortTrans(struct ubik_trans *transPtr);
-extern int ubik_EndTrans(register struct ubik_trans *transPtr);
-extern int ubik_Read(register struct ubik_trans *transPtr, void *buffer,
+extern int ubik_EndTrans(struct ubik_trans *transPtr);
+extern int ubik_Read(struct ubik_trans *transPtr, void *buffer,
afs_int32 length);
extern int ubik_Flush(struct ubik_trans *transPtr);
-extern int ubik_Write(register struct ubik_trans *transPtr, void *buffer,
+extern int ubik_Write(struct ubik_trans *transPtr, void *buffer,
afs_int32 length);
-extern int ubik_Seek(register struct ubik_trans *transPtr, afs_int32 fileid,
+extern int ubik_Seek(struct ubik_trans *transPtr, afs_int32 fileid,
afs_int32 position);
-extern int ubik_Tell(register struct ubik_trans *transPtr, afs_int32 * fileid,
+extern int ubik_Tell(struct ubik_trans *transPtr, afs_int32 * fileid,
afs_int32 * position);
-extern int ubik_Truncate(register struct ubik_trans *transPtr,
+extern int ubik_Truncate(struct ubik_trans *transPtr,
afs_int32 length);
extern int ubik_SetLock(struct ubik_trans *atrans, afs_int32 apos,
afs_int32 alen, int atype);
-extern int ubik_WaitVersion(register struct ubik_dbase *adatabase,
- register struct ubik_version *aversion);
-extern int ubik_GetVersion(register struct ubik_trans *atrans,
- register struct ubik_version *avers);
+extern int ubik_WaitVersion(struct ubik_dbase *adatabase,
+ struct ubik_version *aversion);
+extern int ubik_GetVersion(struct ubik_trans *atrans,
+ struct ubik_version *avers);
extern int ubik_CheckCache(struct ubik_trans *atrans,
ubik_updatecache_func check,
void *rock);
extern int ubik_ParseClientList(int argc, char **argv, afs_uint32 * aothers);
extern unsigned int afs_random(void);
-extern int ubik_ClientInit(register struct rx_connection **serverconns,
+extern int ubik_ClientInit(struct rx_connection **serverconns,
struct ubik_client **aclient);
extern afs_int32 ubik_ClientDestroy(struct ubik_client *aclient);
extern struct rx_connection *ubik_RefreshConn(struct rx_connection *tc);
long p3, long p4, long p5, long p6, long p7,
long p8, long p9, long p10, long p11, long p12,
long p13, long p14, long p15, long p16);
-extern afs_int32 ubik_Call_New(int (*aproc) (), register struct ubik_client
+extern afs_int32 ubik_Call_New(int (*aproc) (), struct ubik_client
*aclient, afs_int32 aflags, long p1, long p2,
long p3, long p4, long p5, long p6, long p7,
long p8, long p9, long p10, long p11, long p12,
int
ubik_ParseClientList(int argc, char **argv, afs_uint32 * aothers)
{
- register afs_int32 i;
- register char *tp;
- register struct hostent *th;
+ afs_int32 i;
+ char *tp;
+ struct hostent *th;
afs_uint32 temp;
afs_int32 counter;
int inServer;
#endif /* abs */
#define abs(a) ((a) < 0 ? -1*(a) : (a))
int
-ubik_ClientInit(register struct rx_connection **serverconns,
+ubik_ClientInit(struct rx_connection **serverconns,
struct ubik_client **aclient)
{
int i, j;
int count;
int offset;
- register struct ubik_client *tc;
+ struct ubik_client *tc;
initialize_U_error_table();
afs_int32
ubik_ClientDestroy(struct ubik_client * aclient)
{
- register int c;
+ int c;
if (aclient == 0)
return 0;
* operation won't work until you find a sync site
*/
static int
-try_GetSyncSite(register struct ubik_client *aclient, afs_int32 apos)
+try_GetSyncSite(struct ubik_client *aclient, afs_int32 apos)
{
struct rx_peer *rxp;
afs_int32 code;
* been locked.
*/
static afs_int32
-CallIter(int (*aproc) (), register struct ubik_client *aclient,
+CallIter(int (*aproc) (), struct ubik_client *aclient,
afs_int32 aflags, int *apos, long p1, long p2, long p3, long p4,
long p5, long p6, long p7, long p8, long p9, long p10, long p11,
long p12, long p13, long p14, long p15, long p16, int needlock)
{
- register afs_int32 code;
+ afs_int32 code;
struct rx_connection *tc;
short origLevel;
* \todo In the future, we should also put in a protocol to find the sync site.
*/
afs_int32
-ubik_Call_New(int (*aproc) (), register struct ubik_client *aclient,
+ubik_Call_New(int (*aproc) (), struct ubik_client *aclient,
afs_int32 aflags, long p1, long p2, long p3, long p4, long p5,
long p6, long p7, long p8, long p9, long p10, long p11,
long p12, long p13, long p14, long p15, long p16)
* \todo In the future, we should also put in a protocol to find the sync site.
*/
afs_int32
-ubik_Call(int (*aproc) (), register struct ubik_client *aclient,
+ubik_Call(int (*aproc) (), struct ubik_client *aclient,
afs_int32 aflags, long p1, long p2, long p3, long p4,
long p5, long p6, long p7, long p8, long p9, long p10,
long p11, long p12, long p13, long p14, long p15, long p16)
ubik_ParseServerList(int argc, char **argv, afs_uint32 *ahost,
afs_uint32 *aothers)
{
- register afs_int32 i;
- register char *tp;
- register struct hostent *th;
+ afs_int32 i;
+ char *tp;
+ struct hostent *th;
char hostname[64];
afs_uint32 myHost, temp;
afs_int32 counter;
static_inline int afs_cast_time_t(time_t d) { return (int) d; }
static short
-PortNumber(register char *aport)
+PortNumber(char *aport)
{
- register int tc;
- register afs_int32 total;
+ int tc;
+ afs_int32 total;
total = 0;
while ((tc = *aport++)) {
{
char *hostName, *portName, *times;
afs_int32 hostAddr;
- register afs_int32 i, j, code;
+ afs_int32 i, j, code;
short port;
int int32p;
time_t now, then, diff, newtime;
int
main(int argc, char **argv)
{
- register afs_int32 code;
+ afs_int32 code;
struct ubik_client *cstruct = 0;
afs_uint32 serverList[MAXSERVERS];
struct rx_connection *serverconns[MAXSERVERS];
struct rx_securityClass *sc;
- register afs_int32 i;
+ afs_int32 i;
afs_int32 temp;
if (argc == 1) {
int
main(int argc, char **argv)
{
- register afs_int32 code, i;
+ afs_int32 code, i;
afs_uint32 serverList[MAXSERVERS];
afs_uint32 myHost;
struct rx_service *tservice;
int
uvote_ShouldIRun(void)
{
- register afs_int32 now;
+ afs_int32 now;
now = FT_ApproxTime();
if (BIGTIME + ubik_lastYesTime < now)
afs_int32
uvote_GetSyncSite(void)
{
- register afs_int32 now;
- register afs_int32 code;
+ afs_int32 now;
+ afs_int32 code;
if (!lastYesState)
code = 0;
* non-zero.
*/
afs_int32
-SVOTE_Beacon(register struct rx_call * rxcall, afs_int32 astate,
+SVOTE_Beacon(struct rx_call * rxcall, afs_int32 astate,
afs_int32 astart, struct ubik_version * avers,
struct ubik_tid * atid)
{
- register afs_int32 otherHost;
- register afs_int32 now;
+ afs_int32 otherHost;
+ afs_int32 now;
afs_int32 vote;
struct rx_connection *aconn;
struct rx_peer *rxp;
*/
afs_int32
SVOTE_SDebug(struct rx_call * rxcall, afs_int32 awhich,
- register struct ubik_sdebug * aparm)
+ struct ubik_sdebug * aparm)
{
afs_int32 code, isClone;
code = SVOTE_XSDebug(rxcall, awhich, aparm, &isClone);
afs_int32
SVOTE_XSDebug(struct rx_call * rxcall, afs_int32 awhich,
- register struct ubik_sdebug * aparm, afs_int32 * isclone)
+ struct ubik_sdebug * aparm, afs_int32 * isclone)
{
- register struct ubik_server *ts;
- register int i;
+ struct ubik_server *ts;
+ int i;
for (ts = ubik_servers; ts; ts = ts->next) {
if (awhich-- == 0) {
/* we're done */
}
afs_int32
-SVOTE_XDebug(struct rx_call * rxcall, register struct ubik_debug * aparm,
+SVOTE_XDebug(struct rx_call * rxcall, struct ubik_debug * aparm,
afs_int32 * isclone)
{
afs_int32 code;
* \brief Handle basic network debug command. This is the global state dumper.
*/
afs_int32
-SVOTE_Debug(struct rx_call * rxcall, register struct ubik_debug * aparm)
+SVOTE_Debug(struct rx_call * rxcall, struct ubik_debug * aparm)
{
int i;
/* fill in the basic debug structure. Note the the RPC protocol transfers,
afs_int32
SVOTE_SDebugOld(struct rx_call * rxcall, afs_int32 awhich,
- register struct ubik_sdebug_old * aparm)
+ struct ubik_sdebug_old * aparm)
{
- register struct ubik_server *ts;
+ struct ubik_server *ts;
for (ts = ubik_servers; ts; ts = ts->next) {
if (awhich-- == 0) {
*/
afs_int32
SVOTE_DebugOld(struct rx_call * rxcall,
- register struct ubik_debug_old * aparm)
+ struct ubik_debug_old * aparm)
{
/* fill in the basic debug structure. Note the the RPC protocol transfers,
* \brief Get the sync site; called by remote servers to find where they should go.
*/
afs_int32
-SVOTE_GetSyncSite(register struct rx_call * rxcall,
- register afs_int32 * ahost)
+SVOTE_GetSyncSite(struct rx_call * rxcall,
+ afs_int32 * ahost)
{
- register afs_int32 temp;
+ afs_int32 temp;
temp = uvote_GetSyncSite();
*ahost = ntohl(temp);
afs_int32
GetServer(char *aname)
{
- register struct hostent *th;
+ struct hostent *th;
afs_int32 addr;
th = gethostbyname(aname);
int
-update_ReceiveFile(register int fd, register struct rx_call *call, register struct stat *status)
+update_ReceiveFile(int fd, struct rx_call *call, struct stat *status)
{
- register char *buffer = (char *)0;
+ char *buffer = (char *)0;
afs_int32 length;
- register int blockSize;
+ int blockSize;
afs_int32 error = 0, len;
#ifdef AFS_AIX_ENV
struct statfs tstatfs;
return UPDATE_ERROR;
}
while (!error && length) {
- register int nbytes = (length > blockSize ? blockSize : length);
+ int nbytes = (length > blockSize ? blockSize : length);
nbytes = rx_Read(call, buffer, nbytes);
if (!nbytes)
error = UPDATE_ERROR;
}
int
-update_SendFile(register int fd, register struct rx_call *call, register struct stat *status)
+update_SendFile(int fd, struct rx_call *call, struct stat *status)
{
char *buffer = (char *)0;
int blockSize;
tlen = htonl(length);
rx_Write(call, (char *)&tlen, sizeof(afs_int32)); /* send length on fetch */
while (!error && length) {
- register int nbytes = (length > blockSize ? blockSize : length);
+ int nbytes = (length > blockSize ? blockSize : length);
nbytes = read(fd, buffer, nbytes);
if (nbytes <= 0) {
fprintf(stderr, "File system read failed\n");
*/
int
update_SendDirInfo(char *name, /* Name of dir to enumerate */
- register struct rx_call *call, /* rx call */
- register struct stat *status, /* stat struct for dir */
+ struct rx_call *call, /* rx call */
+ struct stat *status, /* stat struct for dir */
char *origDir) /* orig name of dir before being localized */
{
DIR *dirp;
int
AddToList(struct filestr **ah, char *aname)
{
- register struct filestr *tf;
+ struct filestr *tf;
tf = (struct filestr *)malloc(sizeof(struct filestr));
tf->next = *ah;
*ah = tf;
int
ZapList(struct filestr **ah)
{
- register struct filestr *tf, *nf;
+ struct filestr *tf, *nf;
for (tf = *ah; tf; tf = nf) {
nf = tf->next; /* save before freeing */
free(tf->name);
*------------------------------------------------------------------------*/
static int
-GetCommon(register struct cmd_syndesc *a_as, void *arock)
+GetCommon(struct cmd_syndesc *a_as, void *arock)
{ /*GetCommon */
int code; /*Result of ka_LocalCell */
#ifdef USS_DB
static char rn[] = "uss:SaveRestoreInfo"; /*Routine name */
#endif
- register afs_int32 code; /*Return code */
+ afs_int32 code; /*Return code */
afs_int32 deletedUid; /*Uid to be nuked */
/*
DoBulkAddLine(char *a_buf, char *a_tp)
{ /*DoBulkAddLine */
- register int i; /*Loop variable */
+ int i; /*Loop variable */
#ifdef USS_DB
static char rn[] = "DoBulkAddLine"; /*Routine name */
#endif
DoBulkPurgeVolumeLine(char *a_buf, char *a_tp)
{ /*DoBulkPurgeVolumeLine */
- register int i; /*Loop variable */
+ int i; /*Loop variable */
int overflow; /*Did a field copy overflow happen? */
/*
DoBulkRestoreLine(char *a_buf, char *a_tp)
{ /*DoBulkRestoreLine */
- register int i; /*Loop variable */
+ int i; /*Loop variable */
int overflow; /*Overflow occur on field copy? */
/*
DoBulkExecLine(char *a_buf, char *a_tp)
{ /*DoBulkExecLine */
- register afs_int32 code; /*Return code */
+ afs_int32 code; /*Return code */
/*
* Really, uss_procs_Exec does all the work for us!
*------------------------------------------------------------------------*/
extern int Pipe;
static int
-HandleBulk(register struct cmd_syndesc *a_as, void *a_rock)
+HandleBulk(struct cmd_syndesc *a_as, void *a_rock)
{ /*HandleBulk */
#define USS_BULK_CMD_CHARS 128
*------------------------------------------------------------------------*/
static int
-AddUser(register struct cmd_syndesc *a_as, void *a_rock)
+AddUser(struct cmd_syndesc *a_as, void *a_rock)
{ /*AddUser */
int i;
- register struct cmd_item *ti;
+ struct cmd_item *ti;
int code;
/*
main(int argc, char *argv[])
{ /*Main routine */
- register struct cmd_syndesc *cs; /*Command line syntax descriptor */
- register afs_int32 code; /*Return code */
+ struct cmd_syndesc *cs; /*Command line syntax descriptor */
+ afs_int32 code; /*Return code */
#ifdef AFS_AIX32_ENV
/*
*------------------------------------------------------------------------*/
static int
-foldcmp(register char *a_str1, register char *a_str2)
+foldcmp(char *a_str1, char *a_str2)
{ /*foldcmp */
- register char t, u;
+ char t, u;
while (1) {
t = *a_str1++;
*------------------------------------------------------------------------*/
static afs_int32
-Convert(register char *a_rights)
+Convert(char *a_rights)
{ /*Convert */
- register int i, len;
+ int i, len;
afs_int32 mode;
- register char tc;
+ char tc;
if (!strcmp(a_rights, "read"))
return (PRSFS_READ | PRSFS_LOOKUP);
*------------------------------------------------------------------------*/
static struct AclEntry *
-FindList(register struct AclEntry *a_alist, char *a_name)
+FindList(struct AclEntry *a_alist, char *a_name)
{ /*FindList */
while (a_alist) {
*------------------------------------------------------------------------*/
static char *
-SkipLine(register char *a_str)
+SkipLine(char *a_str)
{ /*SkipLine */
while (*a_str != '\n')
EmptyAcl(void)
{ /*EmptyAcl */
- register struct Acl *tp;
+ struct Acl *tp;
tp = (struct Acl *)malloc(sizeof(struct Acl));
tp->nplus = tp->nminus = 0;
uss_acl_SetAccess(char *a_access, int a_clear, int a_negative)
{ /*uss_acl_SetAccess */
- register afs_int32 code;
+ afs_int32 code;
#ifdef USS_ACL_DB
static char rn[] = "uss_acl_SetAccess";
#endif
uss_acl_SetDiskQuota(char *a_path, int a_q)
{ /*uss_acl_SetDiskQuota */
- register afs_int32 code;
+ afs_int32 code;
#ifdef USS_ACL_DB
static char rn[] = "uss_acl_SetDiskQuota";
#endif
int a_maxChars, int *a_overflowP)
{ /*uss_common_FieldCp */
- register int chars_read; /*Number of chars read so far */
+ int chars_read; /*Number of chars read so far */
chars_read = 0;
*a_overflowP = 0;
*------------------------------------------------------------------------*/
static int
-InAFS(register char *a_path)
+InAFS(char *a_path)
{ /*InAFS */
- register afs_int32 code;
+ afs_int32 code;
blob.in = NULL;
blob.in_size = 0;
#ifdef USS_FS_DB
static char rn[] = "uss_fs:CarefulPioctl";
#endif
- register afs_int32 code;
+ afs_int32 code;
/*
* Call the pioctl() the first time, return if things worked
#ifdef USS_FS_DB
static char rn[] = "uss_fs_GetACL"; /*Routine name */
#endif
- register afs_int32 code; /*pioctl() result */
+ afs_int32 code; /*pioctl() result */
blob.in = NULL;
blob.in_size = 0;
#ifdef USS_FS_DB
static char rn[] = "uss_fs_SetACL"; /*Routine name */
#endif
- register afs_int32 code; /*pioctl() result */
+ afs_int32 code; /*pioctl() result */
blob.in = a_aclBuff;
blob.in_size = a_aclBuffBytes;
#ifdef USS_FS_DB
static char rn[] = "uss_fs_GetVolStat"; /*Routine name */
#endif
- register afs_int32 code; /*pioctl() result */
+ afs_int32 code; /*pioctl() result */
blob.in = NULL;
blob.in_size = 0;
#ifdef USS_FS_DB
static char rn[] = "uss_fs_SetVolStat"; /*Routine name */
#endif
- register afs_int32 code; /*pioctl() result */
+ afs_int32 code; /*pioctl() result */
blob.in = a_volStatBuff;
blob.in_size = a_volStatBuffBytes;
#ifdef USS_FS_DB
static char rn[] = "uss_fs_CkBackups"; /*Routine name */
#endif
- register afs_int32 code; /*pioctl() result */
+ afs_int32 code; /*pioctl() result */
blob.in = NULL;
blob.in_size = 0;
{ /*uss_fs_MkMountPoint */
extern int local_Cell;
static char rn[] = "uss_fs_MkMountPoint"; /*Routine name */
- register afs_int32 code; /*pioctl() result */
+ afs_int32 code; /*pioctl() result */
char *tp; /*Temporary */
#ifdef USS_FS_DB
uss_fs_RmMountPoint(char *a_mountpoint)
{ /*uss_fs_RmMountPoint */
static char rn[] = "uss_fs_RmMountPoint"; /*Routine name */
- register afs_int32 code; /*pioctl() result */
+ afs_int32 code; /*pioctl() result */
char *parentDirP; /*Ptr to parent */
char *componentP; /*Ptr to last component */
{
static char gpbuf[BUFSIZ];
/* read a password from stdin, stop on \n or eof */
- register int i, tc;
+ int i, tc;
memset(gpbuf, 0, sizeof(gpbuf));
for (i = 0; i < (sizeof(gpbuf) - 1); i++) {
tc = fgetc(stdin);
#ifdef USS_KAUTH_DB
static char rn[] = "uss_kauth:InitThisModule";
#endif
- register afs_int32 code;
+ afs_int32 code;
char prompt[2 * MAXKTCNAMELEN + 20];
char *reasonString, longPassBuff[1024], shortPassBuff[9];
struct ktc_encryptionKey key;
#ifdef USS_KAUTH_DB
static char rn[] = "uss_kauth_DelUser"; /*Routine name */
#endif
- register afs_int32 code; /*Return code */
+ afs_int32 code; /*Return code */
if (uss_SkipKaserver) {
/*
#ifdef USS_KAUTH_DB
static char rn[] = "uss_kauth_CheckUserName"; /*Routine name */
#endif
- register afs_int32 code; /*Return code */
+ afs_int32 code; /*Return code */
if (uss_SkipKaserver) {
/*
Copy(char *a_from, char *a_to, int a_mode)
{ /*Copy */
- register int fd1, fd2;
+ int fd1, fd2;
char buf[BUFSIZ];
int cnt, rc;
Echo(char *a_s, char *a_f, int a_mode)
{ /*Echo */
- register int fd;
+ int fd;
umask(0);
fd = open(a_f, O_EXCL | O_CREAT | O_WRONLY, a_mode);
#ifdef USS_PTSERVER_DB
static char rn[] = "uss_ptserver:InitThisModule"; /*Routine name */
#endif
- register afs_int32 code; /*Return code */
+ afs_int32 code; /*Return code */
/*
* Only once, guys.
#ifdef USS_PTSERVER_DB
static char rn[] = "uss_ptserver_XlateUser"; /*Routine name */
#endif
- register afs_int32 code; /*Various return codes */
+ afs_int32 code; /*Various return codes */
if (uss_verbose)
fprintf(stderr, "Translating user '%s' via the Protection DB\n",
#ifdef USS_VOL_DB
static char rn[] = "uss_vol:InitThisModule";
#endif
- register afs_int32 code; /*Return code */
+ afs_int32 code; /*Return code */
struct afsconf_dir *tdir; /*Ptr to conf dir info */
struct afsconf_cell info; /*Info about chosen cell */
afs_int32 scIndex; /*Chosen security index */
uss_vol_GetServer(char *a_name)
{ /*uss_vol_GetServer */
- register struct hostent *th;
+ struct hostent *th;
afs_int32 addr;
afs_int32 b1, b2, b3, b4;
- register afs_int32 code;
+ afs_int32 code;
code = sscanf(a_name, "%d.%d.%d.%d", &b1, &b2, &b3, &b4);
if (code == 4) {
uss_vol_GetPartitionID(char *a_name)
{ /*uss_vol_GetPartitionID */
- register char tc;
+ char tc;
char ascii[3];
tc = *a_name;
#ifdef USS_VOL_DB
static char rn[] = "uss_vol_DeleteVol"; /*Routine name */
#endif
- register afs_int32 code = 0; /*Return code */
+ afs_int32 code = 0; /*Return code */
/*
* Make sure we've initialized our VLDB connection(s) before
ovlentry_to_nvlentry(struct vldbentry *oentryp,
struct nvldbentry *nentryp)
{
- register int i;
+ int i;
memset(nentryp, 0, sizeof(struct nvldbentry));
strncpy(nentryp->name, oentryp->name, sizeof(nentryp->name));
#ifdef USS_VOL_DB
static char rn[] = "uss_vol_GetVolInfoFromMountPoint";
#endif
- register afs_int32 code; /*Return code */
+ afs_int32 code; /*Return code */
uss_VolumeStatus_t *statusP; /*Ptr to returned status */
afs_int32 volID; /*Volume ID */
struct nvldbentry vldbEntry; /*VLDB entry for volume */
extern int afs_krb_exclusion(char *name);
extern int afs_is_foreign_ticket_name(char *tname, char *tinst, char * tcell, char *localrealm);
/* hostparse.c */
-extern struct hostent *hostutil_GetHostByName(register char *ahost);
+extern struct hostent *hostutil_GetHostByName(char *ahost);
extern char *hostutil_GetNameByINet(afs_uint32 addr);
extern afs_uint32 extractAddr(char *line, int maxSize);
extern char *afs_inet_ntoa_r(afs_uint32 addr, char *buf);
/* ktime.c */
extern char *ktime_DateOf(afs_int32 atime);
-extern afs_int32 ktime_Str2int32(register char *astr);
-extern int ktime_ParsePeriodic(char *adate, register struct ktime *ak);
-extern int ktime_DisplayString(struct ktime *aparm, register char *astring);
+extern afs_int32 ktime_Str2int32(char *astr);
+extern int ktime_ParsePeriodic(char *adate, struct ktime *ak);
+extern int ktime_DisplayString(struct ktime *aparm, char *astring);
extern afs_int32 ktime_next(struct ktime *aktime, afs_int32 afrom);
extern afs_int32 ktime_DateToInt32(char *adate, afs_int32 * aint32);
extern char *ktime_GetDateUsage(void);
extern char *volutil_PartitionName_r(int avalue, char *tbuffer, int buflen);
extern afs_int32 volutil_PartitionName2_r(afs_int32 part, char *tbuffer, size_t buflen);
extern char *volutil_PartitionName(int avalue);
-extern afs_int32 util_GetInt32(register char *as, afs_int32 * aval);
-extern afs_uint32 util_GetUInt32(register char *as, afs_uint32 * aval);
+extern afs_int32 util_GetInt32(char *as, afs_int32 * aval);
+extern afs_uint32 util_GetUInt32(char *as, afs_uint32 * aval);
extern afs_int32 util_GetInt64(char *as, afs_int64 * aval);
extern afs_uint32 util_GetUInt64(char *as, afs_uint64 * aval);
-extern afs_int32 util_GetHumanInt32(register char *as, afs_int32 * aval);
+extern afs_int32 util_GetHumanInt32(char *as, afs_int32 * aval);
/* winsock_nt.c */
/* also parse a.b.c.d addresses */
struct hostent *
-hostutil_GetHostByName(register char *ahost)
+hostutil_GetHostByName(char *ahost)
{
- register int tc;
+ int tc;
static struct hostent thostent;
static char *addrp[2];
static char addr[4];
- register char *ptr = ahost;
+ char *ptr = ahost;
afs_uint32 tval, numeric = 0;
int dots = 0;
#ifdef undef
static
LocalFreeTokens(alist)
- register struct token *alist;
+ struct token *alist;
{
- register struct token *nlist;
+ struct token *nlist;
for (; alist; alist = nlist) {
nlist = alist->next;
free(alist->key);
LocalParseLine(char *aline, struct token **alist)
{
char tbuffer[256];
- register char *tptr = NULL;
+ char *tptr = NULL;
int inToken;
struct token *first, *last;
- register struct token *ttok;
- register int tc;
+ struct token *ttok;
+ int tc;
inToken = 0; /* not copying token chars at start */
first = NULL;
ktime_DateOf(afs_int32 atime)
{
static char tbuffer[30];
- register char *tp;
+ char *tp;
time_t t = atime;
tp = ctime(&t);
if (tp) {
*/
static int
-ParseTime(register struct ktime *ak, register char *astr)
+ParseTime(struct ktime *ak, char *astr)
{
int field;
afs_int32 temp;
- register char *tp;
- register int tc;
+ char *tp;
+ int tc;
field = 0; /* 0=hour, 1=min, 2=sec */
temp = 0;
}
afs_int32
-ktime_Str2int32(register char *astr)
+ktime_Str2int32(char *astr)
{
struct ktime tk;
/* -1 means error, 0 means now, otherwise returns time of next event */
int
-ktime_ParsePeriodic(char *adate, register struct ktime *ak)
+ktime_ParsePeriodic(char *adate, struct ktime *ak)
{
struct token *tt;
- register afs_int32 code;
+ afs_int32 code;
struct ptemp *tp;
memset(ak, 0, sizeof(*ak));
* 0 - astring contains ktime string.
*/
int
-ktime_DisplayString(struct ktime *aparm, register char *astring)
+ktime_DisplayString(struct ktime *aparm, char *astring)
{
char tempString[50];
/* compare date in both formats, and return as in strcmp */
#ifdef undef
static int
-KTimeCmp(register struct ktime *aktime, register struct tm *atm)
+KTimeCmp(struct ktime *aktime, struct tm *atm)
{
- register afs_int32 tmask;
+ afs_int32 tmask;
/* don't compare day of the week, since we can't tell the
* order in a cyclical set. Caller must check for equality, if
/* compare date in both formats, and return as in strcmp */
static int
-KDateCmp(register struct ktime_date *akdate, register struct tm *atm)
+KDateCmp(struct ktime_date *akdate, struct tm *atm)
{
if (akdate->year > atm->tm_year)
return 1;
afs_int32
ktime_InterpretDate(struct ktime_date * akdate)
{
- register afs_uint32 tresult;
- register afs_uint32 tbit;
+ afs_uint32 tresult;
+ afs_uint32 tbit;
time_t temp;
- register struct tm *tsp;
+ struct tm *tsp;
if (akdate->mask & KTIMEDATE_NOW)
return time(0);
char *
re_comp(const char *sp)
{
- register int c;
- register char *ep = expbuf;
+ int c;
+ char *ep = expbuf;
int cclcnt, numbra = 0;
char *lastep = 0;
char bracket[NBRA];
static int
cclass(char *set, char c, int af)
{
- register int n;
+ int n;
if (c == 0)
return (0);
static int
backref(int i, char *lp)
{
- register char *bp;
+ char *bp;
bp = braslist[i];
while (*bp++ == *lp++)
static int
advance(char *lp, char *ep)
{
- register char *curlp;
+ char *curlp;
int ct, i;
int rv;
int
re_exec(const char *p1)
{
- register char *p2 = expbuf;
- register int c;
+ char *p2 = expbuf;
+ int c;
int rv;
for (c = 0; c < NBRA; c++) {
/* Hack to unfold code for multiple devices */
#define rmt (*rmtp)
-#define devhack(dev) register struct remote *rmtp = &remote[minor(dev)]
+#define devhack(dev) struct remote *rmtp = &remote[minor(dev)]
/* Flags for rmt.rt_flags */
#define RT_RBUF 1 /* processing venus read request */
size_t
strlcat(char *dst, const char *src, size_t siz)
{
- register char *d = dst;
- register const char *s = src;
- register size_t n = siz;
+ char *d = dst;
+ const char *s = src;
+ size_t n = siz;
size_t dlen;
/* Find the end of dst and adjust bytes left but don't go past end */
size_t
strlcpy(char *dst, const char *src, size_t siz)
{
- register char *d = dst;
- register const char *s = src;
- register size_t n = siz;
+ char *d = dst;
+ const char *s = src;
+ size_t n = siz;
/* Copy as many bytes as will fit */
if (n != 0 && --n != 0) {
afs_int32
volutil_GetPartitionID(char *aname)
{
- register char tc;
+ char tc;
afs_int32 temp;
char ascii[3];
volutil_PartitionName2_r(afs_int32 part, char *tbuffer, size_t buflen)
{
char tempString[3];
- register int i;
+ int i;
if (part < 0 || part >= VOLMAXPARTS) {
return -2;
/* is this a digit or a digit-like thing? */
static int
-ismeta(register int ac, register int abase)
+ismeta(int ac, int abase)
{
/* if (ac == '-' || ac == 'x' || ac == 'X') return 1; */
if (ac >= '0' && ac <= '7')
/* given that this is a digit or a digit-like thing, compute its value */
static int
-getmeta(register int ac)
+getmeta(int ac)
{
if (ac >= '0' && ac <= '9')
return ac - '0';
}
afs_int32
-util_GetInt32(register char *as, afs_int32 * aval)
+util_GetInt32(char *as, afs_int32 * aval)
{
- register afs_int32 total;
- register int tc;
+ afs_int32 total;
+ int tc;
int base;
int negative;
}
afs_uint32
-util_GetUInt32(register char *as, afs_uint32 * aval)
+util_GetUInt32(char *as, afs_uint32 * aval)
{
- register afs_uint32 total;
- register int tc;
+ afs_uint32 total;
+ int tc;
int base;
total = 0; /* initialize things */
};
afs_int32
-util_GetHumanInt32(register char *as, afs_int32 * aval)
+util_GetHumanInt32(char *as, afs_int32 * aval)
{
long value;
char * unit;
static int
MyBeforeProc(struct cmd_syndesc *as, void *arock)
{
- register char *tcell = NULL;
+ char *tcell = NULL;
char confdir[200];
struct afsconf_dir *tdir;
struct afsconf_cell info;
struct rx_connection *serverconns[MAXSERVERS];
- register afs_int32 code, i;
- register afs_int32 sauth;
+ afs_int32 code, i;
+ afs_int32 sauth;
sprintf(confdir, "%s", AFSDIR_CLIENT_ETC_DIRPATH);
/* setup to talk to servers */
}
static int
-IsLocked(register struct AFSDBLockDesc *alock)
+IsLocked(struct AFSDBLockDesc *alock)
{
if (alock->waitStates || alock->exclLocked || alock->numWaiting
|| alock->readersReading)
}
static int
-PrintLock(register struct AFSDBLockDesc *alock)
+PrintLock(struct AFSDBLockDesc *alock)
{
printf("(");
if (alock->waitStates) {
}
static int
-PrintLocks(register struct rx_connection *aconn, int aint32)
+PrintLocks(struct rx_connection *aconn, int aint32)
{
- register int i;
+ int i;
struct AFSDBLock lock;
afs_int32 code;
static int
PrintCacheEntries32(struct rx_connection *aconn, int aint32)
{
- register int i;
- register afs_int32 code;
+ int i;
+ afs_int32 code;
struct AFSDBCacheEntry centry;
char *cellname;
static int
PrintCacheEntries64(struct rx_connection *aconn, int aint32)
{
- register int i;
- register afs_int32 code;
+ int i;
+ afs_int32 code;
struct AFSDBCacheEntry64 centry;
char *cellname;
static int
PrintCacheEntries(struct rx_connection *aconn, int aint32)
{
- register afs_int32 code;
+ afs_int32 code;
struct AFSDBCacheEntry64 centry64;
code = RXAFSCB_GetCE64(aconn, 0, ¢ry64);
CommandProc(struct cmd_syndesc *as, void *arock)
{
struct rx_connection *conn;
- register char *hostName;
- register struct hostent *thp;
+ char *hostName;
+ struct hostent *thp;
afs_int32 port;
struct rx_securityClass *secobj;
int int32p;
int
main(int argc, char **argv)
{
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
#ifdef AFS_AIX32_ENV
/*
static PrintCacheEntries(struct rx_connection *aconn, int aint32)
{
- register int i;
- register afs_int32 code, addr, inode, flags, time;
+ int i;
+ afs_int32 code, addr, inode, flags, time;
char *fileName;
for(i=0;i<100000;i++) {
CommandProc(struct cmd_syndesc *as, void *arock)
{
struct rx_connection *conn;
- register char *hostName;
- register struct hostent *thp;
+ char *hostName;
+ struct hostent *thp;
afs_int32 port;
struct rx_securityClass *secobj;
int int32p;
main(argc, argv)
int argc;
char **argv; {
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
#ifdef AFS_AIX32_ENV
/*
int icl_CreateSetWithFlags(char *name, struct afs_icl_log *baseLogp,
struct afs_icl_log *fatalLogp, afs_uint32 flags,
struct afs_icl_set **outSetpp);
-int icl_LogHold(register struct afs_icl_log *logp);
-int icl_LogUse(register struct afs_icl_log *logp);
-int icl_LogReleNL(register struct afs_icl_log *logp);
-int icl_LogRele(register struct afs_icl_log *logp);
-int icl_ZeroLog(register struct afs_icl_log *logp);
-int icl_LogFreeUse(register struct afs_icl_log *logp);
+int icl_LogHold(struct afs_icl_log *logp);
+int icl_LogUse(struct afs_icl_log *logp);
+int icl_LogReleNL(struct afs_icl_log *logp);
+int icl_LogRele(struct afs_icl_log *logp);
+int icl_ZeroLog(struct afs_icl_log *logp);
+int icl_LogFreeUse(struct afs_icl_log *logp);
#define BUFFER_MULTIPLIER 1024
static int
CheckTypes(char *bufferp, int *typesp, int typeCount, char *outMsgBuffer)
{
- register char tc;
+ char tc;
int inPercent;
int tix;
static int
CheckTypes(char *bufferp, int *typesp, int typeCount)
{
- register char tc;
+ char tc;
int inPercent;
int tix;
#define uint64_t long long
#endif
static void
-DisplayRecord(FILE *outFilep, register afs_int32 *alp, afs_int32 rsize)
+DisplayRecord(FILE *outFilep, afs_int32 *alp, afs_int32 rsize)
{
char msgBuffer[1024];
#if defined(AFS_SGI61_ENV) || (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL))
struct afs_icl_log *fatalLogp, afs_uint32 flags,
struct afs_icl_set **outSetpp)
{
- register struct afs_icl_set *setp;
- register int i;
+ struct afs_icl_set *setp;
+ int i;
afs_int32 states = ICL_DEFAULT_SET_STATES;
if (!icl_inited)
/* hold and release event sets */
int
-icl_SetHold(register struct afs_icl_set *setp)
+icl_SetHold(struct afs_icl_set *setp)
{
setp->refCount++;
return 0;
/* free a set. Called with icl_lock locked */
int
-icl_ZapSet(register struct afs_icl_set *setp)
+icl_ZapSet(struct afs_icl_set *setp)
{
- register struct afs_icl_set **lpp, *tp;
+ struct afs_icl_set **lpp, *tp;
int i;
- register struct afs_icl_log *tlp;
+ struct afs_icl_log *tlp;
for (lpp = &icl_allSets, tp = *lpp; tp; lpp = &tp->nextp, tp = *lpp) {
if (tp == setp) {
/* do the release, watching for deleted entries */
int
-icl_SetRele(register struct afs_icl_set *setp)
+icl_SetRele(struct afs_icl_set *setp)
{
if (--setp->refCount == 0 && (setp->states & ICL_SETF_DELETED)) {
icl_ZapSet(setp); /* destroys setp's lock! */
/* free a set entry, dropping its reference count */
int
-icl_SetFree(register struct afs_icl_set *setp)
+icl_SetFree(struct afs_icl_set *setp)
{
setp->states |= ICL_SETF_DELETED;
icl_SetRele(setp);
struct afs_icl_set *
icl_FindSet(char *name)
{
- register struct afs_icl_set *tp;
+ struct afs_icl_set *tp;
for (tp = icl_allSets; tp; tp = tp->nextp) {
if (strcmp(tp->name, name) == 0) {
int
icl_ZeroSet(struct afs_icl_set *setp)
{
- register int i;
+ int i;
int code = 0;
int tcode;
struct afs_icl_log *logp;
icl_EnumerateSets(int (*aproc) (char *, void *, struct afs_icl_set *),
void *arock)
{
- register struct afs_icl_set *tp, *np;
- register afs_int32 code;
+ struct afs_icl_set *tp, *np;
+ afs_int32 code;
code = 0;
for (tp = icl_allSets; tp; tp = np) {
int
icl_AddLogToSet(struct afs_icl_set *setp, struct afs_icl_log *newlogp)
{
- register int i;
+ int i;
int code = -1;
for (i = 0; i < ICL_LOGSPERSET; i++) {
/* hold and release logs */
int
-icl_LogHold(register struct afs_icl_log *logp)
+icl_LogHold(struct afs_icl_log *logp)
{
logp->refCount++;
return 0;
/* hold and release logs, called with lock already held */
int
-icl_LogHoldNL(register struct afs_icl_log *logp)
+icl_LogHoldNL(struct afs_icl_log *logp)
{
logp->refCount++;
return 0;
/* keep track of how many sets believe the log itself is allocated */
int
-icl_LogUse(register struct afs_icl_log *logp)
+icl_LogUse(struct afs_icl_log *logp)
{
if (logp->setCount == 0) {
/* this is the first set actually using the log -- allocate it */
/* decrement the number of real users of the log, free if possible */
int
-icl_LogFreeUse(register struct afs_icl_log *logp)
+icl_LogFreeUse(struct afs_icl_log *logp)
{
if (--logp->setCount == 0) {
/* no more users -- free it (but keep log structure around) */
/* set the size of the log to 'logSize' */
int
-icl_LogSetSize(register struct afs_icl_log *logp, afs_int32 logSize)
+icl_LogSetSize(struct afs_icl_log *logp, afs_int32 logSize)
{
if (!logp->datap) {
/* nothing to worry about since it's not allocated */
/* free a log. Called with icl_lock locked. */
int
-icl_ZapLog(register struct afs_icl_log *logp)
+icl_ZapLog(struct afs_icl_log *logp)
{
- register struct afs_icl_log **lpp, *tp;
+ struct afs_icl_log **lpp, *tp;
for (lpp = &afs_icl_allLogs, tp = *lpp; tp; lpp = &tp->nextp, tp = *lpp) {
if (tp == logp) {
/* do the release, watching for deleted entries */
int
-icl_LogRele(register struct afs_icl_log *logp)
+icl_LogRele(struct afs_icl_log *logp)
{
if (--logp->refCount == 0 && (logp->states & ICL_LOGF_DELETED)) {
icl_ZapLog(logp); /* destroys logp's lock! */
/* do the release, watching for deleted entries, log already held */
int
-icl_LogReleNL(register struct afs_icl_log *logp)
+icl_LogReleNL(struct afs_icl_log *logp)
{
if (--logp->refCount == 0 && (logp->states & ICL_LOGF_DELETED)) {
icl_ZapLog(logp); /* destroys logp's lock! */
/* zero out the log */
int
-icl_ZeroLog(register struct afs_icl_log *logp)
+icl_ZeroLog(struct afs_icl_log *logp)
{
logp->firstUsed = logp->firstFree = 0;
logp->logElements = 0;
/* free a log entry, and drop its reference count */
int
-icl_LogFree(register struct afs_icl_log *logp)
+icl_LogFree(struct afs_icl_log *logp)
{
logp->states |= ICL_LOGF_DELETED;
icl_LogRele(logp);
(char *name, void *arock, struct afs_icl_log * tp),
void *arock)
{
- register struct afs_icl_log *tp;
- register afs_int32 code;
+ struct afs_icl_log *tp;
+ afs_int32 code;
code = 0;
for (tp = afs_icl_allLogs; tp; tp = tp->nextp) {
}
static int
-DoShowLog(register struct cmd_syndesc *as, void *arock)
+DoShowLog(struct cmd_syndesc *as, void *arock)
{
afs_int32 retVal = 0;
afs_int32 code = 0;
}
static int
-DoShowSet(register struct cmd_syndesc *as, void *arock)
+DoShowSet(struct cmd_syndesc *as, void *arock)
{
afs_int32 retVal = 0;
afs_int32 code = 0;
}
static int
-DoClear(register struct cmd_syndesc *as, void *arock)
+DoClear(struct cmd_syndesc *as, void *arock)
{
afs_int32 retVal = 0;
afs_int32 code = 0;
}
static int
-DoSet(register struct cmd_syndesc *as, void *arock)
+DoSet(struct cmd_syndesc *as, void *arock)
{
afs_int32 retVal = 0;
afs_int32 code = 0;
}
static int
-DoResize(register struct cmd_syndesc *as, void *arock)
+DoResize(struct cmd_syndesc *as, void *arock)
{
afs_int32 retVal = 0;
afs_int32 code = 0;
#ifndef AFS_KDUMP_LIB
static int
-cmdproc(register struct cmd_syndesc *as, void *arock)
+cmdproc(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code = 0;
+ afs_int32 code = 0;
#if !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
if (as->parms[0].items) { /* -kobj */
int
main(int argc, char **argv)
{
- register struct cmd_syndesc *ts;
- register afs_int32 code;
+ struct cmd_syndesc *ts;
+ afs_int32 code;
#ifdef AFS_AIX32_ENV
struct sigaction nsa;
int
Knlist(struct afs_nlist *sp, int cnt, int size)
{
- register int code;
+ int code;
if (UserLevel)
code = nlist(obj, sp);
struct callo Co, *Coe = &Co, *Cop;
struct tos To, *Toe = &To, *tos;
struct trb Trb, *Trbe = &Trb, *trb;
- register int i = 0;
+ int i = 0;
printf("\n\nPrinting callout table info...\n\n");
{
struct timeval tv[2];
struct stat tstat;
- register long code;
- register char *pn; /* path name we're dealing with */
+ long code;
+ char *pn; /* path name we're dealing with */
if (argc != 2) {
printf
int
main(int argc, char **argv)
{
- register afs_int32 code;
- register struct cmd_syndesc *ts;
+ afs_int32 code;
+ struct cmd_syndesc *ts;
#ifdef AFS_AIX32_ENV
/*
int WhatFidCmd_FileParm;
int WhatFidCmd_FollowLinkParm;
int
-WhatFidCmd(register struct cmd_syndesc *as, void *arock)
+WhatFidCmd(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
struct ViceIoctl blob;
struct VenusFid vFid;
- register struct cmd_item *ti;
+ struct cmd_item *ti;
struct VolumeStatus *status;
char *name;
int follow = 1;
int argc;
char **argv;
{
- register afs_int32 code;
- register struct cmd_syndesc *ts;
+ afs_int32 code;
+ struct cmd_syndesc *ts;
#ifdef AFS_AIX32_ENV
/*
struct inodesc *parentino;
ino_t inumber;
{
- register struct dinode *dp;
+ struct dinode *dp;
struct inodesc curino;
memset(&curino, 0, sizeof(struct inodesc));
}
dirscan(idesc)
- register struct inodesc *idesc;
+ struct inodesc *idesc;
{
- register struct direct *dp;
- register struct bufarea *bp;
+ struct direct *dp;
+ struct bufarea *bp;
int dsize, n;
long blksiz;
char dbuf[DIRBLKSIZ];
*/
struct direct *
fsck_readdir(idesc)
- register struct inodesc *idesc;
+ struct inodesc *idesc;
{
- register struct direct *dp, *ndp;
- register struct bufarea *bp;
+ struct direct *dp, *ndp;
+ struct bufarea *bp;
long size, blksiz;
blksiz = idesc->id_numfrags * sblock.fs_fsize;
*/
dircheck(idesc, dp)
struct inodesc *idesc;
- register struct direct *dp;
+ struct direct *dp;
{
- register int size;
- register char *cp;
+ int size;
+ char *cp;
int spaceleft;
size = DIRSIZ(dp);
ino_t ino;
char *errmesg;
{
- register struct dinode *dp;
+ struct dinode *dp;
pwarn("%s ", errmesg);
pinode(ino);
}
adjust(idesc, lcnt)
- register struct inodesc *idesc;
+ struct inodesc *idesc;
short lcnt;
{
- register struct dinode *dp;
+ struct dinode *dp;
dp = ginode(idesc->id_number);
if (dp->di_nlink == lcnt) {
mkentry(idesc)
struct inodesc *idesc;
{
- register struct direct *dirp = idesc->id_dirp;
+ struct direct *dirp = idesc->id_dirp;
struct direct newent;
int newlen, oldlen;
chgino(idesc)
struct inodesc *idesc;
{
- register struct direct *dirp = idesc->id_dirp;
+ struct direct *dirp = idesc->id_dirp;
if (memcmp(dirp->d_name, idesc->id_name, (int)dirp->d_namlen + 1))
return (KEEPON);
ino_t orphan;
ino_t parentdir;
{
- register struct dinode *dp;
+ struct dinode *dp;
int lostdir, len;
ino_t oldlfdir;
struct inodesc idesc;
* Attempt to expand the size of a directory
*/
expanddir(dp)
- register struct dinode *dp;
+ struct dinode *dp;
{
daddr_t lastbn, newblk;
- register struct bufarea *bp;
+ struct bufarea *bp;
char *cp, firstblk[DIRBLKSIZ];
lastbn = lblkno(&sblock, dp->di_size);
ino_t ino;
char *cp;
struct dinode *dp;
- register struct bufarea *bp;
+ struct bufarea *bp;
ino = allocino(request, IFDIR | mode);
dirhead.dot_ino = ino;
char *bufp;
ino_t ino;
{
- register ino_t in;
- register char *cp;
+ ino_t in;
+ char *cp;
int namlen;
cp = bufp + 2;
ckinode(dp, idesc)
struct dinode *dp;
- register struct inodesc *idesc;
+ struct inodesc *idesc;
{
- register daddr_t *ap;
+ daddr_t *ap;
long ret, n, ndb, offset;
struct dinode dino;
UOFF_T indir_data_blks;
iblock(idesc, ilevel, isize)
struct inodesc *idesc;
- register long ilevel;
+ long ilevel;
UOFF_T isize;
{
- register daddr_t *ap;
- register daddr_t *aplim;
+ daddr_t *ap;
+ daddr_t *aplim;
int i, n, (*func) ();
UOFF_T sizepb;
OFF_T nif;
- register struct bufarea *bp;
+ struct bufarea *bp;
char buf[BUFSIZ];
extern int dirscan(), pass1check();
daddr_t blk;
int cnt;
{
- register int c;
+ int c;
if ((unsigned)(blk + cnt) > maxfsblock)
return (1);
#ifdef AFS_SUN5_ENVX
inocleanup()
{
- register struct inoinfo **inpp;
+ struct inoinfo **inpp;
if (inphead == NULL)
return;
}
clri(idesc, type, flag)
- register struct inodesc *idesc;
+ struct inodesc *idesc;
char *type;
int flag;
{
- register struct dinode *dp;
+ struct dinode *dp;
#if defined(ACLS) && defined(AFS_HPUX_ENV)
struct inodesc cidesc;
#endif /* ACLS */
findname(idesc)
struct inodesc *idesc;
{
- register struct direct *dirp = idesc->id_dirp;
+ struct direct *dirp = idesc->id_dirp;
if (dirp->d_ino != idesc->id_parent)
return (KEEPON);
findino(idesc)
struct inodesc *idesc;
{
- register struct direct *dirp = idesc->id_dirp;
+ struct direct *dirp = idesc->id_dirp;
if (dirp->d_ino == 0)
return (KEEPON);
pinode(ino)
ino_t ino;
{
- register struct dinode *dp;
- register char *p;
+ struct dinode *dp;
+ char *p;
struct passwd *pw;
char *ctime();
time_t t;
ino_t request;
int type;
{
- register ino_t ino;
- register struct dinode *dp;
+ ino_t ino;
+ struct dinode *dp;
if (request == 0)
request = ROOTINO;
struct fstab *fsp;
int pid, passno, sumstatus;
char *name;
- register struct disk *dk, *nextdisk;
- register struct part *pt;
+ struct disk *dk, *nextdisk;
+ struct part *pt;
extern char *AFSVersion; /* generated version */
#ifdef AFS_SUN5_ENV
int other_than_ufs = 0;
finddisk(name)
char *name;
{
- register struct disk *dk, **dkp;
- register char *p;
+ struct disk *dk, **dkp;
+ char *p;
int len;
for (p = name + strlen(name) - 1; p >= name; --p)
char *name, *fsname;
{
struct disk *dk = finddisk(name);
- register struct part *pt, **ppt = &dk->part;
+ struct part *pt, **ppt = &dk->part;
for (pt = dk->part; pt; ppt = &pt->next, pt = pt->next)
if (strcmp(pt->name, name) == 0) {
}
startdisk(dk)
- register struct disk *dk;
+ struct disk *dk;
{
nrun++;
pass1()
{
- register int c, i, j;
- register struct dinode *dp;
+ int c, i, j;
+ struct dinode *dp;
struct zlncnt *zlnp;
int ndb, cgd;
struct inodesc idesc;
}
pass1check(idesc)
- register struct inodesc *idesc;
+ struct inodesc *idesc;
{
int res = KEEPON;
int anyout, nfrags;
daddr_t blkno = idesc->id_blkno;
- register struct dups *dlp;
+ struct dups *dlp;
struct dups *new;
if ((anyout = chkrange(blkno, idesc->id_numfrags)) != 0) {
pass1b()
{
- register int c, i;
- register struct dinode *dp;
+ int c, i;
+ struct dinode *dp;
struct inodesc idesc;
ino_t inumber;
}
pass1bcheck(idesc)
- register struct inodesc *idesc;
+ struct inodesc *idesc;
{
- register struct dups *dlp;
+ struct dups *dlp;
int nfrags, res = KEEPON;
daddr_t blkno = idesc->id_blkno;
pass2()
{
- register struct dinode *dp;
+ struct dinode *dp;
struct inodesc rootdesc;
memset(&rootdesc, 0, sizeof(struct inodesc));
pass2check(idesc)
struct inodesc *idesc;
{
- register struct direct *dirp = idesc->id_dirp;
+ struct direct *dirp = idesc->id_dirp;
char *curpathloc;
int n, entrysize, ret = 0;
struct dinode *dp;
pass3()
{
- register struct dinode *dp;
+ struct dinode *dp;
struct inodesc idesc;
ino_t inumber, orphan;
int loopcnt;
pass4()
{
- register ino_t inumber;
- register struct zlncnt *zlnp;
+ ino_t inumber;
+ struct zlncnt *zlnp;
struct inodesc idesc;
int n;
#if defined(ACLS) && defined(AFS_HPUX_ENV)
- register struct dinode *dp;
+ struct dinode *dp;
#endif /* ACLS */
}
pass4check(idesc)
- register struct inodesc *idesc;
+ struct inodesc *idesc;
{
- register struct dups *dlp;
+ struct dups *dlp;
int nfrags, res = KEEPON;
daddr_t blkno = idesc->id_blkno;
pass5()
{
int c, blk, frags, basesize, sumsize, mapsize, savednrpos;
- register struct fs *fs = &sblock;
- register struct cg *cg = &cgrp;
+ struct fs *fs = &sblock;
+ struct cg *cg = &cgrp;
daddr_t dbase, dmax;
- register daddr_t d;
- register long i, j;
+ daddr_t d;
+ long i, j;
struct csum *cs;
time_t now;
struct csum cstotal;
int postype;
#ifdef AFS_NEWCG_ENV
- register struct cg *newcg = (struct cg *)buf;
+ struct cg *newcg = (struct cg *)buf;
struct ocg *ocg = (struct ocg *)buf;
#else /* AFS_NEWCG_ENV */
/* don't bother with newcg format yet, most systems don't support it */
- register struct cg *newcg = (struct cg *)buf;
+ struct cg *newcg = (struct cg *)buf;
struct cg *ocg = (struct cg *)buf;
#endif /* AFS_NEWCG_ENV */
/* returns true if sbdirty should be called */
sbfine(fs)
- register struct fs *fs;
+ struct fs *fs;
{
int rcode;
rcode = 0;
calcsb(dev, devfd, fs)
char *dev;
int devfd;
- register struct fs *fs;
+ struct fs *fs;
{
return 0;
}
dev_t devno;
{
struct pst_swapinfo pst[PS_BURST];
- register struct pst_swapinfo *psp = &pst[0];
+ struct pst_swapinfo *psp = &pst[0];
int idx = 0, count, match = 0;
while ((count = PSTAT(psp, PS_BURST, idx) != 0)) {
FILE *fp;
char *loc;
{
- register n;
- register char *p, *lastloc;
+ int n;
+ char *p, *lastloc;
p = loc;
lastloc = &p[maxlen - 1];
int cnt;
{
int inblk;
- register int field, subfield;
- register int siz, pos;
+ int field, subfield;
+ int siz, pos;
inblk = (int)(fragtbl[fs->fs_frag][fragmap]) << 1;
fragmap <<= 1;
*/
scanc(size, cp, table, mask)
u_int size;
- register u_char *cp, table[];
- register u_char mask;
+ u_char *cp, table[];
+ u_char mask;
{
- register u_char *end = &cp[size];
+ u_char *end = &cp[size];
while (cp < end && (table[*cp] & mask) == 0)
cp++;
#if !defined(vax) && !defined(tahoe)
skpc(mask, size, cp)
- register u_char mask;
+ u_char mask;
u_int size;
- register u_char *cp;
+ u_char *cp;
{
- register u_char *end = &cp[size];
+ u_char *end = &cp[size];
while (cp < end && *cp == mask)
cp++;
}
locc(mask, size, cp)
- register u_char mask;
+ u_char mask;
u_int size;
- register u_char *cp;
+ u_char *cp;
{
- register u_char *end = &cp[size];
+ u_char *end = &cp[size];
while (cp < end && *cp != mask)
cp++;
*/
bufinit()
{
- register struct bufarea *bp;
+ struct bufarea *bp;
long bufcnt, i;
char *bufp;
daddr_t blkno;
long size;
{
- register struct bufarea *bp;
+ struct bufarea *bp;
for (bp = bufhead.b_next; bp != &bufhead; bp = bp->b_next)
if (bp->b_bno == fsbtodb(&sblock, blkno))
struct bufarea *
getblk(bp, blk, size)
- register struct bufarea *bp;
+ struct bufarea *bp;
daddr_t blk;
long size;
{
flush(fd, bp)
int fd;
- register struct bufarea *bp;
+ struct bufarea *bp;
{
- register int i, j;
+ int i, j;
caddr_t sip;
long size;
ckfini()
{
- register struct bufarea *bp, *nbp;
+ struct bufarea *bp, *nbp;
int cnt = 0;
flush(fswritefd, &sblk);
allocblk(frags)
long frags;
{
- register int i, j, k;
+ int i, j, k;
if (frags <= 0 || frags > sblock.fs_frag)
return (0);
ino_t curdir, ino;
{
int len;
- register char *cp;
+ char *cp;
struct inodesc idesc;
extern int findname();
* determine whether an inode should be fixed.
*/
dofix(idesc, msg)
- register struct inodesc *idesc;
+ struct inodesc *idesc;
char *msg;
{
#ifdef AFS_SUN52_ENV
char *
hasvfsopt(vfs, opt)
- register struct vfstab *vfs;
- register char *opt;
+ struct vfstab *vfs;
+ char *opt;
{
char *f, *opts;
static char *tmpopts;
#include <afs/afsutil.h>
#include <afs/dir.h>
-extern void SetDirHandle(register DirHandle * dir, register Vnode * vnode);
+extern void SetDirHandle(DirHandle * dir, Vnode * vnode);
extern void FidZap(DirHandle * file);
extern void FidZero(DirHandle * file);
extern int HTs, HTBlocks;
afs_int32 FetchData_RXStyle(Volume * volptr, Vnode * targetptr,
- register struct rx_call *Call, afs_sfsize_t Pos,
+ struct rx_call *Call, afs_sfsize_t Pos,
afs_sfsize_t Len, afs_int32 Int64Mode,
#if FS_STATS_DETAILED
afs_sfsize_t * a_bytesToFetchP,
afs_int32 StoreData_RXStyle(Volume * volptr, Vnode * targetptr,
struct AFSFid *Fid, struct client *client,
- register struct rx_call *Call, afs_fsize_t Pos,
+ struct rx_call *Call, afs_fsize_t Pos,
afs_fsize_t Length, afs_fsize_t FileLength,
int sync,
#if FS_STATS_DETAILED
afs_int32
SpareComp(Volume * avolp)
{
- register afs_int32 temp;
+ afs_int32 temp;
FS_LOCK;
if (PctSpare) {
* the Cache Manager knows that the volume must be purged from the stat cache.
*/
static void
-SetVolumeSync(register struct AFSVolSync *async, register Volume * avol)
+SetVolumeSync(struct AFSVolSync *async, Volume * avol)
{
FS_LOCK;
/* date volume instance was created */
* Call returns rx connection in passed in *tconn
*/
static int
-CallPreamble(register struct rx_call *acall, int activecall,
+CallPreamble(struct rx_call *acall, int activecall,
struct rx_connection **tconn, struct host **ahostp)
{
struct host *thost;
static afs_int32
-CallPostamble(register struct rx_connection *aconn, afs_int32 ret,
+CallPostamble(struct rx_connection *aconn, afs_int32 ret,
struct host *ahost)
{
struct host *thost;
} /*PutVolumePackage */
static int
-VolumeOwner(register struct client *client, register Vnode * targetptr)
+VolumeOwner(struct client *client, Vnode * targetptr)
{
afs_int32 owner = V_owner(targetptr->volumePtr); /* get volume owner */
Inode ino, nearInode;
ssize_t rdlen;
ssize_t wrlen;
- register afs_fsize_t size;
+ afs_fsize_t size;
size_t length;
char *buff;
int rc; /* return code */
static afs_int32
-FileNameOK(register char *aname)
+FileNameOK(char *aname)
{
- register afs_int32 i, tc;
+ afs_int32 i, tc;
i = strlen(aname);
if (i >= 4) {
/* watch for @sys on the right */
static int afs_buffersAlloced = 0;
static
-FreeSendBuffer(register struct afs_buffer *adata)
+FreeSendBuffer(struct afs_buffer *adata)
{
FS_LOCK;
afs_buffersAlloced--;
static char *
AllocSendBuffer()
{
- register struct afs_buffer *tp;
+ struct afs_buffer *tp;
FS_LOCK;
afs_buffersAlloced++;
struct AFSBulkStats * OutStats, struct AFSCBs * CallBacks,
struct AFSVolSync * Sync)
{
- register int i;
+ int i;
afs_int32 nfiles;
Vnode *targetptr = 0; /* pointer to vnode to fetch */
Vnode *parentwhentargetnotdir = 0; /* parent vnode if targetptr is a file */
Volume *volptr = 0; /* pointer to the volume */
struct client *client = 0; /* pointer to the client data */
afs_int32 rights, anyrights; /* rights for this and any user */
- register struct AFSFid *tfid; /* file id we're dealing with now */
+ struct AFSFid *tfid; /* file id we're dealing with now */
struct rx_connection *tcon = rx_ConnectionOf(acall);
struct host *thost;
struct client *t_client = NULL; /* tmp pointer to the client data */
struct AFSBulkStats * OutStats,
struct AFSCBs * CallBacks, struct AFSVolSync * Sync)
{
- register int i;
+ int i;
afs_int32 nfiles;
Vnode *targetptr = 0; /* pointer to vnode to fetch */
Vnode *parentwhentargetnotdir = 0; /* parent vnode if targetptr is a file */
Volume *volptr = 0; /* pointer to the volume */
struct client *client = 0; /* pointer to the client data */
afs_int32 rights, anyrights; /* rights for this and any user */
- register struct AFSFid *tfid; /* file id we're dealing with now */
+ struct AFSFid *tfid; /* file id we're dealing with now */
struct rx_connection *tcon;
struct host *thost;
struct client *t_client = NULL; /* tmp ptr to client data */
afs_int32 * a_timeP, AFS_CollData * a_dataP)
{ /*SRXAFS_GetXStats */
- register int code; /*Return value */
+ int code; /*Return value */
afs_int32 *dataBuffP; /*Ptr to data to be returned */
afs_int32 dataBytes; /*Bytes in data buffer */
#if FS_STATS_DETAILED
struct AFSCBs *CallBackArray)
{
afs_int32 errorCode = 0;
- register int i;
+ int i;
struct client *client = 0;
struct rx_connection *tcon;
struct host *thost;
errorCode = GetClient(tcon, &client);
if (!errorCode) {
for (i = 0; i < FidArray->AFSCBFids_len; i++) {
- register struct AFSFid *fid = &(FidArray->AFSCBFids_val[i]);
+ struct AFSFid *fid = &(FidArray->AFSCBFids_val[i]);
DeleteCallBack(client->host, fid);
}
PutClient(&client);
/* worthless hack to let CS keep running ancient software */
static int
-afs_vtoi(register char *aname)
+afs_vtoi(char *aname)
{
- register afs_int32 temp;
- register int tc;
+ afs_int32 temp;
+ int tc;
temp = 0;
while ((tc = *aname++)) {
* or backup volumes by name or #
*/
static afs_int32
-CopyVolumeEntry(char *aname, register struct vldbentry *ave,
- register struct VolumeInfo *av)
+CopyVolumeEntry(char *aname, struct vldbentry *ave,
+ struct VolumeInfo *av)
{
- register int i, j, vol;
+ int i, j, vol;
afs_int32 mask, whichType;
afs_uint32 *serverHost, *typePtr;
static afs_int32 lastDownTime = 0;
struct vldbentry tve;
struct rx_securityClass *vlSec;
- register afs_int32 code;
+ afs_int32 code;
if (!vlConn) {
vlSec = rxnull_NewClientSecurityObject();
afs_int32
FetchData_RXStyle(Volume * volptr, Vnode * targetptr,
- register struct rx_call * Call, afs_sfsize_t Pos,
+ struct rx_call * Call, afs_sfsize_t Pos,
afs_sfsize_t Len, afs_int32 Int64Mode,
#if FS_STATS_DETAILED
afs_sfsize_t * a_bytesToFetchP,
IHandle_t *ihP;
FdHandle_t *fdP;
#ifdef AFS_NT40_ENV
- register char *tbuffer;
+ char *tbuffer;
#else /* AFS_NT40_ENV */
struct iovec tiov[RX_MAXIOVECS];
int tnio;
*/
afs_int32
StoreData_RXStyle(Volume * volptr, Vnode * targetptr, struct AFSFid * Fid,
- struct client * client, register struct rx_call * Call,
+ struct client * client, struct rx_call * Call,
afs_fsize_t Pos, afs_fsize_t Length, afs_fsize_t FileLength,
int sync,
#if FS_STATS_DETAILED
struct timeval StartTime, StopTime; /* Used to measure how long the store takes */
Error errorCode = 0; /* Returned error code to caller */
#ifdef AFS_NT40_ENV
- register char *tbuffer; /* data copying buffer */
+ char *tbuffer; /* data copying buffer */
#else /* AFS_NT40_ENV */
struct iovec tiov[RX_MAXIOVECS]; /* no data copying with iovec */
int tnio; /* temp for iovec size */
};
/* Prototypes for static routines */
-static struct FileEntry *FindFE(register AFSFid * fid);
+static struct FileEntry *FindFE(AFSFid * fid);
#ifndef INTERPRET_DUMP
-static struct CallBack *iGetCB(register int *nused);
-static int iFreeCB(register struct CallBack *cb, register int *nused);
-static struct FileEntry *iGetFE(register int *nused);
-static int iFreeFE(register struct FileEntry *fe, register int *nused);
-static int TAdd(register struct CallBack *cb, register afs_uint32 * thead);
-static int TDel(register struct CallBack *cb);
-static int HAdd(register struct CallBack *cb, register struct host *host);
-static int HDel(register struct CallBack *cb);
+static struct CallBack *iGetCB(int *nused);
+static int iFreeCB(struct CallBack *cb, int *nused);
+static struct FileEntry *iGetFE(int *nused);
+static int iFreeFE(struct FileEntry *fe, int *nused);
+static int TAdd(struct CallBack *cb, afs_uint32 * thead);
+static int TDel(struct CallBack *cb);
+static int HAdd(struct CallBack *cb, struct host *host);
+static int HDel(struct CallBack *cb);
static int CDel(struct CallBack *cb, int deletefe);
-static int CDelPtr(register struct FileEntry *fe, register afs_uint32 * cbp,
+static int CDelPtr(struct FileEntry *fe, afs_uint32 * cbp,
int deletefe);
static afs_uint32 *FindCBPtr(struct FileEntry *fe, struct host *host);
-static int FDel(register struct FileEntry *fe);
+static int FDel(struct FileEntry *fe);
static int AddCallBack1_r(struct host *host, AFSFid * fid, afs_uint32 * thead,
int type, int locked);
static void MultiBreakCallBack_r(struct cbstruct cba[], int ncbas,
/* Other protos - move out sometime */
-void PrintCB(register struct CallBack *cb, afs_uint32 now);
+void PrintCB(struct CallBack *cb, afs_uint32 now);
static afs_uint32 HashTable[FEHASH_SIZE]; /* File entry hash table */
static struct FileEntry *
-FindFE(register AFSFid * fid)
+FindFE(AFSFid * fid)
{
int hash;
- register int fei;
- register struct FileEntry *fe;
+ int fei;
+ struct FileEntry *fe;
hash = FEHash(fid->Volume, fid->Unique);
for (fei = HashTable[hash]; fei; fei = fe->fnext) {
#ifndef INTERPRET_DUMP
static struct CallBack *
-iGetCB(register int *nused)
+iGetCB(int *nused)
{
- register struct CallBack *ret;
+ struct CallBack *ret;
if ((ret = CBfree)) {
CBfree = (struct CallBack *)(((struct object *)ret)->next);
}
static int
-iFreeCB(register struct CallBack *cb, register int *nused)
+iFreeCB(struct CallBack *cb, int *nused)
{
((struct object *)cb)->next = (struct object *)CBfree;
CBfree = cb;
}
static struct FileEntry *
-iGetFE(register int *nused)
+iGetFE(int *nused)
{
- register struct FileEntry *ret;
+ struct FileEntry *ret;
if ((ret = FEfree)) {
FEfree = (struct FileEntry *)(((struct object *)ret)->next);
}
static int
-iFreeFE(register struct FileEntry *fe, register int *nused)
+iFreeFE(struct FileEntry *fe, int *nused)
{
((struct object *)fe)->next = (struct object *)FEfree;
FEfree = fe;
/* Add cb to end of specified timeout list */
static int
-TAdd(register struct CallBack *cb, register afs_uint32 * thead)
+TAdd(struct CallBack *cb, afs_uint32 * thead)
{
if (!*thead) {
(*thead) = cb->tnext = cb->tprev = cbtoi(cb);
} else {
- register struct CallBack *thp = itocb(*thead);
+ struct CallBack *thp = itocb(*thead);
cb->tprev = thp->tprev;
cb->tnext = *thead;
/* Delete call back entry from timeout list */
static int
-TDel(register struct CallBack *cb)
+TDel(struct CallBack *cb)
{
- register afs_uint32 *thead = itot(cb->thead);
+ afs_uint32 *thead = itot(cb->thead);
if (*thead == cbtoi(cb))
*thead = (*thead == cb->tnext ? 0 : cb->tnext);
/* Add cb to end of specified host list */
static int
-HAdd(register struct CallBack *cb, register struct host *host)
+HAdd(struct CallBack *cb, struct host *host)
{
cb->hhead = h_htoi(host);
if (!host->cblist) {
host->cblist = cb->hnext = cb->hprev = cbtoi(cb);
} else {
- register struct CallBack *fcb = itocb(host->cblist);
+ struct CallBack *fcb = itocb(host->cblist);
cb->hprev = fcb->hprev;
cb->hnext = cbtoi(fcb);
/* Delete call back entry from host list */
static int
-HDel(register struct CallBack *cb)
+HDel(struct CallBack *cb)
{
- register afs_uint32 *hhead = &h_itoh(cb->hhead)->cblist;
+ afs_uint32 *hhead = &h_itoh(cb->hhead)->cblist;
if (*hhead == cbtoi(cb))
*hhead = (*hhead == cb->hnext ? 0 : cb->hnext);
{
int cbi = cbtoi(cb);
struct FileEntry *fe = itofe(cb->fhead);
- register afs_uint32 *cbp;
- register int safety;
+ afs_uint32 *cbp;
+ int safety;
for (safety = 0, cbp = &fe->firstcb; *cbp && *cbp != cbi;
cbp = &itocb(*cbp)->cnext, safety++) {
static int Ccdelpt = 0, CcdelB = 0;
static int
-CDelPtr(register struct FileEntry *fe, register afs_uint32 * cbp,
+CDelPtr(struct FileEntry *fe, afs_uint32 * cbp,
int deletefe)
{
- register struct CallBack *cb;
+ struct CallBack *cb;
if (!*cbp)
return 0;
static afs_uint32 *
FindCBPtr(struct FileEntry *fe, struct host *host)
{
- register afs_uint32 hostindex = h_htoi(host);
- register struct CallBack *cb;
- register afs_uint32 *cbp;
- register int safety;
+ afs_uint32 hostindex = h_htoi(host);
+ struct CallBack *cb;
+ afs_uint32 *cbp;
+ int safety;
for (safety = 0, cbp = &fe->firstcb; *cbp; cbp = &cb->cnext, safety++) {
if (safety > cbstuff.nblks) {
/* Delete file entry from hash table */
static int
-FDel(register struct FileEntry *fe)
+FDel(struct FileEntry *fe)
{
- register int fei = fetoi(fe);
- register afs_uint32 *p = &HashTable[FEHash(fe->volid, fe->unique)];
+ int fei = fetoi(fe);
+ afs_uint32 *p = &HashTable[FEHash(fe->volid, fe->unique)];
while (*p && *p != fei)
p = &itofe(*p)->fnext;
XCallBackBulk_r(struct host * ahost, struct AFSFid * fids, afs_int32 nfids)
{
struct AFSCallBack tcbs[AFSCBMAX];
- register int i;
+ int i;
struct AFSCBFids tf;
struct AFSCBs tc;
int code;
host->Console &= ~2;
if (!fe) {
- register afs_uint32 hash;
+ afs_uint32 hash;
fe = newfe;
newfe = NULL;
int
DeleteCallBack(struct host *host, AFSFid * fid)
{
- register struct FileEntry *fe;
- register afs_uint32 *pcb;
+ struct FileEntry *fe;
+ afs_uint32 *pcb;
char hoststr[16];
H_LOCK;
int
DeleteFileCallBacks(AFSFid * fid)
{
- register struct FileEntry *fe;
- register struct CallBack *cb;
- register afs_uint32 cbi;
- register int n;
+ struct FileEntry *fe;
+ struct CallBack *cb;
+ afs_uint32 cbi;
+ int n;
H_LOCK;
cbstuff.DeleteFiles++;
int
DeleteAllCallBacks_r(struct host *host, int deletefe)
{
- register struct CallBack *cb;
- register int cbi, first;
+ struct CallBack *cb;
+ int cbi, first;
cbstuff.DeleteAllCallBacks++;
cbi = first = host->cblist;
cb = itocb(cbi);
cbi = cb->hnext;
if (cb->status == CB_DELAYED) {
- register struct FileEntry *fe = itofe(cb->fhead);
+ struct FileEntry *fe = itofe(cb->fhead);
thead[nfids] = cb->thead;
fids[nfids].Volume = fe->volid;
fids[nfids].Vnode = fe->vnode;
for (hash = 0; hash < FEHASH_SIZE; hash++) {
for (feip = &HashTable[hash]; (fe = itofe(*feip)) != NULL; ) {
if (fe->volid == volume) {
- register struct CallBack *cbnext;
+ struct CallBack *cbnext;
for (cb = itocb(fe->firstcb); cb; cb = cbnext) {
host = h_itoh(cb->hhead);
host->hostFlags |= HFE_LATER;
/* loop over FEs from myfe and free/break */
tthead = 0;
for (fe = myfe; fe;) {
- register struct CallBack *cbnext;
+ struct CallBack *cbnext;
for (cb = itocb(fe->firstcb); cb; cb = cbnext) {
cbnext = itocb(cb->cnext);
host = h_itoh(cb->hhead);
CleanupTimedOutCallBacks_r(void)
{
afs_uint32 now = CBtime(FT_ApproxTime());
- register afs_uint32 *thead;
- register struct CallBack *cb;
- register int ntimedout = 0;
+ afs_uint32 *thead;
+ struct CallBack *cb;
+ int ntimedout = 0;
char hoststr[16];
while (tfirst <= now) {
- register int cbi;
+ int cbi;
cbi = *(thead = THead(tfirst));
if (cbi) {
do {
* theory not give these to us anyway, but be paranoid.
*/
static int
-lih0_r(register struct host *host, register int flags, void *rock)
+lih0_r(struct host *host, int flags, void *rock)
{
struct lih_params *params = (struct lih_params *)rock;
/* same as lih0_r, except we do not prevent held hosts from being selected. */
static int
-lih1_r(register struct host *host, register int flags, void *rock)
+lih1_r(struct host *host, int flags, void *rock)
{
struct lih_params *params = (struct lih_params *)rock;
cb_stateSaveFEs(struct fs_dump_state * state)
{
int ret = 0;
- register int fei, hash;
- register struct FileEntry *fe;
+ int fei, hash;
+ struct FileEntry *fe;
AssignInt64(state->eof_offset, &state->cb_hdr->fe_offset);
struct iovec * iov, int niovecs)
{
int ret = 0, idx;
- register struct CallBack * cb;
+ struct CallBack * cb;
struct CBDiskEntry * cbdsk;
afs_uint32 fei;
{
int err = 0, cbi = 0, stats = 0, noptions = 0, all = 0, vol = 0, raw = 0;
static AFSFid fid;
- register struct FileEntry *fe;
- register struct CallBack *cb;
+ struct FileEntry *fe;
+ struct CallBack *cb;
time_t now;
int timebits = 32;
}
void
-PrintCB(register struct CallBack *cb, afs_uint32 now)
+PrintCB(struct CallBack *cb, afs_uint32 now)
{
struct FileEntry *fe = itofe(cb->fhead);
time_t expires = TIndexToTime(cb->thead);
{
char **av = argv;
struct sockaddr_in host;
- register afs_int32 code;
+ afs_int32 code;
struct hostent *hp;
char *hostname;
char hnamebuf[200];
printf("fs> ");
if (fgets(line, 499, stdin) != NULL) {
char *oper;
- register char **argp = args;
+ char **argp = args;
GetArgs(line, argp, &nargs);
oper = &argp[0][0];
++argp, --nargs;
void
-GetArgs(register char *line, register char **args, register int *nargs)
+GetArgs(char *line, char **args, int *nargs)
{
*nargs = 0;
while (*line) {
- register char *last = line;
+ char *last = line;
while (*line == ' ')
line++;
if (*last == ' ')
static afs_int32
-FetchProc(register struct rx_call *acall)
+FetchProc(struct rx_call *acall)
{
extern char *malloc();
- register char *tbuffer;
+ char *tbuffer;
afs_int32 tlen, length, code;
code = rx_Read(acall, &length, sizeof(afs_int32));
static afs_int32
-StoreProc(register struct rx_call *acall, char *string, int length)
+StoreProc(struct rx_call *acall, char *string, int length)
{
afs_int32 tlen, code;
static afs_int32
-FetchDir(register struct rx_call *acall)
+FetchDir(struct rx_call *acall)
{
extern char *malloc();
- register char *tbuffer;
+ char *tbuffer;
afs_int32 tlen, length, code;
struct dirent *dp;
struct client entry[CESPERBLOCK];
};
-void h_TossStuff_r(register struct host *host);
+void h_TossStuff_r(struct host *host);
/*
* Make sure the subnet macros have been defined.
static void
GetCEBlock(void)
{
- register struct CEBlock *block;
- register int i;
+ struct CEBlock *block;
+ int i;
block = (struct CEBlock *)malloc(sizeof(struct CEBlock));
if (!block) {
static struct client *
GetCE(void)
{
- register struct client *entry;
+ struct client *entry;
if (CEFree == 0)
GetCEBlock();
/* return an entry to the free list */
static void
-FreeCE(register struct client *entry)
+FreeCE(struct client *entry)
{
entry->VenusEpoch = 0;
entry->sid = 0;
static void
GetHTBlock(void)
{
- register struct HTBlock *block;
- register int i;
+ struct HTBlock *block;
+ int i;
static int index = 0;
if (HTBlocks == h_MAXHOSTTABLES) {
static struct host *
GetHT(void)
{
- register struct host *entry;
+ struct host *entry;
if (HTFree == NULL)
GetHTBlock();
/* return an entry to the free list */
static void
-FreeHT(register struct host *entry)
+FreeHT(struct host *entry)
{
entry->next = HTFree;
HTFree = entry;
hpr_GetHostCPS(afs_int32 host, prlist *CPS)
{
#ifdef AFS_PTHREAD_ENV
- register afs_int32 code;
+ afs_int32 code;
afs_int32 over;
struct ubik_client *uclient =
(struct ubik_client *)pthread_getspecific(viced_uclient_key);
hpr_NameToId(namelist *names, idlist *ids)
{
#ifdef AFS_PTHREAD_ENV
- register afs_int32 code;
- register afs_int32 i;
+ afs_int32 code;
+ afs_int32 i;
struct ubik_client *uclient =
(struct ubik_client *)pthread_getspecific(viced_uclient_key);
hpr_IdToName(idlist *ids, namelist *names)
{
#ifdef AFS_PTHREAD_ENV
- register afs_int32 code;
+ afs_int32 code;
struct ubik_client *uclient =
(struct ubik_client *)pthread_getspecific(viced_uclient_key);
hpr_GetCPS(afs_int32 id, prlist *CPS)
{
#ifdef AFS_PTHREAD_ENV
- register afs_int32 code;
+ afs_int32 code;
afs_int32 over;
struct ubik_client *uclient =
(struct ubik_client *)pthread_getspecific(viced_uclient_key);
static short consolePort = 0;
int
-h_Lock_r(register struct host *host)
+h_Lock_r(struct host *host)
{
H_UNLOCK;
h_Lock(host);
*/
int
-h_NBLock_r(register struct host *host)
+h_NBLock_r(struct host *host)
{
struct Lock *hostLock = &host->lock;
int locked = 0;
/* Assumptions: called with held host */
void
-h_gethostcps_r(register struct host *host, register afs_int32 now)
+h_gethostcps_r(struct host *host, afs_int32 now)
{
- register int code;
+ int code;
int slept = 0;
/* wait if somebody else is already doing the getCPS call */
/* args in net byte order */
void
-h_flushhostcps(register afs_uint32 hostaddr, register afs_uint16 hport)
+h_flushhostcps(afs_uint32 hostaddr, afs_uint16 hport)
{
struct host *host;
#define DEF_ROPCONS 2115
struct host *
-h_Alloc_r(register struct rx_connection *r_con)
+h_Alloc_r(struct rx_connection *r_con)
{
struct servent *serverentry;
struct host *host;
* or host->clientDeleted must be set.
*/
void
-h_TossStuff_r(register struct host *host)
+h_TossStuff_r(struct host *host)
{
- register struct client **cp, *client;
+ struct client **cp, *client;
int code;
/* make sure host doesn't go away over h_NBLock_r */
host->hostFlags &= ~CLIENTDELETED;
if (host->hostFlags & HOSTDELETED) {
- register struct rx_connection *rxconn;
+ struct rx_connection *rxconn;
struct AddrPort hostAddrPort;
int i;
void
h_Enumerate(int (*proc) (struct host*, int, void *), void *param)
{
- register struct host *host, **list;
- register int *flags;
- register int i, count;
+ struct host *host, **list;
+ int *flags;
+ int i, count;
int totalCount;
H_LOCK;
h_Enumerate_r(int (*proc) (struct host *, int, void *),
struct host *enumstart, void *param)
{
- register struct host *host, *next;
+ struct host *host, *next;
int flags = 0;
int nflags = 0;
int count;
h_DeleteHostFromUuidHashTable_r(struct host *host)
{
int index;
- register struct h_UuidHashChain **uhp, *uth;
+ struct h_UuidHashChain **uhp, *uth;
char uuid1[128];
char hoststr[16];
struct client *
h_ID2Client(afs_int32 vid)
{
- register struct client *client;
- register struct host *host;
+ struct client *client;
+ struct host *host;
int count;
H_LOCK;
struct client *
h_FindClient_r(struct rx_connection *tcon)
{
- register struct client *client;
+ struct client *client;
struct host *host = NULL;
struct client *oldClient;
afs_int32 viceid = 0;
int
GetClient(struct rx_connection *tcon, struct client **cp)
{
- register struct client *client;
+ struct client *client;
char hoststr[16];
H_LOCK;
static int
-h_PrintClient(register struct host *host, int flags, void *rock)
+h_PrintClient(struct host *host, int flags, void *rock)
{
StreamHandle_t *file = (StreamHandle_t *)rock;
- register struct client *client;
+ struct client *client;
int i;
char tmpStr[256];
char tbuffer[32];
static int
-h_DumpHost(register struct host *host, int flags, void *rock)
+h_DumpHost(struct host *host, int flags, void *rock)
{
StreamHandle_t *file = (StreamHandle_t *)rock;
void
h_GetWorkStats(int *nump, int *activep, int *delp, afs_int32 cutofftime)
{
- register struct host *host;
- register int num = 0, active = 0, del = 0;
+ struct host *host;
+ int num = 0, active = 0, del = 0;
int count;
H_LOCK;
afs_int32 * a_diffSubnetP, afs_int32 * a_diffNetworkP)
{ /*h_GetHostNetStats */
- register struct host *hostP; /*Ptr to current host entry */
- register afs_uint32 currAddr_HBO; /*Curr host addr, host byte order */
+ struct host *hostP; /*Ptr to current host entry */
+ afs_uint32 currAddr_HBO; /*Curr host addr, host byte order */
int count;
/*
*/
#if 0
static int
-CheckHost(register struct host *host, int flags, void *rock)
+CheckHost(struct host *host, int flags, void *rock)
{
- register struct client *client;
+ struct client *client;
struct rx_connection *cb_conn = NULL;
int code;
#endif
int
-CheckHost_r(register struct host *host, int flags, void *dummy)
+CheckHost_r(struct host *host, int flags, void *dummy)
{
- register struct client *client;
+ struct client *client;
struct rx_connection *cb_conn = NULL;
int code;
struct host *host)
{
char hoststr[16];
- register struct h_AddrHashChain **hp, *th;
+ struct h_AddrHashChain **hp, *th;
if (addr == 0 && port == 0)
return 1;
/* N.B. h_UserName returns pointer to static data; also relatively expensive */
extern char *h_UserName(struct client *client);
#define h_Lock(host) ObtainWriteLock(&(host)->lock)
-extern int h_Lock_r(register struct host *host);
+extern int h_Lock_r(struct host *host);
#define h_Unlock(host) ReleaseWriteLock(&(host)->lock)
#define h_Unlock_r(host) ReleaseWriteLock(&(host)->lock)
extern void *ShutDown(void *);
extern void ShutDownAndCore(int dopanic);
-extern struct host *h_Alloc(register struct rx_connection *r_con);
-extern struct host *h_Alloc_r(register struct rx_connection *r_con);
+extern struct host *h_Alloc(struct rx_connection *r_con);
+extern struct host *h_Alloc_r(struct rx_connection *r_con);
extern int h_Lookup_r(afs_uint32 hostaddr, afs_uint16 hport,
struct host **hostp);
extern struct host *h_LookupUuid_r(afsUUID * uuidp);
extern struct host *h_GetHost_r(struct rx_connection *tcon);
extern struct client *h_FindClient_r(struct rx_connection *tcon);
extern int h_ReleaseClient_r(struct client *client);
-extern void h_TossStuff_r(register struct host *host);
+extern void h_TossStuff_r(struct host *host);
extern struct client *h_ID2Client(afs_int32 vid);
extern int GetClient(struct rx_connection *tcon, struct client **cp);
extern int PutClient(struct client **cp);
extern void h_PrintStats(void);
extern void h_PrintClients(void);
extern void h_GetWorkStats(int *, int *, int *, afs_int32);
-extern void h_flushhostcps(register afs_uint32 hostaddr,
- register afs_uint16 hport);
+extern void h_flushhostcps(afs_uint32 hostaddr,
+ afs_uint16 hport);
extern void h_GetHostNetStats(afs_int32 * a_numHostsP, afs_int32 * a_sameNetOrSubnetP,
afs_int32 * a_diffSubnetP, afs_int32 * a_diffNetworkP);
-extern int h_NBLock_r(register struct host *host);
+extern int h_NBLock_r(struct host *host);
extern void h_DumpHosts(void);
extern void h_InitHostPackage(void);
extern void h_CheckHosts(void );
void
-SetDirHandle(register DirHandle * dir, register Vnode * vnode)
+SetDirHandle(DirHandle * dir, Vnode * vnode)
{
- register Volume *vp = vnode->volumePtr;
- register IHandle_t *h;
+ Volume *vp = vnode->volumePtr;
+ IHandle_t *h;
IH_COPY(h, vnode->handle);
dir->dirh_ino = h->ih_ino;
dir->dirh_dev = h->ih_dev;
{
#ifndef AFS_NT40_ENV
struct afs_stat status;
- register int tsize = getdtablesize();
- register int i;
+ int tsize = getdtablesize();
+ int i;
for (i = 0; i < tsize; i++) {
if (afs_fstat(i, &status) != -1) {
printf("%d: dev %x, inode %u, length %u, type/mode %x\n", i,
NewParms(int initializing)
{
static struct afs_stat sbuf;
- register int i, fd;
+ int i, fd;
char *parms;
char *argv[MAXPARMS];
- register int argc;
+ int argc;
if (!(afs_stat("/vice/file/parms", &sbuf))) {
parms = (char *)malloc(sbuf.st_size);
static afs_int32
Do_VLRegisterRPC(void)
{
- register int code;
+ int code;
bulkaddrs addrs;
afs_uint32 FS_HostAddrs_HBO[ADDRSPERSITE];
int i = 0;
static char *
Parent(const char *apath)
{
- register char *tp;
+ char *tp;
strcpy(tspace, apath);
tp = strrchr(tspace, '/');
if (tp) {
int
main(int argc, char **argv)
{
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
afs_int32 code;
ts = cmd_CreateSyntax("initcmd", handleit, NULL, "optional");
Parent(apath)
char *apath;
{
- register char *tp;
+ char *tp;
strcpy(tspace, apath);
tp = strrchr(tspace, '/');
if (tp) {
/* this function returns TRUE (1) if the file is in AFS, otherwise false (0) */
static int
InAFS(apath)
- register char *apath;
+ char *apath;
{
struct ViceIoctl blob;
- register afs_int32 code;
+ afs_int32 code;
blob.in_size = 0;
blob.out_size = AFS_PIOCTL_MAXSIZE;
static int
-ListQuotaCmd(register struct cmd_syndesc *as, void *arock)
+ListQuotaCmd(struct cmd_syndesc *as, void *arock)
{
- register afs_int32 code;
+ afs_int32 code;
struct ViceIoctl blob;
- register struct cmd_item *ti;
+ struct cmd_item *ti;
struct VolumeStatus *status;
char *name;
int argc;
char **argv;
{
- register afs_int32 code;
+ afs_int32 code;
int old, new, rc;
short uvers;
char ubik[80]; /* space for some ubik header */
struct Vlent *
GetVolume(int vol, struct vldbentry *entry)
{
- register int i;
- register struct Vlent *vl;
+ int i;
+ struct Vlent *vl;
if (!vol)
return NULL;
afs_int32
GetServer(char *aname)
{
- register struct hostent *th;
+ struct hostent *th;
afs_uint32 addr;
int b1, b2, b3, b4;
- register afs_int32 code;
+ afs_int32 code;
code = sscanf(aname, "%d.%d.%d.%d", &b1, &b2, &b3, &b4);
if (code == 4) {
static int
handleit(struct cmd_syndesc *as, void *arock)
{
- register struct cmd_item *ti;
- register afs_int32 code, server = 0, sawserver = 0;
+ struct cmd_item *ti;
+ afs_int32 code, server = 0, sawserver = 0;
afs_int32 id, voltype;
struct vldbentry entry;
char *cellp = 0;
exit(0);
} else {
char *oper, *vname;
- register char **argp = args;
+ char **argp = args;
GetArgs(line, argp, &nargs);
oper = &argp[0][0];
int
main(int argc, char **argv)
{
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
afs_int32 code;
strcpy(confdir, AFSDIR_CLIENT_ETC_DIRPATH);
{
*nargs = 0;
while (*line) {
- register char *last = line;
+ char *last = line;
while (isspace(*line))
line++;
if (isspace(*last))
rxinfo(char * str, struct rx_call *rxcall)
{
int code;
- register struct rx_connection *tconn;
+ struct rx_connection *tconn;
char tname[64] = "";
char tinst[64] = "";
char tcell[64] = "";
static int
NameIsId(char *aname)
{
- register int tc;
+ int tc;
while ((tc = *aname++)) {
if (tc > '9' || tc < '0')
return 0;
vldstats *stats,
vital_vlheader *vital_header)
{
- register afs_int32 errorcode;
+ afs_int32 errorcode;
struct ubik_trans *trans;
char rxstr[AFS_RXINFO_LEN];
afs_int32 *nentries,
bulkaddrs *addrsp)
{
- register afs_int32 errorcode;
+ afs_int32 errorcode;
struct ubik_trans *trans;
int nservers, i;
afs_uint32 *taddrp;
afs_int32 *nentries,
bulkaddrs *addrsp)
{
- register afs_int32 errorcode, index = -1, offset;
+ afs_int32 errorcode, index = -1, offset;
struct ubik_trans *trans;
int nservers, i, j, base = 0;
struct extentaddr *exp = 0;
RemoveEntry(struct ubik_trans *trans, afs_int32 entryptr,
struct nvlentry *tentry)
{
- register int errorcode;
+ int errorcode;
if ((errorcode = UnthreadVLentry(trans, entryptr, tentry)))
return errorcode;
}
static int
-IpAddrToRelAddr(register afs_uint32 ipaddr, struct ubik_trans *atrans)
+IpAddrToRelAddr(afs_uint32 ipaddr, struct ubik_trans *atrans)
{
- register int i, j;
- register afs_int32 code, base, index;
+ int i, j;
+ afs_int32 code, base, index;
struct extentaddr *exp;
for (i = 0; i <= MAXSERVERID; i++) {
static void *
CheckSignal(void *unused)
{
- register int i, errorcode;
+ int i, errorcode;
struct ubik_trans *trans;
if ((errorcode =
int
main(int argc, char **argv)
{
- register afs_int32 code;
+ afs_int32 code;
afs_uint32 myHost;
struct rx_service *tservice;
struct rx_securityClass **securityClasses;
void *buffer, afs_int32 length);
extern afs_int32 vlentrywrite(struct ubik_trans *trans, afs_int32 offset,
void *buffer, afs_int32 length);
-extern int write_vital_vlheader(register struct ubik_trans *trans);
+extern int write_vital_vlheader(struct ubik_trans *trans);
extern afs_int32 readExtents(struct ubik_trans *trans);
extern afs_int32 CheckInit(struct ubik_trans *trans, int builddb);
-extern afs_int32 AllocBlock(register struct ubik_trans *trans,
+extern afs_int32 AllocBlock(struct ubik_trans *trans,
struct nvlentry *tentry);
extern afs_int32 FindExtentBlock(struct ubik_trans *trans, afsUUID *uuidp,
afs_int32 createit, afs_int32 hostslot,
/* Hashing algorithm based on the volume name; name's size is implicit (64 chars) and if changed it should be reflected here. */
afs_int32
-NameHash(register char *volumename)
+NameHash(char *volumename)
{
- register unsigned int hash;
- register int i;
+ unsigned int hash;
+ int i;
hash = 0;
for (i = strlen(volumename), volumename += i - 1; i--; volumename--)
struct vlentry oentry;
struct nvlentry nentry, *nep;
char *bufp;
- register afs_int32 i;
+ afs_int32 i;
if (length != sizeof(oentry))
return -1;
struct vlentry *oep, tentry;
struct nvlentry *nep, *nbufp;
char *bufp = (char *)&tentry;
- register afs_int32 i;
+ afs_int32 i;
if (length != sizeof(vlentry))
return -1;
/* Convenient write of small critical vldb header info to the database. */
int
-write_vital_vlheader(register struct ubik_trans *trans)
+write_vital_vlheader(struct ubik_trans *trans)
{
if (vlwrite
(trans, 0, (char *)&cheader.vital_header, sizeof(vital_vlheader)))
afs_int32
-GetExtentBlock(register struct ubik_trans *trans, register afs_int32 base)
+GetExtentBlock(struct ubik_trans *trans, afs_int32 base)
{
afs_int32 blockindex, code, error = 0;
afs_int32
-FindExtentBlock(register struct ubik_trans *trans, afsUUID *uuidp,
+FindExtentBlock(struct ubik_trans *trans, afsUUID *uuidp,
afs_int32 createit, afs_int32 hostslot,
struct extentaddr **expp, afs_int32 *basep)
{
afsUUID tuuid;
struct extentaddr *exp;
- register afs_int32 i, j, code, base, index, error = 0;
+ afs_int32 i, j, code, base, index, error = 0;
*expp = NULL;
*basep = 0;
/* Allocate a free block of storage for entry, returning address of a new
zeroed entry (or zero if something is wrong). */
afs_int32
-AllocBlock(register struct ubik_trans *trans, struct nvlentry *tentry)
+AllocBlock(struct ubik_trans *trans, struct nvlentry *tentry)
{
- register afs_int32 blockindex;
+ afs_int32 blockindex;
if (cheader.vital_header.freePtr) {
/* allocate this dude */
FindByID(struct ubik_trans *trans, afs_uint32 volid, afs_int32 voltype,
struct nvlentry *tentry, afs_int32 *error)
{
- register afs_int32 typeindex, hashindex, blockindex;
+ afs_int32 typeindex, hashindex, blockindex;
*error = 0;
hashindex = IDHash(volid);
FindByName(struct ubik_trans *trans, char *volname, struct nvlentry *tentry,
afs_int32 *error)
{
- register afs_int32 hashindex;
- register afs_int32 blockindex;
+ afs_int32 hashindex;
+ afs_int32 blockindex;
char tname[VL_MAXNAMELEN];
/* remove .backup or .readonly extensions for stupid backwards
int
HashNDump(struct ubik_trans *trans, int hashindex)
{
- register int i = 0;
- register int blockindex;
+ int i = 0;
+ int blockindex;
struct nvlentry tentry;
for (blockindex = ntohl(cheader.VolnameHash[hashindex]);
int
HashIdDump(struct ubik_trans *trans, int hashindex)
{
- register int i = 0;
- register int blockindex;
+ int i = 0;
+ int blockindex;
struct nvlentry tentry;
for (blockindex = ntohl(cheader.VolidHash[0][hashindex]);
UnthreadVLentry(struct ubik_trans *trans, afs_int32 blockindex,
struct nvlentry *aentry)
{
- register afs_int32 errorcode, typeindex;
+ afs_int32 errorcode, typeindex;
if (!index_OK(trans, blockindex))
return VL_BADINDEX;
HashVolname(struct ubik_trans *trans, afs_int32 blockindex,
struct nvlentry *aentry)
{
- register afs_int32 hashindex;
- register afs_int32 code;
+ afs_int32 hashindex;
+ afs_int32 code;
/* Insert into volname's hash linked list */
hashindex = NameHash(aentry->name);
UnhashVolname(struct ubik_trans *trans, afs_int32 blockindex,
struct nvlentry *aentry)
{
- register afs_int32 hashindex, nextblockindex, prevblockindex;
+ afs_int32 hashindex, nextblockindex, prevblockindex;
struct nvlentry tentry;
afs_int32 temp;
NextEntry(struct ubik_trans *trans, afs_int32 blockindex,
struct nvlentry *tentry, afs_int32 *remaining)
{
- register afs_int32 lastblockindex;
+ afs_int32 lastblockindex;
if (blockindex == 0) /* get first one */
blockindex = sizeof(cheader);
static int
ci_AddItem(struct clone_head *ah, Inode aino)
{
- register struct clone_items *ti;
+ struct clone_items *ti;
/* if no last elt (first call) or last item full, get a new one */
if ((!ah->last) || ah->last->nitems >= CLONE_MAXITEMS) {
int
ci_Apply(struct clone_head *ah, int (*aproc) (Inode, void *), void *arock)
{
- register struct clone_items *ti;
- register int i;
+ struct clone_items *ti;
+ int i;
for (ti = ah->first; ti; ti = ti->next) {
for (i = 0; i < ti->nitems; i++) {
int
ci_Destroy(struct clone_head *ah)
{
- register struct clone_items *ti, *ni;
+ struct clone_items *ti, *ni;
for (ti = ah->first; ti; ti = ni) {
ni = ti->next; /* guard against freeing */
static int
common_prolog(struct cmd_syndesc * as, struct state * state)
{
- register struct cmd_item *ti;
+ struct cmd_item *ti;
VolumePackageOptions opts;
#ifdef AFS_NT40_ENV
static int
common_volop_prolog(struct cmd_syndesc * as, struct state * state)
{
- register struct cmd_item *ti;
+ struct cmd_item *ti;
state->vop = (struct volop_state *) calloc(1, sizeof(struct volop_state));
assert(state->vop != NULL);
static int
vn_prolog(struct cmd_syndesc * as, struct state * state)
{
- register struct cmd_item *ti;
+ struct cmd_item *ti;
state->vop = (struct volop_state *) calloc(1, sizeof(struct volop_state));
assert(state->vop != NULL);
static void
InitHandler(void)
{
- register int i;
+ int i;
ObtainWriteLock(&FSYNC_handler_lock);
for (i = 0; i < MAXHANDLERS; i++) {
HandlerFD[i] = -1;
static void
CallHandler(fd_set * fdsetp)
{
- register int i;
+ int i;
ObtainReadLock(&FSYNC_handler_lock);
for (i = 0; i < MAXHANDLERS; i++) {
if (HandlerFD[i] >= 0 && FD_ISSET(HandlerFD[i], fdsetp)) {
static int
AddHandler(osi_socket afd, void (*aproc) (osi_socket))
{
- register int i;
+ int i;
ObtainWriteLock(&FSYNC_handler_lock);
for (i = 0; i < MAXHANDLERS; i++)
if (HandlerFD[i] == -1)
}
static int
-FindHandler(register osi_socket afd)
+FindHandler(osi_socket afd)
{
- register int i;
+ int i;
ObtainReadLock(&FSYNC_handler_lock);
for (i = 0; i < MAXHANDLERS; i++)
if (HandlerFD[i] == afd) {
}
static int
-FindHandler_r(register osi_socket afd)
+FindHandler_r(osi_socket afd)
{
- register int i;
+ int i;
for (i = 0; i < MAXHANDLERS; i++)
if (HandlerFD[i] == afd) {
return i;
}
static int
-RemoveHandler(register osi_socket afd)
+RemoveHandler(osi_socket afd)
{
ObtainWriteLock(&FSYNC_handler_lock);
HandlerFD[FindHandler_r(afd)] = -1;
static void
GetHandler(fd_set * fdsetp, int *maxfdp)
{
- register int i;
- register int maxfd = -1;
+ int i;
+ int maxfd = -1;
FD_ZERO(fdsetp);
ObtainReadLock(&FSYNC_handler_lock); /* just in case */
for (i = 0; i < MAXHANDLERS; i++)
goto out;
}
} else {
- register int bj, bk;
+ int bj, bk;
dptr = inodes;
for (bj = bk = 0; bj < bufsize; bj = bj + 512, bk++) {
if ((code = read(pfd, dptr, 512)) != 512) {
{
struct ilist **allInodes = (struct ilist **)arock;
struct ilist *ti;
- register afs_int32 i;
+ afs_int32 i;
#ifndef AFS_PTHREAD_ENV
IOMGR_Poll(); /* poll so we don't kill the RPC connection */
/* first process the partition containing this junk */
struct afs_stat tstat;
struct ilist *ti, *ni, *li=NULL;
- register afs_int32 code;
+ afs_int32 code;
int i, forceSal;
char wpath[100];
char *lastDevComp;
* (This function was grabbed from df.c)
*/
int
-getmount(register struct vmount **vmountpp)
+getmount(struct vmount **vmountpp)
{
int size;
- register struct vmount *vm;
+ struct vmount *vm;
int nmounts;
/* set initial size of mntctl buffer to a MAGIC NUMBER */
struct DiskPartition64 *
VGetPartition_r(char *name, int abortp)
{
- register struct DiskPartition64 *dp;
+ struct DiskPartition64 *dp;
#ifdef AFS_DEMAND_ATTACH_FS
dp = VLookupPartition_r(name);
#else /* AFS_DEMAND_ATTACH_FS */
#ifdef AFS_NT40_ENV
void
-VSetPartitionDiskUsage_r(register struct DiskPartition64 *dp)
+VSetPartitionDiskUsage_r(struct DiskPartition64 *dp)
{
ULARGE_INTEGER free_user, total, free_total;
int ufree, tot, tfree;
#else
void
-VSetPartitionDiskUsage_r(register struct DiskPartition64 *dp)
+VSetPartitionDiskUsage_r(struct DiskPartition64 *dp)
{
int bsize, code;
afs_int64 totalblks, free, used, availblks;
#endif /* AFS_NT40_ENV */
void
-VSetPartitionDiskUsage(register struct DiskPartition64 *dp)
+VSetPartitionDiskUsage(struct DiskPartition64 *dp)
{
VOL_LOCK;
VSetPartitionDiskUsage_r(dp);
void
VUnlockPartition_r(char *name)
{
- register struct DiskPartition64 *dp = VGetPartition_r(name, 0);
+ struct DiskPartition64 *dp = VGetPartition_r(name, 0);
OVERLAPPED lap;
if (!dp)
void
VLockPartition_r(char *name)
{
- register struct DiskPartition64 *dp = VGetPartition_r(name, 0);
+ struct DiskPartition64 *dp = VGetPartition_r(name, 0);
char *partitionName;
int retries, code;
struct timeval pausing;
void
VUnlockPartition_r(char *name)
{
- register struct DiskPartition64 *dp = VGetPartition_r(name, 0);
+ struct DiskPartition64 *dp = VGetPartition_r(name, 0);
if (!dp)
return; /* no partition, will fail later */
close(dp->lock_fd);
extern void VUnlockPartition_r(char *name);
extern void VResetDiskUsage(void);
extern void VResetDiskUsage_r(void);
-extern void VSetPartitionDiskUsage(register struct DiskPartition64 *dp);
-extern void VSetPartitionDiskUsage_r(register struct DiskPartition64 *dp);
+extern void VSetPartitionDiskUsage(struct DiskPartition64 *dp);
+extern void VSetPartitionDiskUsage_r(struct DiskPartition64 *dp);
extern char *VPartitionPath(struct DiskPartition64 *p);
extern void VAdjustDiskUsage(Error * ec, struct Volume *vp,
afs_sfsize_t blocks, afs_sfsize_t checkBlocks);
ObliterateRegion(Volume * avp, VnodeClass aclass, StreamHandle_t * afile,
afs_int32 * aoffset)
{
- register struct VnodeClassInfo *vcp;
+ struct VnodeClassInfo *vcp;
Inode inodes[MAXOBLITATONCE];
- register afs_int32 iindex, nscanned;
+ afs_int32 iindex, nscanned;
afs_int32 offset;
char buf[SIZEOF_LARGEDISKVNODE];
int hitEOF;
- register int i;
- register afs_int32 code;
- register struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
+ int i;
+ afs_int32 code;
+ struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
hitEOF = 0;
vcp = &VnodeClassInfo[aclass];
StreamHandle_t *ifile;
struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
afs_int32 offset;
- register afs_int32 code;
+ afs_int32 code;
FdHandle_t *fdP;
static int
handleit(struct cmd_syndesc *as, void *arock)
{
- register struct cmd_item *ti;
+ struct cmd_item *ti;
char pname[100], *temp;
afs_int32 seenpart = 0, seenvol = 0, vid = 0;
struct cmdline_rock *rock = (struct cmdline_rock *)arock;
static int
handleit(struct cmd_syndesc *as, void *arock)
{
- register struct cmd_item *ti;
+ struct cmd_item *ti;
char pname[100], *temp;
afs_int32 seenpart = 0, seenvol = 0, vid = 0;
ProgramType pt;
static void InitHandler(void);
static void CallHandler(fd_set * fdsetp);
static int AddHandler(osi_socket afd, void (*aproc) (int));
-static int FindHandler(register osi_socket afd);
-static int FindHandler_r(register osi_socket afd);
-static int RemoveHandler(register osi_socket afd);
+static int FindHandler(osi_socket afd);
+static int FindHandler_r(osi_socket afd);
+static int RemoveHandler(osi_socket afd);
static void GetHandler(fd_set * fdsetp, int *maxfdp);
static int AllocNode(struct SalvageQueueNode ** node);
static void
InitHandler(void)
{
- register int i;
+ int i;
ObtainWriteLock(&SALVSYNC_handler_lock);
for (i = 0; i < MAXHANDLERS; i++) {
HandlerFD[i] = -1;
static void
CallHandler(fd_set * fdsetp)
{
- register int i;
+ int i;
ObtainReadLock(&SALVSYNC_handler_lock);
for (i = 0; i < MAXHANDLERS; i++) {
if (HandlerFD[i] >= 0 && FD_ISSET(HandlerFD[i], fdsetp)) {
static int
AddHandler(osi_socket afd, void (*aproc) (int))
{
- register int i;
+ int i;
ObtainWriteLock(&SALVSYNC_handler_lock);
for (i = 0; i < MAXHANDLERS; i++)
if (HandlerFD[i] == -1)
}
static int
-FindHandler(register osi_socket afd)
+FindHandler(osi_socket afd)
{
- register int i;
+ int i;
ObtainReadLock(&SALVSYNC_handler_lock);
for (i = 0; i < MAXHANDLERS; i++)
if (HandlerFD[i] == afd) {
}
static int
-FindHandler_r(register osi_socket afd)
+FindHandler_r(osi_socket afd)
{
- register int i;
+ int i;
for (i = 0; i < MAXHANDLERS; i++)
if (HandlerFD[i] == afd) {
return i;
}
static int
-RemoveHandler(register osi_socket afd)
+RemoveHandler(osi_socket afd)
{
ObtainWriteLock(&SALVSYNC_handler_lock);
HandlerFD[FindHandler_r(afd)] = -1;
static void
GetHandler(fd_set * fdsetp, int *maxfdp)
{
- register int i;
- register int maxfd = -1;
+ int i;
+ int maxfd = -1;
FD_ZERO(fdsetp);
ObtainReadLock(&SALVSYNC_handler_lock); /* just in case */
for (i = 0; i < MAXHANDLERS; i++)
ader */
static
ComputeUsedPages(dhp)
- register struct DirHeader *dhp;
+ struct DirHeader *dhp;
{
- register afs_int32 usedPages, i;
+ afs_int32 usedPages, i;
if (dhp->header.pgcount != 0) {
/* new style */
void
VNLog(afs_int32 aop, afs_int32 anparms, ... )
{
- register afs_int32 temp;
+ afs_int32 temp;
va_list ap;
va_start(ap, anparms);
* @internal volume package internal use only
*/
void
-DeleteFromVVnList(register Vnode * vnp)
+DeleteFromVVnList(Vnode * vnp)
{
Vn_volume(vnp) = NULL;
* @internal vnode package internal use only
*/
void
-VInvalidateVnode_r(register struct Vnode *avnode)
+VInvalidateVnode_r(struct Vnode *avnode)
{
avnode->changed_newTime = 0; /* don't let it get flushed out again */
avnode->changed_oldTime = 0;
VInitVnodes(VnodeClass class, int nVnodes)
{
byte *va;
- register struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
+ struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
vcp->allocs = vcp->gets = vcp->reads = vcp->writes = 0;
vcp->cacheSize = nVnodes;
Vnode *
VGetFreeVnode_r(struct VnodeClassInfo * vcp)
{
- register Vnode *vnp;
+ Vnode *vnp;
vnp = vcp->lruHead->lruPrev;
#ifdef AFS_DEMAND_ATTACH_FS
Vnode *
VAllocVnode_r(Error * ec, Volume * vp, VnodeType type)
{
- register Vnode *vnp;
+ Vnode *vnp;
VnodeId vnodeNumber;
int bitNumber;
- register struct VnodeClassInfo *vcp;
+ struct VnodeClassInfo *vcp;
VnodeClass class;
Unique unique;
#ifdef AFS_DEMAND_ATTACH_FS
Vnode *
VGetVnode_r(Error * ec, Volume * vp, VnodeId vnodeNumber, int locktype)
{ /* READ_LOCK or WRITE_LOCK, as defined in lock.h */
- register Vnode *vnp;
+ Vnode *vnp;
VnodeClass class;
struct VnodeClassInfo *vcp;
/* This variable is bogus--when it's set to 0, the hash chains fill
up with multiple versions of the same vnode. Should fix this!! */
void
-VPutVnode(Error * ec, register Vnode * vnp)
+VPutVnode(Error * ec, Vnode * vnp)
{
VOL_LOCK;
VPutVnode_r(ec, vnp);
* @internal volume package internal use only
*/
void
-VPutVnode_r(Error * ec, register Vnode * vnp)
+VPutVnode_r(Error * ec, Vnode * vnp)
{
int writeLocked;
VnodeClass class;
* been deleted.
*/
int
-VVnodeWriteToRead(Error * ec, register Vnode * vnp)
+VVnodeWriteToRead(Error * ec, Vnode * vnp)
{
int retVal;
VOL_LOCK;
* @internal volume package internal use only
*/
int
-VVnodeWriteToRead_r(Error * ec, register Vnode * vnp)
+VVnodeWriteToRead_r(Error * ec, Vnode * vnp)
{
int writeLocked;
VnodeClass class;
int locktype);
extern Vnode *VGetVnode_r(Error * ec, struct Volume *vp, VnodeId vnodeNumber,
int locktype);
-extern void VPutVnode(Error * ec, register Vnode * vnp);
-extern void VPutVnode_r(Error * ec, register Vnode * vnp);
-extern int VVnodeWriteToRead(Error * ec, register Vnode * vnp);
-extern int VVnodeWriteToRead_r(Error * ec, register Vnode * vnp);
+extern void VPutVnode(Error * ec, Vnode * vnp);
+extern void VPutVnode_r(Error * ec, Vnode * vnp);
+extern int VVnodeWriteToRead(Error * ec, Vnode * vnp);
+extern int VVnodeWriteToRead_r(Error * ec, Vnode * vnp);
extern Vnode *VAllocVnode(Error * ec, struct Volume *vp, VnodeType type);
extern Vnode *VAllocVnode_r(Error * ec, struct Volume *vp, VnodeType type);
/*extern VFreeVnode();*/
extern Vnode *VLookupVnode(struct Volume * vp, VnodeId vnodeId);
extern void AddToVVnList(struct Volume * vp, Vnode * vnp);
-extern void DeleteFromVVnList(register Vnode * vnp);
+extern void DeleteFromVVnList(Vnode * vnp);
extern void AddToVnLRU(struct VnodeClassInfo * vcp, Vnode * vnp);
extern void DeleteFromVnLRU(struct VnodeClassInfo * vcp, Vnode * vnp);
extern void AddToVnHash(Vnode * vnp);
int
main(int argc, char **argv)
{
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
afs_int32 code;
ts = cmd_CreateSyntax(NULL, handleit, NULL, "Manipulate volume blessed bit");
int VolumeChanged;
/* Forward Declarations */
-void PrintHeader(register Volume * vp);
+void PrintHeader(Volume * vp);
void HandleAllPart(void);
void HandlePart(struct DiskPartition64 *partP);
void HandleVolume(struct DiskPartition64 *partP, char *name);
struct DiskPartition64 *FindCurrentPartition(void);
Volume *AttachVolume(struct DiskPartition64 *dp, char *volname,
- register struct VolumeHeader *header);
+ struct VolumeHeader *header);
#if defined(AFS_NAMEI_ENV)
void PrintVnode(int offset, VnodeDiskObject * vnode, VnodeId vnodeNumber,
Inode ino, Volume * vp);
Volume *
AttachVolume(struct DiskPartition64 * dp, char *volname,
- register struct VolumeHeader * header)
+ struct VolumeHeader * header)
{
- register Volume *vp;
+ Volume *vp;
afs_int32 ec = 0;
vp = (Volume *) calloc(1, sizeof(Volume));
static int
handleit(struct cmd_syndesc *as, void *arock)
{
- register struct cmd_item *ti;
+ struct cmd_item *ti;
int err = 0;
afs_uint32 volumeId = 0;
char *partName = 0;
struct VolumeHeader header;
struct VolumeDiskHeader diskHeader;
struct afs_stat status, stat;
- register int fd;
+ int fd;
Volume *vp;
IHandle_t *ih;
char headerName[1024];
int
main(int argc, char **argv)
{
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
afs_int32 code;
ts = cmd_CreateSyntax(NULL, handleit, NULL, "Dump volume's internal state");
#define typestring(type) (type == RWVOL? "read/write": type == ROVOL? "readonly": type == BACKVOL? "backup": "unknown")
void
-PrintHeader(register Volume * vp)
+PrintHeader(Volume * vp)
{
Vdiskused = V_diskused(vp);
if (dsizeOnly || saveinodes)
char buf[SIZEOF_LARGEDISKVNODE];
struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
StreamHandle_t *file;
- register int vnodeIndex, nVnodes, offset = 0;
+ int vnodeIndex, nVnodes, offset = 0;
Inode ino;
IHandle_t *ih = vp->vnodeIndex[class].handle;
FdHandle_t *fdP;
}
static int
-BadError(register int aerror)
+BadError(int aerror)
{
if (aerror == EPERM || aerror == ENXIO || aerror == ENOENT)
return 1;
}
void
-DeleteExtraVolumeHeaderFile(register struct VolumeSummary *vsp)
+DeleteExtraVolumeHeaderFile(struct VolumeSummary *vsp)
{
char path[64];
sprintf(path, "%s/%s", fileSysPath, vsp->fileName);
int
CompareInodes(const void *_p1, const void *_p2)
{
- register const struct ViceInodeInfo *p1 = _p1;
- register const struct ViceInodeInfo *p2 = _p2;
+ const struct ViceInodeInfo *p1 = _p1;
+ const struct ViceInodeInfo *p2 = _p2;
if (p1->u.vnode.vnodeNumber == INODESPECIAL
|| p2->u.vnode.vnodeNumber == INODESPECIAL) {
VolumeId p1rwid, p2rwid;
}
void
-CountVolumeInodes(register struct ViceInodeInfo *ip, int maxInodes,
- register struct InodeSummary *summary)
+CountVolumeInodes(struct ViceInodeInfo *ip, int maxInodes,
+ struct InodeSummary *summary)
{
VolumeId volume = ip->u.vnode.volumeId;
VolumeId rwvolume = volume;
- register int n, nSpecial;
- register Unique maxunique;
+ int n, nSpecial;
+ Unique maxunique;
n = nSpecial = 0;
maxunique = 0;
while (maxInodes-- && volume == ip->u.vnode.volumeId) {
int
CompareVolumes(const void *_p1, const void *_p2)
{
- register const struct VolumeSummary *p1 = _p1;
- register const struct VolumeSummary *p2 = _p2;
+ const struct VolumeSummary *p1 = _p1;
+ const struct VolumeSummary *p2 = _p2;
if (p1->header.parent != p2->header.parent)
return p1->header.parent < p2->header.parent ? -1 : 1;
if (p1->header.id == p1->header.parent) /* p1 is rw volume */
* a RO only site, then the RO volume. For now, be cautious and hunt carefully.
*/
Inode
-FindLinkHandle(register struct InodeSummary *isp, int nVols,
+FindLinkHandle(struct InodeSummary *isp, int nVols,
struct ViceInodeInfo *allInodes)
{
int i, j;
}
int
-CreateLinkTable(register struct InodeSummary *isp, Inode ino)
+CreateLinkTable(struct InodeSummary *isp, Inode ino)
{
struct versionStamp version;
FdHandle_t *fdP;
}
void
-SalvageVolumeGroup(register struct InodeSummary *isp, int nVols)
+SalvageVolumeGroup(struct InodeSummary *isp, int nVols)
{
pthread_t tid;
pthread_attr_t tattr;
#endif /* AFS_NT40_ENV */
void
-DoSalvageVolumeGroup(register struct InodeSummary *isp, int nVols)
+DoSalvageVolumeGroup(struct InodeSummary *isp, int nVols)
{
struct ViceInodeInfo *inodes, *allInodes, *ip;
int i, totalInodes, size, salvageTo;
}
int
-QuickCheck(register struct InodeSummary *isp, int nVols)
+QuickCheck(struct InodeSummary *isp, int nVols)
{
/* Check headers BEFORE forking */
- register int i;
+ int i;
IHandle_t *h;
for (i = 0; i < nVols; i++) {
*/
int
-SalvageVolumeHeaderFile(register struct InodeSummary *isp,
- register struct ViceInodeInfo *inodes, int RW,
+SalvageVolumeHeaderFile(struct InodeSummary *isp,
+ struct ViceInodeInfo *inodes, int RW,
int check, int *deleteMe)
{
int i;
- register struct ViceInodeInfo *ip;
+ struct ViceInodeInfo *ip;
int allinodesobsolete = 1;
struct VolumeDiskHeader diskHeader;
afs_int32 (*writefunc)(VolumeDiskHeader_t *, struct DiskPartition64 *) = NULL;
}
int
-SalvageHeader(register struct stuff *sp, struct InodeSummary *isp, int check,
+SalvageHeader(struct stuff *sp, struct InodeSummary *isp, int check,
int *deleteMe)
{
union {
}
int
-SalvageVnodes(register struct InodeSummary *rwIsp,
- register struct InodeSummary *thisIsp,
- register struct ViceInodeInfo *inodes, int check)
+SalvageVnodes(struct InodeSummary *rwIsp,
+ struct InodeSummary *thisIsp,
+ struct ViceInodeInfo *inodes, int check)
{
int ilarge, ismall, ioffset, RW, nInodes;
ioffset = rwIsp->index + rwIsp->nSpecialInodes; /* first inode */
int
SalvageIndex(Inode ino, VnodeClass class, int RW,
- register struct ViceInodeInfo *ip, int nInodes,
+ struct ViceInodeInfo *ip, int nInodes,
struct VolumeSummary *volSummary, int check)
{
VolumeId volumeNumber;
/* For RW volume, look for vnode with matching inode number;
* if no such match, take the first determined by our sort
* order */
- register struct ViceInodeInfo *lip = ip;
- register int lnInodes = nInodes;
+ struct ViceInodeInfo *lip = ip;
+ int lnInodes = nInodes;
while (lnInodes
&& lip->u.vnode.vnodeNumber == vnodeNumber) {
if (VNDISK_GET_INO(vnode) == lip->inodeNumber) {
}
void
-CopyOnWrite(register struct DirSummary *dir)
+CopyOnWrite(struct DirSummary *dir)
{
/* Copy the directory unconditionally if we are going to change it:
* not just if was cloned.
* old dir.
*/
void
-CopyAndSalvage(register struct DirSummary *dir)
+CopyAndSalvage(struct DirSummary *dir)
{
struct VnodeDiskObject vnode;
struct VnodeClassInfo *vcp = &VnodeClassInfo[vLarge];
void
DistilVnodeEssence(VolumeId rwVId, VnodeClass class, Inode ino, Unique * maxu)
{
- register struct VnodeInfo *vip = &vnodeInfo[class];
+ struct VnodeInfo *vip = &vnodeInfo[class];
struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
char buf[SIZEOF_LARGEDISKVNODE];
struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
nVnodes && STREAM_READ(vnode, vcp->diskSize, 1, file) == 1;
nVnodes--, vnodeIndex++) {
if (vnode->type != vNull) {
- register struct VnodeEssence *vep = &vip->vnodes[vnodeIndex];
+ struct VnodeEssence *vep = &vip->vnodes[vnodeIndex];
afs_fsize_t vnodeLength;
vip->nAllocatedVnodes++;
vep->count = vnode->linkCount;
}
int
-SalvageVolume(register struct InodeSummary *rwIsp, IHandle_t * alinkH)
+SalvageVolume(struct InodeSummary *rwIsp, IHandle_t * alinkH)
{
/* This routine, for now, will only be called for read-write volumes */
int i, j, code;
int BlocksInVolume = 0, FilesInVolume = 0;
- register VnodeClass class;
+ VnodeClass class;
struct DirSummary rootdir, oldrootdir;
struct VnodeInfo *dirVnodeInfo;
struct VnodeDiskObject vnode;
FilesInVolume += vnodeInfo[class].nAllocatedVnodes;
BlocksInVolume += vnodeInfo[class].volumeBlockCount;
for (i = 0; i < nVnodes; i++) {
- register struct VnodeEssence *vnp = &vnodes[i];
+ struct VnodeEssence *vnp = &vnodes[i];
VnodeId vnodeNumber = bitNumberToVnodeNumber(i, class);
/* If the vnode is good but is unclaimed (not listed in
}
for (class = 0; class < nVNODECLASSES; class++) {
- register struct VnodeInfo *vip = &vnodeInfo[class];
+ struct VnodeInfo *vip = &vnodeInfo[class];
for (i = 0; i < vip->nVnodes; i++)
if (vip->vnodes[i].name)
free(vip->vnodes[i].name);
* deleteMe - Always do so, only a partial volume.
*/
void
-MaybeZapVolume(register struct InodeSummary *isp, char *message, int deleteMe,
+MaybeZapVolume(struct InodeSummary *isp, char *message, int deleteMe,
int check)
{
if (readOnly(isp) || deleteMe) {
void
PrintInodeList(void)
{
- register struct ViceInodeInfo *ip;
+ struct ViceInodeInfo *ip;
struct ViceInodeInfo *buf;
struct afs_stat status;
- register int nInodes;
+ int nInodes;
assert(afs_fstat(inodeFd, &status) == 0);
buf = (struct ViceInodeInfo *)malloc(status.st_size);
char *
ToString(const char *s)
{
- register char *p;
+ char *p;
p = (char *)malloc(strlen(s) + 1);
assert(p != NULL);
strcpy(p, s);
extern void TimeStampLogFile(char * log_path);
#endif
extern void ClearROInUseBit(struct VolumeSummary *summary);
-extern void CopyAndSalvage(register struct DirSummary *dir);
+extern void CopyAndSalvage(struct DirSummary *dir);
extern int CopyInode(Device device, Inode inode1, Inode inode2, int rwvolume);
-extern void CopyOnWrite(register struct DirSummary *dir);
-extern void CountVolumeInodes(register struct ViceInodeInfo *ip, int maxInodes,
- register struct InodeSummary *summary);
-extern void DeleteExtraVolumeHeaderFile(register struct VolumeSummary *vsp);
+extern void CopyOnWrite(struct DirSummary *dir);
+extern void CountVolumeInodes(struct ViceInodeInfo *ip, int maxInodes,
+ struct InodeSummary *summary);
+extern void DeleteExtraVolumeHeaderFile(struct VolumeSummary *vsp);
extern void DistilVnodeEssence(VolumeId vid, VnodeClass class, Inode ino,
Unique * maxu);
extern int GetInodeSummary(FILE *inodeFile, VolumeId singleVolumeNumber);
extern int GetVolumeSummary(VolumeId singleVolumeNumber);
extern int JudgeEntry(void *dirVal, char *name, afs_int32 vnodeNumber,
afs_int32 unique);
-extern void MaybeZapVolume(register struct InodeSummary *isp, char *message,
+extern void MaybeZapVolume(struct InodeSummary *isp, char *message,
int deleteMe, int check);
extern void ObtainSalvageLock(void);
extern void ObtainSharedSalvageLock(void);
extern void PrintInodeList(void);
extern void PrintInodeSummary(void);
extern void PrintVolumeSummary(void);
-extern int QuickCheck(register struct InodeSummary *isp, int nVols);
+extern int QuickCheck(struct InodeSummary *isp, int nVols);
extern void RemoveTheForce(char *path);
extern void SalvageDir(char *name, VolumeId rwVid, struct VnodeInfo *dirVnodeInfo,
IHandle_t * alinkH, int i, struct DirSummary *rootdir,
extern void SalvageFileSys(struct DiskPartition64 *partP, VolumeId singleVolumeNumber);
extern void SalvageFileSys1(struct DiskPartition64 *partP,
VolumeId singleVolumeNumber);
-extern int SalvageHeader(register struct stuff *sp, struct InodeSummary *isp,
+extern int SalvageHeader(struct stuff *sp, struct InodeSummary *isp,
int check, int *deleteMe);
extern int SalvageIndex(Inode ino, VnodeClass class, int RW,
- register struct ViceInodeInfo *ip, int nInodes,
+ struct ViceInodeInfo *ip, int nInodes,
struct VolumeSummary *volSummary, int check);
-extern int SalvageVnodes(register struct InodeSummary *rwIsp,
- register struct InodeSummary *thisIsp,
- register struct ViceInodeInfo *inodes, int check);
-extern int SalvageVolume(register struct InodeSummary *rwIsp, IHandle_t * alinkH);
-extern void DoSalvageVolumeGroup(register struct InodeSummary *isp, int nVols);
+extern int SalvageVnodes(struct InodeSummary *rwIsp,
+ struct InodeSummary *thisIsp,
+ struct ViceInodeInfo *inodes, int check);
+extern int SalvageVolume(struct InodeSummary *rwIsp, IHandle_t * alinkH);
+extern void DoSalvageVolumeGroup(struct InodeSummary *isp, int nVols);
#ifdef AFS_NT40_ENV
-extern void SalvageVolumeGroup(register struct InodeSummary *isp, int nVols);
+extern void SalvageVolumeGroup(struct InodeSummary *isp, int nVols);
#else
#define SalvageVolumeGroup DoSalvageVolumeGroup
#endif
-extern int SalvageVolumeHeaderFile(register struct InodeSummary *isp,
- register struct ViceInodeInfo *inodes, int RW,
+extern int SalvageVolumeHeaderFile(struct InodeSummary *isp,
+ struct ViceInodeInfo *inodes, int RW,
int check, int *deleteMe);
extern void showlog(void);
extern int UseTheForceLuke(char *path);
extern int nuke(char *, afs_int32);
/* vutil.c */
-extern void AssignVolumeName(register VolumeDiskData * vol, char *name, char *ext);
-extern void AssignVolumeName_r(register VolumeDiskData * vol, char *name, char *ext);
-extern void ClearVolumeStats(register VolumeDiskData * vol);
-extern void ClearVolumeStats_r(register VolumeDiskData * vol);
+extern void AssignVolumeName(VolumeDiskData * vol, char *name, char *ext);
+extern void AssignVolumeName_r(VolumeDiskData * vol, char *name, char *ext);
+extern void ClearVolumeStats(VolumeDiskData * vol);
+extern void ClearVolumeStats_r(VolumeDiskData * vol);
extern afs_int32 CopyVolumeHeader(VolumeDiskData *, VolumeDiskData *);
#endif
static void VScanUpdateList(void);
#endif /* !AFS_DEMAND_ATTACH_FS */
static void VInitVolumeHeaderCache(afs_uint32 howMany);
-static int GetVolumeHeader(register Volume * vp);
-static void ReleaseVolumeHeader(register struct volHeader *hd);
-static void FreeVolumeHeader(register Volume * vp);
-static void AddVolumeToHashTable(register Volume * vp, int hashid);
-static void DeleteVolumeFromHashTable(register Volume * vp);
+static int GetVolumeHeader(Volume * vp);
+static void ReleaseVolumeHeader(struct volHeader *hd);
+static void FreeVolumeHeader(Volume * vp);
+static void AddVolumeToHashTable(Volume * vp, int hashid);
+static void DeleteVolumeFromHashTable(Volume * vp);
#if 0
static int VHold(Volume * vp);
#endif
static void VReleaseVolumeHandles_r(Volume * vp);
static void VCloseVolumeHandles_r(Volume * vp);
static void LoadVolumeHeader(Error * ec, Volume * vp);
-static int VCheckOffline(register Volume * vp);
-static int VCheckDetach(register Volume * vp);
+static int VCheckOffline(Volume * vp);
+static int VCheckDetach(Volume * vp);
static Volume * GetVolume(Error * ec, Error * client_ec, VolId volumeId, Volume * hint, int flags);
int LogLevel; /* Vice loglevel--not defined as extern so that it will be
static void VVByPListWait_r(struct DiskPartition64 * dp);
/* online salvager */
-static int VCheckSalvage(register Volume * vp);
+static int VCheckSalvage(Volume * vp);
#if defined(SALVSYNC_BUILD_CLIENT) || defined(FSSYNC_BUILD_CLIENT)
static int VScheduleSalvage_r(Volume * vp);
#endif
VShutdown_r(void)
{
int i;
- register Volume *vp, *np;
- register afs_int32 code;
+ Volume *vp, *np;
+ afs_int32 code;
if (VInit < 2) {
Log("VShutdown: aborting attach volumes\n");
ShutdownVByPForPass_r(struct DiskPartition64 * dp, int pass)
{
struct rx_queue * q = queue_First(&dp->vol_list, rx_queue);
- register int i = 0;
+ int i = 0;
while (ShutdownVolumeWalk_r(dp, pass, &q))
i++;
Volume *
VAttachVolumeByName_r(Error * ec, char *partition, char *name, int mode)
{
- register Volume *vp = NULL;
+ Volume *vp = NULL;
struct DiskPartition64 *partp;
char path[64];
int isbusy = 0;
char *part, *name;
VGetVolumePath(ec, volumeId, &part, &name);
if (*ec) {
- register Volume *vp;
+ Volume *vp;
Error error;
vp = VGetVolume_r(&error, volumeId);
if (vp) {
* is dropped within VHold */
#ifdef AFS_DEMAND_ATTACH_FS
static int
-VHold_r(register Volume * vp)
+VHold_r(Volume * vp)
{
Error error;
}
#else /* AFS_DEMAND_ATTACH_FS */
static int
-VHold_r(register Volume * vp)
+VHold_r(Volume * vp)
{
Error error;
#if 0
static int
-VHold(register Volume * vp)
+VHold(Volume * vp)
{
int retVal;
VOL_LOCK;
* @internal volume package internal use only
*/
void
-VPutVolume_r(register Volume * vp)
+VPutVolume_r(Volume * vp)
{
assert(--vp->nUsers >= 0);
if (vp->nUsers == 0) {
}
void
-VPutVolume(register Volume * vp)
+VPutVolume(Volume * vp)
{
VOL_LOCK;
VPutVolume_r(vp);
/* caller MUST hold a heavyweight ref on vp */
#ifdef AFS_DEMAND_ATTACH_FS
void
-VTakeOffline_r(register Volume * vp)
+VTakeOffline_r(Volume * vp)
{
Error error;
}
#else /* AFS_DEMAND_ATTACH_FS */
void
-VTakeOffline_r(register Volume * vp)
+VTakeOffline_r(Volume * vp)
{
assert(vp->nUsers > 0);
assert(programType == fileServer);
#endif /* AFS_DEMAND_ATTACH_FS */
void
-VTakeOffline(register Volume * vp)
+VTakeOffline(Volume * vp)
{
VOL_LOCK;
VTakeOffline_r(vp);
* returns 1 if volume was freed, 0 otherwise */
#ifdef AFS_DEMAND_ATTACH_FS
static int
-VCheckDetach(register Volume * vp)
+VCheckDetach(Volume * vp)
{
int ret = 0;
Error ec = 0;
}
#else /* AFS_DEMAND_ATTACH_FS */
static int
-VCheckDetach(register Volume * vp)
+VCheckDetach(Volume * vp)
{
int ret = 0;
Error ec = 0;
* return 1 if volume went offline, 0 otherwise */
#ifdef AFS_DEMAND_ATTACH_FS
static int
-VCheckOffline(register Volume * vp)
+VCheckOffline(Volume * vp)
{
int ret = 0;
}
#else /* AFS_DEMAND_ATTACH_FS */
static int
-VCheckOffline(register Volume * vp)
+VCheckOffline(Volume * vp)
{
int ret = 0;
* @internal volume package internal use only.
*/
static int
-VCheckSalvage(register Volume * vp)
+VCheckSalvage(Volume * vp)
{
int ret = 0;
#if defined(SALVSYNC_BUILD_CLIENT) || defined(FSSYNC_BUILD_CLIENT)
struct vnodeIndex *index, int flags)
{
int ret = 0;
- register byte *bp, *ep;
+ byte *bp, *ep;
#ifdef AFS_DEMAND_ATTACH_FS
VolState state_save;
#endif /* AFS_DEMAND_ATTACH_FS */
}
int
-VAllocBitmapEntry(Error * ec, Volume * vp, register struct vnodeIndex * index)
+VAllocBitmapEntry(Error * ec, Volume * vp, struct vnodeIndex * index)
{
int retVal;
VOL_LOCK;
}
void
-VFreeBitMapEntry_r(Error * ec, register struct vnodeIndex *index,
+VFreeBitMapEntry_r(Error * ec, struct vnodeIndex *index,
unsigned bitNumber)
{
unsigned int offset;
}
void
-VFreeBitMapEntry(Error * ec, register struct vnodeIndex *index,
+VFreeBitMapEntry(Error * ec, struct vnodeIndex *index,
unsigned bitNumber)
{
VOL_LOCK;
*------------------------------------------------------------------------*/
int
-VAdjustVolumeStatistics_r(register Volume * vp)
+VAdjustVolumeStatistics_r(Volume * vp)
{
unsigned int now = FT_ApproxTime();
if (now - V_dayUseDate(vp) > OneDay) {
- register int ndays, i;
+ int ndays, i;
ndays = (now - V_dayUseDate(vp)) / OneDay;
for (i = 6; i > ndays - 1; i--)
} /*VAdjustVolumeStatistics */
int
-VAdjustVolumeStatistics(register Volume * vp)
+VAdjustVolumeStatistics(Volume * vp)
{
int retVal;
VOL_LOCK;
}
void
-VBumpVolumeUsage_r(register Volume * vp)
+VBumpVolumeUsage_r(Volume * vp)
{
unsigned int now = FT_ApproxTime();
V_accessDate(vp) = now;
}
void
-VBumpVolumeUsage(register Volume * vp)
+VBumpVolumeUsage(Volume * vp)
{
VOL_LOCK;
VBumpVolumeUsage_r(vp);
static void
VScanUpdateList(void)
{
- register int i, gap;
- register Volume *vp;
+ int i, gap;
+ Volume *vp;
Error error;
afs_uint32 now = FT_ApproxTime();
/* Be careful with this code, since it works with interleaved calls to AddToVolumeUpdateList */
static void
VInitVolumeHeaderCache(afs_uint32 howMany)
{
- register struct volHeader *hp;
+ struct volHeader *hp;
if (programType != fileServer)
return;
queue_Init(&volume_hdr_LRU);
* @internal volume package internal use only.
*/
static int
-GetVolumeHeader(register Volume * vp)
+GetVolumeHeader(Volume * vp)
{
Error error;
- register struct volHeader *hd;
+ struct volHeader *hd;
int old;
static int everLogged = 0;
* @internal volume package internal use only.
*/
static void
-ReleaseVolumeHeader(register struct volHeader *hd)
+ReleaseVolumeHeader(struct volHeader *hd)
{
if (programType != fileServer)
return;
* @internal volume package internal use only.
*/
static void
-FreeVolumeHeader(register Volume * vp)
+FreeVolumeHeader(Volume * vp)
{
- register struct volHeader *hd = vp->header;
+ struct volHeader *hd = vp->header;
if (!hd)
return;
if (programType == fileServer) {
static void
VInitVolumeHash(void)
{
- register int i;
+ int i;
VolumeHashTable.Table = (VolumeHashChainHead *) calloc(VolumeHashTable.Size,
sizeof(VolumeHashChainHead));
* asynchronous hash chain reordering to finish.
*/
static void
-AddVolumeToHashTable(register Volume * vp, int hashid)
+AddVolumeToHashTable(Volume * vp, int hashid)
{
VolumeHashChainHead * head;
* asynchronous hash chain reordering to finish.
*/
static void
-DeleteVolumeFromHashTable(register Volume * vp)
+DeleteVolumeFromHashTable(Volume * vp)
{
VolumeHashChainHead * head;
Volume *
VLookupVolume_r(Error * ec, VolId volumeId, Volume * hint)
{
- register int looks = 0;
+ int looks = 0;
Volume * vp, *np;
#ifdef AFS_DEMAND_ATTACH_FS
Volume *pp;
VPrintCacheStats_r(void)
{
afs_uint32 get_hi, get_lo, load_hi, load_lo;
- register struct VnodeClassInfo *vcp;
+ struct VnodeClassInfo *vcp;
vcp = &VnodeClassInfo[vLarge];
Log("Large vnode cache, %d entries, %d allocs, %d gets (%d reads), %d writes\n", vcp->cacheSize, vcp->allocs, vcp->gets, vcp->reads, vcp->writes);
vcp = &VnodeClassInfo[vSmall];
struct vnodeIndex *index);
extern int VAllocBitmapEntry_r(Error * ec, Volume * vp,
struct vnodeIndex *index, int flags);
-extern void VFreeBitMapEntry(Error * ec, register struct vnodeIndex *index,
+extern void VFreeBitMapEntry(Error * ec, struct vnodeIndex *index,
unsigned bitNumber);
-extern void VFreeBitMapEntry_r(Error * ec, register struct vnodeIndex *index,
+extern void VFreeBitMapEntry_r(Error * ec, struct vnodeIndex *index,
unsigned bitNumber);
extern int VolumeNumber(char *name);
extern char *VolumeExternalName(VolumeId volumeId);
extern void VDetachVolume_r(Error * ec, Volume * vp);
extern void VForceOffline(Volume * vp);
extern void VForceOffline_r(Volume * vp, int flags);
-extern void VBumpVolumeUsage(register Volume * vp);
-extern void VBumpVolumeUsage_r(register Volume * vp);
+extern void VBumpVolumeUsage(Volume * vp);
+extern void VBumpVolumeUsage_r(Volume * vp);
extern void VSetDiskUsage(void);
extern void VPrintCacheStats(void);
extern void VReleaseVnodeFiles_r(Volume * vp);
extern void DiskToVolumeHeader(VolumeHeader_t * h, VolumeDiskHeader_t * dh);
extern void VolumeHeaderToDisk(VolumeDiskHeader_t * dh, VolumeHeader_t * h);
extern void AssignVolumeName(VolumeDiskData * vol, char *name, char *ext);
-extern void VTakeOffline_r(register Volume * vp);
-extern void VTakeOffline(register Volume * vp);
+extern void VTakeOffline_r(Volume * vp);
+extern void VTakeOffline(Volume * vp);
extern Volume * VLookupVolume_r(Error * ec, VolId volumeId, Volume * hint);
extern void VGetVolumePath(Error * ec, VolId volumeId, char **partitionp,
char **namep);
static void
RemoveInodes(Device dev, VolumeId vid)
{
- register int i;
+ int i;
IHandle_t *handle;
/* This relies on the fact that IDEC only needs the device and NT only
device = partition->device;
for (i = 0; i < nFILES; i++) {
- register struct stuff *p = &stuff[i];
+ struct stuff *p = &stuff[i];
if (p->obsolete)
continue;
#ifdef AFS_NAMEI_ENV
void
-AssignVolumeName(register VolumeDiskData * vol, char *name, char *ext)
+AssignVolumeName(VolumeDiskData * vol, char *name, char *ext)
{
VOL_LOCK;
AssignVolumeName_r(vol, name, ext);
}
void
-AssignVolumeName_r(register VolumeDiskData * vol, char *name, char *ext)
+AssignVolumeName_r(VolumeDiskData * vol, char *name, char *ext)
{
- register char *dot;
+ char *dot;
strncpy(vol->name, name, VNAMESIZE - 1);
vol->name[VNAMESIZE - 1] = '\0';
dot = strrchr(vol->name, '.');
}
void
-ClearVolumeStats(register VolumeDiskData * vol)
+ClearVolumeStats(VolumeDiskData * vol)
{
VOL_LOCK;
ClearVolumeStats_r(vol);
}
void
-ClearVolumeStats_r(register VolumeDiskData * vol)
+ClearVolumeStats_r(VolumeDiskData * vol)
{
memset(vol->weekUse, 0, sizeof(vol->weekUse));
vol->dayUse = 0;
/* Forward Declarations */
-static int DumpDumpHeader(register struct iod *iodp, register Volume * vp,
+static int DumpDumpHeader(struct iod *iodp, Volume * vp,
afs_int32 fromtime);
-static int DumpPartial(register struct iod *iodp, register Volume * vp,
+static int DumpPartial(struct iod *iodp, Volume * vp,
afs_int32 fromtime, int dumpAllDirs);
-static int DumpVnodeIndex(register struct iod *iodp, Volume * vp,
+static int DumpVnodeIndex(struct iod *iodp, Volume * vp,
VnodeClass class, afs_int32 fromtime,
int forcedump);
-static int DumpVnode(register struct iod *iodp, struct VnodeDiskObject *v,
+static int DumpVnode(struct iod *iodp, struct VnodeDiskObject *v,
int volid, int vnodeNumber, int dumpEverything);
-static int ReadDumpHeader(register struct iod *iodp, struct DumpHeader *hp);
-static int ReadVnodes(register struct iod *iodp, Volume * vp, int incremental,
+static int ReadDumpHeader(struct iod *iodp, struct DumpHeader *hp);
+static int ReadVnodes(struct iod *iodp, Volume * vp, int incremental,
afs_int32 * Lbuf, afs_int32 s1, afs_int32 * Sbuf,
afs_int32 s2, afs_int32 delo);
static afs_fsize_t volser_WriteFile(int vn, struct iod *iodp,
FdHandle_t * handleP, int tag,
Error * status);
-static int SizeDumpDumpHeader(register struct iod *iodp, register Volume * vp,
+static int SizeDumpDumpHeader(struct iod *iodp, Volume * vp,
afs_int32 fromtime,
- register struct volintSize *size);
-static int SizeDumpPartial(register struct iod *iodp, register Volume * vp,
+ struct volintSize *size);
+static int SizeDumpPartial(struct iod *iodp, Volume * vp,
afs_int32 fromtime, int dumpAllDirs,
- register struct volintSize *size);
-static int SizeDumpVnodeIndex(register struct iod *iodp, Volume * vp,
+ struct volintSize *size);
+static int SizeDumpVnodeIndex(struct iod *iodp, Volume * vp,
VnodeClass class, afs_int32 fromtime,
int forcedump,
- register struct volintSize *size);
-static int SizeDumpVnode(register struct iod *iodp, struct VnodeDiskObject *v,
+ struct volintSize *size);
+static int SizeDumpVnode(struct iod *iodp, struct VnodeDiskObject *v,
int volid, int vnodeNumber, int dumpEverything,
- register struct volintSize *size);
+ struct volintSize *size);
#define MAX_SECTIONS 3
#define MIN_TLV_TAG 5
}
static void
-iod_Init(register struct iod *iodp, register struct rx_call *call)
+iod_Init(struct iod *iodp, struct rx_call *call)
{
iodp->call = call;
iodp->haveOldChar = 0;
}
static int
-iod_getc(register struct iod *iodp)
+iod_getc(struct iod *iodp)
{
unsigned char t;
}
static int
-ReadShort(register struct iod *iodp, register unsigned short *sp)
+ReadShort(struct iod *iodp, unsigned short *sp)
{
- register int b1, b0;
+ int b1, b0;
b1 = iod_getc(iodp);
if (b1 == EOF)
return 0;
}
static int
-ReadInt32(register struct iod *iodp, afs_uint32 * lp)
+ReadInt32(struct iod *iodp, afs_uint32 * lp)
{
- afs_uint32 register b3, b2, b1, b0;
+ afs_uint32 b3, b2, b1, b0;
b3 = iod_getc(iodp);
if (b3 == EOF)
return 0;
}
static void
-ReadString(register struct iod *iodp, register char *to, register int maxa)
+ReadString(struct iod *iodp, char *to, int maxa)
{
- register int c;
+ int c;
*to = '\0';
if (maxa == 0)
}
static void
-ReadByteString(register struct iod *iodp, register byte * to,
- register int size)
+ReadByteString(struct iod *iodp, byte * to,
+ int size)
{
while (size--)
*to++ = iod_getc(iodp);
* returns 1 on success and 0 otherwise
*/
static afs_int32
-ReadStandardTagLen(register struct iod *iodp, unsigned char tag, afs_int32 section,
+ReadStandardTagLen(struct iod *iodp, unsigned char tag, afs_int32 section,
afs_size_t *length)
{
afs_int32 code, i;
static char skipbuf[256];
static afs_int32
-SkipData(register struct iod *iodp, afs_size_t length)
+SkipData(struct iod *iodp, afs_size_t length)
{
while (length > 256) {
if (iod_Read(iodp, (char *)&skipbuf, 256) != 256)
}
static int
-ReadVolumeHeader(register struct iod *iodp, VolumeDiskData * vol)
+ReadVolumeHeader(struct iod *iodp, VolumeDiskData * vol)
{
- register int tag;
+ int tag;
afs_uint32 trash;
afs_int32 critical = 0;
memset(vol, 0, sizeof(*vol));
}
static int
-DumpTag(register struct iod *iodp, register int tag)
+DumpTag(struct iod *iodp, int tag)
{
char p;
}
static int
-DumpByte(register struct iod *iodp, char tag, byte value)
+DumpByte(struct iod *iodp, char tag, byte value)
{
char tbuffer[2];
- register byte *p = (unsigned char *)tbuffer;
+ byte *p = (unsigned char *)tbuffer;
*p++ = tag;
*p = value;
return ((iod_Write(iodp, tbuffer, 2) == 2) ? 0 : VOLSERDUMPERROR);
#define putshort(p, v) *p++ = v>>8, *p++ = v
static int
-DumpDouble(register struct iod *iodp, char tag, register afs_uint32 value1,
- register afs_uint32 value2)
+DumpDouble(struct iod *iodp, char tag, afs_uint32 value1,
+ afs_uint32 value2)
{
char tbuffer[9];
- register byte *p = (unsigned char *)tbuffer;
+ byte *p = (unsigned char *)tbuffer;
*p++ = tag;
putint32(p, value1);
putint32(p, value2);
}
static int
-DumpInt32(register struct iod *iodp, char tag, register afs_uint32 value)
+DumpInt32(struct iod *iodp, char tag, afs_uint32 value)
{
char tbuffer[5];
- register byte *p = (unsigned char *)tbuffer;
+ byte *p = (unsigned char *)tbuffer;
*p++ = tag;
putint32(p, value);
return ((iod_Write(iodp, tbuffer, 5) == 5) ? 0 : VOLSERDUMPERROR);
}
static int
-DumpArrayInt32(register struct iod *iodp, char tag,
- register afs_uint32 * array, register int nelem)
+DumpArrayInt32(struct iod *iodp, char tag,
+ afs_uint32 * array, int nelem)
{
char tbuffer[4];
- register afs_uint32 v;
+ afs_uint32 v;
int code = 0;
- register byte *p = (unsigned char *)tbuffer;
+ byte *p = (unsigned char *)tbuffer;
*p++ = tag;
putshort(p, nelem);
code = iod_Write(iodp, tbuffer, 3);
}
static int
-DumpShort(register struct iod *iodp, char tag, unsigned int value)
+DumpShort(struct iod *iodp, char tag, unsigned int value)
{
char tbuffer[3];
- register byte *p = (unsigned char *)tbuffer;
+ byte *p = (unsigned char *)tbuffer;
*p++ = tag;
*p++ = value >> 8;
*p = value;
}
static int
-DumpBool(register struct iod *iodp, char tag, unsigned int value)
+DumpBool(struct iod *iodp, char tag, unsigned int value)
{
char tbuffer[2];
- register byte *p = (unsigned char *)tbuffer;
+ byte *p = (unsigned char *)tbuffer;
*p++ = tag;
*p = value;
return ((iod_Write(iodp, tbuffer, 2) == 2) ? 0 : VOLSERDUMPERROR);
}
static int
-DumpString(register struct iod *iodp, char tag, register char *s)
+DumpString(struct iod *iodp, char tag, char *s)
{
- register int n;
+ int n;
int code = 0;
code = iod_Write(iodp, &tag, 1);
if (code != 1)
}
static int
-DumpByteString(register struct iod *iodp, char tag, register byte * bs,
- register int nbytes)
+DumpByteString(struct iod *iodp, char tag, byte * bs,
+ int nbytes)
{
int code = 0;
}
static afs_int32
-DumpStandardTag(register struct iod *iodp, char tag, afs_uint32 section)
+DumpStandardTag(struct iod *iodp, char tag, afs_uint32 section)
{
afs_int32 code;
afs_uint32 off = tag >> 5;
AFS_UNUSED
static afs_int32
-DumpStandardTagLen(register struct iod *iodp, char tag, afs_uint32 section,
+DumpStandardTagLen(struct iod *iodp, char tag, afs_uint32 section,
afs_size_t length)
{
char buf[10];
}
static int
-DumpVolumeHeader(register struct iod *iodp, register Volume * vp)
+DumpVolumeHeader(struct iod *iodp, Volume * vp)
{
int code = 0;
static char nullString[1] = ""; /*The ``contents'' of motd */
}
static int
-DumpEnd(register struct iod *iodp)
+DumpEnd(struct iod *iodp)
{
return (DumpInt32(iodp, D_DUMPEND, DUMPENDMAGIC));
}
/* Dump a whole volume */
int
-DumpVolume(register struct rx_call *call, register Volume * vp,
+DumpVolume(struct rx_call *call, Volume * vp,
afs_int32 fromtime, int dumpAllDirs)
{
struct iod iod;
int code = 0;
- register struct iod *iodp = &iod;
+ struct iod *iodp = &iod;
iod_Init(iodp, call);
if (!code)
/* A partial dump (no dump header) */
static int
-DumpPartial(register struct iod *iodp, register Volume * vp,
+DumpPartial(struct iod *iodp, Volume * vp,
afs_int32 fromtime, int dumpAllDirs)
{
int code = 0;
}
static int
-DumpVnodeIndex(register struct iod *iodp, Volume * vp, VnodeClass class,
+DumpVnodeIndex(struct iod *iodp, Volume * vp, VnodeClass class,
afs_int32 fromtime, int forcedump)
{
- register int code = 0;
- register struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
+ int code = 0;
+ struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
char buf[SIZEOF_LARGEDISKVNODE];
struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
StreamHandle_t *file;
FdHandle_t *fdP;
afs_sfsize_t size, nVnodes;
int flag;
- register int vnodeIndex;
+ int vnodeIndex;
fdP = IH_OPEN(vp->vnodeIndex[class].handle);
assert(fdP != NULL);
}
static int
-DumpDumpHeader(register struct iod *iodp, register Volume * vp,
+DumpDumpHeader(struct iod *iodp, Volume * vp,
afs_int32 fromtime)
{
int code = 0;
}
static int
-DumpVnode(register struct iod *iodp, struct VnodeDiskObject *v, int volid,
+DumpVnode(struct iod *iodp, struct VnodeDiskObject *v, int volid,
int vnodeNumber, int dumpEverything)
{
int code = 0;
FdHandle_t *fdP;
struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
char buf[SIZEOF_LARGEDISKVNODE], zero[SIZEOF_LARGEDISKVNODE];
- register struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
+ struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
memset(zero, 0, sizeof(zero)); /* zero out our proto-vnode */
fdP = IH_OPEN(vp->vnodeIndex[class].handle);
int
-RestoreVolume(register struct rx_call *call, Volume * avp, int incremental,
+RestoreVolume(struct rx_call *call, Volume * avp, int incremental,
struct restoreCookie *cookie)
{
VolumeDiskData vol;
struct DumpHeader header;
afs_uint32 endMagic;
Error error = 0, vupdate;
- register Volume *vp;
+ Volume *vp;
struct iod iod;
- register struct iod *iodp = &iod;
+ struct iod *iodp = &iod;
afs_int32 *b1 = NULL, *b2 = NULL;
int s1 = 0, s2 = 0, delo = 0, tdelo;
int tag;
}
static int
-ReadVnodes(register struct iod *iodp, Volume * vp, int incremental,
+ReadVnodes(struct iod *iodp, Volume * vp, int incremental,
afs_int32 * Lbuf, afs_int32 s1, afs_int32 * Sbuf, afs_int32 s2,
afs_int32 delo)
{
afs_int32 vnodeNumber;
char buf[SIZEOF_LARGEDISKVNODE];
- register int tag;
+ int tag;
struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
struct VnodeDiskObject oldvnode;
int idx;
afs_fsize_t filesize;
afs_fsize_t written = 0;
size_t size = 8192;
- register afs_fsize_t nbytes;
+ afs_fsize_t nbytes;
unsigned char *p;
}
static int
-ReadDumpHeader(register struct iod *iodp, struct DumpHeader *hp)
+ReadDumpHeader(struct iod *iodp, struct DumpHeader *hp)
{
- register int tag;
+ int tag;
afs_uint32 beginMagic;
afs_int32 critical = 0;
if (iod_getc(iodp) != D_DUMPHEADER || !ReadInt32(iodp, &beginMagic)
hp->nDumpTimes = 0;
while ((tag = iod_getc(iodp)) > D_MAX) {
unsigned short arrayLength;
- register int i;
+ int i;
if (critical)
critical--;
switch (tag) {
/* ----- Below are the calls that calculate dump size ----- */
static int
-SizeDumpVolumeHeader(register struct iod *iodp, register Volume * vp,
- register struct volintSize *v_size)
+SizeDumpVolumeHeader(struct iod *iodp, Volume * vp,
+ struct volintSize *v_size)
{
int code = 0;
static char nullString[1] = ""; /*The ``contents'' of motd */
}
static int
-SizeDumpEnd(register struct iod *iodp, register struct volintSize *v_size)
+SizeDumpEnd(struct iod *iodp, struct volintSize *v_size)
{
int code = 0;
afs_uint64 addvar;
}
int
-SizeDumpVolume(register struct rx_call *call, register Volume * vp,
+SizeDumpVolume(struct rx_call *call, Volume * vp,
afs_int32 fromtime, int dumpAllDirs,
- register struct volintSize *v_size)
+ struct volintSize *v_size)
{
int code = 0;
- register struct iod *iodp = (struct iod *)0;
+ struct iod *iodp = (struct iod *)0;
/* iod_Init(iodp, call); */
if (!code)
}
static int
-SizeDumpDumpHeader(register struct iod *iodp, register Volume * vp,
- afs_int32 fromtime, register struct volintSize *v_size)
+SizeDumpDumpHeader(struct iod *iodp, Volume * vp,
+ afs_int32 fromtime, struct volintSize *v_size)
{
int code = 0;
/* int UseLatestReadOnlyClone = 1; */
}
static int
-SizeDumpVnode(register struct iod *iodp, struct VnodeDiskObject *v, int volid,
+SizeDumpVnode(struct iod *iodp, struct VnodeDiskObject *v, int volid,
int vnodeNumber, int dumpEverything,
- register struct volintSize *v_size)
+ struct volintSize *v_size)
{
int code = 0;
afs_uint64 addvar;
/* A partial dump (no dump header) */
static int
-SizeDumpPartial(register struct iod *iodp, register Volume * vp,
+SizeDumpPartial(struct iod *iodp, Volume * vp,
afs_int32 fromtime, int dumpAllDirs,
- register struct volintSize *v_size)
+ struct volintSize *v_size)
{
int code = 0;
if (!code)
}
static int
-SizeDumpVnodeIndex(register struct iod *iodp, Volume * vp, VnodeClass class,
+SizeDumpVnodeIndex(struct iod *iodp, Volume * vp, VnodeClass class,
afs_int32 fromtime, int forcedump,
- register struct volintSize *v_size)
+ struct volintSize *v_size)
{
- register int code = 0;
- register struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
+ int code = 0;
+ struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
char buf[SIZEOF_LARGEDISKVNODE];
struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
StreamHandle_t *file;
FdHandle_t *fdP;
afs_sfsize_t size, nVnodes;
int flag;
- register int vnodeIndex;
+ int vnodeIndex;
fdP = IH_OPEN(vp->vnodeIndex[class].handle);
assert(fdP != NULL);
/* Forward Declarations */
void HandleVolume(struct DiskPartition64 *partP, char *name, char *filename, int fromtime);
Volume *AttachVolume(struct DiskPartition64 *dp, char *volname,
- register struct VolumeHeader *header);
+ struct VolumeHeader *header);
static void DoMyVolDump(Volume * vp, struct DiskPartition64 *dp,
char *dumpfile, int fromtime);
Volume *
AttachVolume(struct DiskPartition64 * dp, char *volname,
- register struct VolumeHeader * header)
+ struct VolumeHeader * header)
{
- register Volume *vp;
+ Volume *vp;
afs_int32 ec = 0;
vp = (Volume *) calloc(1, sizeof(Volume));
static int
handleit(struct cmd_syndesc *as, void *arock)
{
- register struct cmd_item *ti;
+ struct cmd_item *ti;
int err = 0;
afs_uint32 volumeId = 0;
char *partName = 0;
struct VolumeHeader header;
struct VolumeDiskHeader diskHeader;
struct afs_stat status;
- register int fd;
+ int fd;
Volume *vp;
char headerName[1024];
int
main(int argc, char **argv)
{
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
afs_int32 code;
VolumePackageOptions opts;
static int
-DumpDouble(int dumpfd, char tag, register afs_uint32 value1,
- register afs_uint32 value2)
+DumpDouble(int dumpfd, char tag, afs_uint32 value1,
+ afs_uint32 value2)
{
int res;
char tbuffer[9];
- register byte *p = (unsigned char *)tbuffer;
+ byte *p = (unsigned char *)tbuffer;
*p++ = tag;
putint32(p, value1);
putint32(p, value2);
}
static int
-DumpInt32(int dumpfd, char tag, register afs_uint32 value)
+DumpInt32(int dumpfd, char tag, afs_uint32 value)
{
char tbuffer[5];
- register byte *p = (unsigned char *)tbuffer;
+ byte *p = (unsigned char *)tbuffer;
*p++ = tag;
putint32(p, value);
return ((write(dumpfd, tbuffer, 5) == 5) ? 0 : VOLSERDUMPERROR);
}
static int
-DumpString(int dumpfd, char tag, register char *s)
+DumpString(int dumpfd, char tag, char *s)
{
- register int n;
+ int n;
int code = 0;
code = write(dumpfd, &tag, 1);
if (code != 1)
static int
-DumpArrayInt32(int dumpfd, char tag, register afs_uint32 * array,
- register int nelem)
+DumpArrayInt32(int dumpfd, char tag, afs_uint32 * array,
+ int nelem)
{
char tbuffer[4];
- register afs_uint32 v;
+ afs_uint32 v;
int code = 0;
- register byte *p = (unsigned char *)tbuffer;
+ byte *p = (unsigned char *)tbuffer;
*p++ = tag;
putshort(p, nelem);
code = write(dumpfd, tbuffer, 3);
static int
-DumpDumpHeader(int dumpfd, register Volume * vp, afs_int32 fromtime)
+DumpDumpHeader(int dumpfd, Volume * vp, afs_int32 fromtime)
{
int code = 0;
afs_int32 dumpTimes[2];
DumpByte(int dumpfd, char tag, byte value)
{
char tbuffer[2];
- register byte *p = (unsigned char *)tbuffer;
+ byte *p = (unsigned char *)tbuffer;
*p++ = tag;
*p = value;
return ((write(dumpfd, tbuffer, 2) == 2) ? 0 : VOLSERDUMPERROR);
}
static int
-DumpTag(int dumpfd, register int tag)
+DumpTag(int dumpfd, int tag)
{
char p;
DumpBool(int dumpfd, char tag, unsigned int value)
{
char tbuffer[2];
- register byte *p = (unsigned char *)tbuffer;
+ byte *p = (unsigned char *)tbuffer;
*p++ = tag;
*p = value;
return ((write(dumpfd, tbuffer, 2) == 2) ? 0 : VOLSERDUMPERROR);
static int
-DumpVolumeHeader(int dumpfd, register Volume * vp)
+DumpVolumeHeader(int dumpfd, Volume * vp)
{
int code = 0;
DumpShort(int dumpfd, char tag, unsigned int value)
{
char tbuffer[3];
- register byte *p = (unsigned char *)tbuffer;
+ byte *p = (unsigned char *)tbuffer;
*p++ = tag;
*p++ = value >> 8;
*p = value;
}
static int
-DumpByteString(int dumpfd, char tag, register byte * bs, register int nbytes)
+DumpByteString(int dumpfd, char tag, byte * bs, int nbytes)
{
int code = 0;
DumpVnodeIndex(int dumpfd, Volume * vp, VnodeClass class, afs_int32 fromtime,
int forcedump)
{
- register int code = 0;
- register struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
+ int code = 0;
+ struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
char buf[SIZEOF_LARGEDISKVNODE];
struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
StreamHandle_t *file;
afs_sfsize_t size;
int flag;
int offset = 0;
- register int vnodeIndex, nVnodes = 0;
+ int vnodeIndex, nVnodes = 0;
fdP = IH_OPEN(vp->vnodeIndex[class].handle);
file = FDH_FDOPEN(fdP, "r+");
/* A partial dump (no dump header) */
static int
-DumpPartial(int dumpfd, register Volume * vp, afs_int32 fromtime,
+DumpPartial(int dumpfd, Volume * vp, afs_int32 fromtime,
int dumpAllDirs)
{
int code = 0;
int
main(int argc, char **argv)
{
- register afs_int32 code;
+ afs_int32 code;
struct rx_securityClass **securityClasses;
afs_int32 numClasses;
struct rx_service *service;
int
VPFullUnlock_r(void)
{
- register struct DiskPartition64 *tp;
+ struct DiskPartition64 *tp;
for (tp = DiskPartitionList; tp; tp = tp->next) {
if (tp->lock_fd != INVALID_FD) {
close(tp->lock_fd); /* releases flock held on this partition */
afs_int32
PartitionID(char *aname)
{
- register char tc;
- register int code = 0;
+ char tc;
+ int code = 0;
char ascii[3];
tc = *aname;
VolPartitionInfo(struct rx_call *acid, char *pname, struct diskPartition64
*partition)
{
- register struct DiskPartition64 *dp;
+ struct DiskPartition64 *dp;
/*
if (!afsconf_SuperUser(tdir, acid, caller)) return VOLSERBAD_ACCESS;
char partName[50];
afs_int32 error;
Error verror;
- register afs_int32 code;
+ afs_int32 code;
struct Volume *tvp;
char caller[MAXKTCNAMELEN];
afs_int32 *atrans)
{
Error error;
- register Volume *vp;
+ Volume *vp;
Error junk; /* discardable error code */
afs_uint32 volumeID;
afs_int32 doCreateRoot = 1;
- register struct volser_trans *tt;
+ struct volser_trans *tt;
char ppath[30];
char caller[MAXKTCNAMELEN];
static afs_int32
VolDeleteVolume(struct rx_call *acid, afs_int32 atrans)
{
- register struct volser_trans *tt;
+ struct volser_trans *tt;
Error error;
char caller[MAXKTCNAMELEN];
afs_int32 newType, char *newName, afs_uint32 *newNumber)
{
afs_uint32 newId;
- register struct Volume *originalvp, *purgevp, *newvp;
+ struct Volume *originalvp, *purgevp, *newvp;
Error error, code;
- register struct volser_trans *tt, *ttc;
+ struct volser_trans *tt, *ttc;
char caller[MAXKTCNAMELEN];
#ifdef AFS_DEMAND_ATTACH_FS
struct Volume *salv_vp = NULL;
static afs_int32
VolReClone(struct rx_call *acid, afs_int32 atrans, afs_int32 cloneId)
{
- register struct Volume *originalvp, *clonevp;
+ struct Volume *originalvp, *clonevp;
Error error, code;
afs_int32 newType;
- register struct volser_trans *tt, *ttc;
+ struct volser_trans *tt, *ttc;
char caller[MAXKTCNAMELEN];
/*not a super user */
VolTransCreate(struct rx_call *acid, afs_uint32 volume, afs_int32 partition,
afs_int32 iflags, afs_int32 *ttid)
{
- register struct volser_trans *tt;
- register Volume *tv;
+ struct volser_trans *tt;
+ Volume *tv;
afs_int32 error;
Error code;
afs_int32 mode;
static afs_int32
VolGetFlags(struct rx_call *acid, afs_int32 atid, afs_int32 *aflags)
{
- register struct volser_trans *tt;
+ struct volser_trans *tt;
tt = FindTrans(atid);
if (!tt)
static afs_int32
VolSetFlags(struct rx_call *acid, afs_int32 atid, afs_int32 aflags)
{
- register struct volser_trans *tt;
- register struct Volume *vp;
+ struct volser_trans *tt;
+ struct Volume *vp;
Error error;
char caller[MAXKTCNAMELEN];
struct destServer *destination, afs_int32 destTrans,
struct restoreCookie *cookie)
{
- register struct volser_trans *tt;
- register afs_int32 code;
- register struct rx_connection *tcon;
+ struct volser_trans *tt;
+ afs_int32 code;
+ struct rx_connection *tcon;
struct rx_call *tcall;
- register struct Volume *vp;
+ struct Volume *vp;
struct rx_securityClass *securityObject;
afs_int32 securityIndex;
char caller[MAXKTCNAMELEN];
afs_int32 flags)
{
int code = 0;
- register struct volser_trans *tt;
+ struct volser_trans *tt;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(tdir, acid, caller))
VolRestore(struct rx_call *acid, afs_int32 atrans, afs_int32 aflags,
struct restoreCookie *cookie)
{
- register struct volser_trans *tt;
- register afs_int32 code, tcode;
+ struct volser_trans *tt;
+ afs_int32 code, tcode;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(tdir, acid, caller))
static afs_int32
VolEndTrans(struct rx_call *acid, afs_int32 destTrans, afs_int32 *rcode)
{
- register struct volser_trans *tt;
+ struct volser_trans *tt;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(tdir, acid, caller))
static afs_int32
VolSetForwarding(struct rx_call *acid, afs_int32 atid, afs_int32 anewsite)
{
- register struct volser_trans *tt;
+ struct volser_trans *tt;
char caller[MAXKTCNAMELEN];
char partName[16];
afs_int32
SAFSVolGetStatus(struct rx_call *acid, afs_int32 atrans,
- register struct volser_status *astatus)
+ struct volser_status *astatus)
{
afs_int32 code;
static afs_int32
VolGetStatus(struct rx_call *acid, afs_int32 atrans,
- register struct volser_status *astatus)
+ struct volser_status *astatus)
{
- register struct Volume *tv;
- register struct VolumeDiskData *td;
+ struct Volume *tv;
+ struct VolumeDiskData *td;
struct volser_trans *tt;
afs_int32
SAFSVolSetInfo(struct rx_call *acid, afs_int32 atrans,
- register struct volintInfo *astatus)
+ struct volintInfo *astatus)
{
afs_int32 code;
static afs_int32
VolSetInfo(struct rx_call *acid, afs_int32 atrans,
- register struct volintInfo *astatus)
+ struct volintInfo *astatus)
{
- register struct Volume *tv;
- register struct VolumeDiskData *td;
+ struct Volume *tv;
+ struct VolumeDiskData *td;
struct volser_trans *tt;
char caller[MAXKTCNAMELEN];
Error error;
static afs_int32
VolGetName(struct rx_call *acid, afs_int32 atrans, char **aname)
{
- register struct Volume *tv;
- register struct VolumeDiskData *td;
+ struct Volume *tv;
+ struct VolumeDiskData *td;
struct volser_trans *tt;
- register int len;
+ int len;
/* We need to at least fill it in */
*aname = (char *)malloc(1);
FillVolInfo(Volume * vp, volint_info_handle_t * handle)
{
unsigned int numStatBytes, now;
- register struct VolumeDiskData *hdr = &vp->header->diskstuff;
+ struct VolumeDiskData *hdr = &vp->header->diskstuff;
/*read in the relevant info */
strcpy((char *)VOLINT_INFO_PTR(handle, name), hdr->name);
{
struct Volume *tv;
Error error = 0;
- register struct volser_trans *tt;
+ struct volser_trans *tt;
char caller[MAXKTCNAMELEN];
if (strlen(name) > 31)
{
struct Volume *tv;
Error error = 0;
- register struct volser_trans *tt;
+ struct volser_trans *tt;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(tdir, acid, caller))
#else
char caller[MAXKTCNAMELEN];
DIR *dirp;
- register struct volser_trans *ttc;
+ struct volser_trans *ttc;
char pname[16], volname[20];
struct DiskPartition64 *partP;
afs_int32 ret = ENODEV;
afs_int32
SAFSVolGetSize(struct rx_call *acid, afs_int32 fromTrans, afs_int32 fromDate,
- register struct volintSize *size)
+ struct volintSize *size)
{
int code = 0;
- register struct volser_trans *tt;
+ struct volser_trans *tt;
char caller[MAXKTCNAMELEN];
if (!afsconf_SuperUser(tdir, acid, caller))
extern int UV_DeleteVolume(afs_uint32 aserver, afs_int32 apart,
afs_uint32 avolid);
-extern int UV_SetSecurity(register struct rx_securityClass *as,
+extern int UV_SetSecurity(struct rx_securityClass *as,
afs_int32 aindex);
extern int UV_ListOneVolume(afs_uint32 aserver, afs_int32 apart,
/* find a trans, again returning with high ref count */
struct volser_trans *
-FindTrans(register afs_int32 atrans)
+FindTrans(afs_int32 atrans)
{
- register struct volser_trans *tt;
+ struct volser_trans *tt;
VTRANS_LOCK;
for (tt = allTrans; tt; tt = tt->next) {
if (tt->tid == atrans) {
/* delete transaction if refcount == 1, otherwise queue delete for later. Does implicit TRELE */
afs_int32
-DeleteTrans(register struct volser_trans *atrans, afs_int32 lock)
+DeleteTrans(struct volser_trans *atrans, afs_int32 lock)
{
- register struct volser_trans *tt, **lt;
+ struct volser_trans *tt, **lt;
Error error;
if (lock) VTRANS_LOCK;
/* put a transaction back */
afs_int32
-TRELE(register struct volser_trans *at)
+TRELE(struct volser_trans *at)
{
VTRANS_LOCK;
if (at->refCount == 0) {
afs_int32
GCTrans(void)
{
- register struct volser_trans *tt, *nt;
+ struct volser_trans *tt, *nt;
afs_int32 now;
now = FT_ApproxTime();
afs_uint32
GetServer(char *aname)
{
- register struct hostent *th;
+ struct hostent *th;
afs_uint32 addr; /* in network byte order */
- register afs_int32 code;
+ afs_int32 code;
char hostname[MAXHOSTCHARS];
if ((addr = GetServerNoresolve(aname)) == 0) {
/*sends the contents of file associated with <fd> and <blksize> to Rx Stream
* associated with <call> */
int
-SendFile(usd_handle_t ufd, register struct rx_call *call, long blksize)
+SendFile(usd_handle_t ufd, struct rx_call *call, long blksize)
{
char *buffer = (char *)0;
afs_int32 error = 0;
/* command to forcibly remove a volume */
static int
-NukeVolume(register struct cmd_syndesc *as)
+NukeVolume(struct cmd_syndesc *as)
{
- register afs_int32 code;
+ afs_int32 code;
afs_uint32 volID;
afs_int32 err;
afs_int32 partID;
afs_uint32 server;
- register char *tp;
+ char *tp;
server = GetServer(tp = as->parms[0].items->data);
if (!server) {
*------------------------------------------------------------------------
*/
static int
-ExamineVolume(register struct cmd_syndesc *as, void *arock)
+ExamineVolume(struct cmd_syndesc *as, void *arock)
{
struct nvldbentry entry;
afs_int32 vcode = 0;
*------------------------------------------------------------------------
*/
static int
-SetFields(register struct cmd_syndesc *as, void *arock)
+SetFields(struct cmd_syndesc *as, void *arock)
{
struct nvldbentry entry;
volintInfo info;
*------------------------------------------------------------------------
*/
static int
-volOnline(register struct cmd_syndesc *as, void *arock)
+volOnline(struct cmd_syndesc *as, void *arock)
{
afs_uint32 server;
afs_int32 partition;
*------------------------------------------------------------------------
*/
static int
-volOffline(register struct cmd_syndesc *as, void *arock)
+volOffline(struct cmd_syndesc *as, void *arock)
{
afs_uint32 server;
afs_int32 partition;
}
static int
-CreateVolume(register struct cmd_syndesc *as, void *arock)
+CreateVolume(struct cmd_syndesc *as, void *arock)
{
afs_int32 pnum;
char part[10];
#define TESTM 0 /* set for move space tests, clear for production */
static int
-MoveVolume(register struct cmd_syndesc *as, void *arock)
+MoveVolume(struct cmd_syndesc *as, void *arock)
{
afs_uint32 volid;
}
static int
-CopyVolume(register struct cmd_syndesc *as, void *arock)
+CopyVolume(struct cmd_syndesc *as, void *arock)
{
afs_uint32 volid;
afs_uint32 fromserver, toserver;
static int
-ShadowVolume(register struct cmd_syndesc *as, void *arock)
+ShadowVolume(struct cmd_syndesc *as, void *arock)
{
afs_uint32 volid, tovolid;
afs_uint32 fromserver, toserver;
static int
-CloneVolume(register struct cmd_syndesc *as, void *arock)
+CloneVolume(struct cmd_syndesc *as, void *arock)
{
afs_uint32 volid, cloneid;
afs_uint32 server;
static int
-BackupVolume(register struct cmd_syndesc *as, void *arock)
+BackupVolume(struct cmd_syndesc *as, void *arock)
{
afs_uint32 avolid;
afs_uint32 aserver;
}
static int
-ReleaseVolume(register struct cmd_syndesc *as, void *arock)
+ReleaseVolume(struct cmd_syndesc *as, void *arock)
{
struct nvldbentry entry;
}
static int
-DumpVolumeCmd(register struct cmd_syndesc *as, void *arock)
+DumpVolumeCmd(struct cmd_syndesc *as, void *arock)
{
afs_uint32 avolid;
afs_uint32 aserver;
#define TS_NEW 3
static int
-RestoreVolumeCmd(register struct cmd_syndesc *as, void *arock)
+RestoreVolumeCmd(struct cmd_syndesc *as, void *arock)
{
afs_uint32 avolid, aparentid;
afs_uint32 aserver;
}
static int
-LockReleaseCmd(register struct cmd_syndesc *as, void *arock)
+LockReleaseCmd(struct cmd_syndesc *as, void *arock)
{
afs_uint32 avolid;
afs_int32 code, err;
}
static int
-AddSite(register struct cmd_syndesc *as, void *arock)
+AddSite(struct cmd_syndesc *as, void *arock)
{
afs_uint32 avolid;
afs_uint32 aserver;
}
static int
-RemoveSite(register struct cmd_syndesc *as, void *arock)
+RemoveSite(struct cmd_syndesc *as, void *arock)
{
afs_uint32 avolid;
}
static int
-ChangeLocation(register struct cmd_syndesc *as, void *arock)
+ChangeLocation(struct cmd_syndesc *as, void *arock)
{
afs_uint32 avolid;
afs_uint32 aserver;
}
static int
-ListPartitions(register struct cmd_syndesc *as, void *arock)
+ListPartitions(struct cmd_syndesc *as, void *arock)
{
afs_uint32 aserver;
afs_int32 code;
*------------------------------------------------------------------------*/
static int
-ListVolumes(register struct cmd_syndesc *as, void *arock)
+ListVolumes(struct cmd_syndesc *as, void *arock)
{
afs_int32 apart, int32list, fast;
afs_uint32 aserver;
}
static int
-SyncVldb(register struct cmd_syndesc *as, void *arock)
+SyncVldb(struct cmd_syndesc *as, void *arock)
{
afs_int32 pnum = 0, code; /* part name */
char part[10];
}
static int
-SyncServer(register struct cmd_syndesc *as, void *arock)
+SyncServer(struct cmd_syndesc *as, void *arock)
{
afs_int32 pnum, code; /* part name */
char part[10];
}
static int
-VolumeZap(register struct cmd_syndesc *as, void *arock)
+VolumeZap(struct cmd_syndesc *as, void *arock)
{
struct nvldbentry entry;
afs_uint32 volid, zapbackupid = 0, backupid = 0;
}
static int
-VolserStatus(register struct cmd_syndesc *as, void *arock)
+VolserStatus(struct cmd_syndesc *as, void *arock)
{
afs_uint32 server;
afs_int32 code;
}
static int
-RenameVolume(register struct cmd_syndesc *as, void *arock)
+RenameVolume(struct cmd_syndesc *as, void *arock)
{
afs_int32 code1, code2, code;
struct nvldbentry entry;
}
static int
-DeleteEntry(register struct cmd_syndesc *as, void *arock)
+DeleteEntry(struct cmd_syndesc *as, void *arock)
{
afs_int32 apart = 0;
afs_uint32 avolid;
afs_int32 vcode;
struct VldbListByAttributes attributes;
nbulkentries arrayEntries;
- register struct nvldbentry *vllist;
+ struct nvldbentry *vllist;
struct cmd_item *itp;
afs_int32 nentries;
int j;
}
static int
-BackSys(register struct cmd_syndesc *as, void *arock)
+BackSys(struct cmd_syndesc *as, void *arock)
{
afs_uint32 avolid;
afs_int32 apart = 0;
afs_int32 vcode;
struct VldbListByAttributes attributes;
nbulkentries arrayEntries;
- register struct nvldbentry *vllist;
+ struct nvldbentry *vllist;
afs_int32 nentries;
int j;
char pname[10];
}
static int
-UnlockVLDB(register struct cmd_syndesc *as, void *arock)
+UnlockVLDB(struct cmd_syndesc *as, void *arock)
{
afs_int32 apart;
afs_uint32 aserver = 0;
afs_int32 vcode;
struct VldbListByAttributes attributes;
nbulkentries arrayEntries;
- register struct nvldbentry *vllist;
+ struct nvldbentry *vllist;
afs_int32 nentries;
int j;
afs_uint32 volid;
static char *
PrintInt64Size(afs_uint64 in)
{
- register afs_uint32 hi, lo;
- register char * units;
+ afs_uint32 hi, lo;
+ char * units;
static char output[16];
SplitInt64(in,hi,lo);
}
static int
-PartitionInfo(register struct cmd_syndesc *as, void *arock)
+PartitionInfo(struct cmd_syndesc *as, void *arock)
{
afs_int32 apart;
afs_uint32 aserver;
}
static int
-ChangeAddr(register struct cmd_syndesc *as, void *arock)
+ChangeAddr(struct cmd_syndesc *as, void *arock)
{
afs_int32 ip1, ip2, vcode;
int remove = 0;
}
static int
-ListAddrs(register struct cmd_syndesc *as, void *arock)
+ListAddrs(struct cmd_syndesc *as, void *arock)
{
afs_int32 vcode, m_uniq=0;
afs_int32 i, printuuid = 0;
static int
-SetAddrs(register struct cmd_syndesc *as, void *arock)
+SetAddrs(struct cmd_syndesc *as, void *arock)
{
afs_int32 vcode;
bulkaddrs m_addrs;
}
static int
-LockEntry(register struct cmd_syndesc *as, void *arock)
+LockEntry(struct cmd_syndesc *as, void *arock)
{
afs_uint32 avolid;
afs_int32 vcode, err;
}
static int
-ConvertRO(register struct cmd_syndesc *as, void *arock)
+ConvertRO(struct cmd_syndesc *as, void *arock)
{
afs_int32 partition = -1;
afs_uint32 volid;
}
static int
-Sizes(register struct cmd_syndesc *as, void *arock)
+Sizes(struct cmd_syndesc *as, void *arock)
{
afs_uint32 avolid;
afs_uint32 aserver;
}
static int
-EndTrans(register struct cmd_syndesc *as, void *arock)
+EndTrans(struct cmd_syndesc *as, void *arock)
{
afs_uint32 server;
afs_int32 code, tid, rcode;
static int
MyBeforeProc(struct cmd_syndesc *as, void *arock)
{
- register char *tcell;
- register afs_int32 code;
- register afs_int32 sauth;
+ char *tcell;
+ afs_int32 code;
+ afs_int32 sauth;
/* Initialize the ubik_client connection */
rx_SetRxDeadTime(90);
int
main(int argc, char **argv)
{
- register afs_int32 code;
+ afs_int32 code;
- register struct cmd_syndesc *ts;
+ struct cmd_syndesc *ts;
#ifdef AFS_AIX32_ENV
/*
static int uvindex = -1;
/* called by VLDBClient_Init to set the security module to be used in the RPC */
int
-UV_SetSecurity(register struct rx_securityClass *as, afs_int32 aindex)
+UV_SetSecurity(struct rx_securityClass *as, afs_int32 aindex)
{
uvindex = aindex;
uvclass = as;
struct rx_connection *
UV_Bind(afs_uint32 aserver, afs_int32 port)
{
- register struct rx_connection *tc;
+ struct rx_connection *tc;
tc = rx_NewConnection(aserver, htons(port), VOLSERVICE_ID, uvclass,
uvindex);
int
UV_NukeVolume(afs_uint32 server, afs_int32 partid, afs_uint32 volid)
{
- register struct rx_connection *tconn;
- register afs_int32 code;
+ struct rx_connection *tconn;
+ afs_int32 code;
tconn = UV_Bind(server, AFSCONF_VOLUMEPORT);
if (tconn) {
UV_PartitionInfo64(afs_uint32 server, char *pname,
struct diskPartition64 *partition)
{
- register struct rx_connection *aconn;
+ struct rx_connection *aconn;
afs_int32 code = 0;
aconn = (struct rx_connection *)0;
afs_int32 aspare3, afs_int32 aspare4, afs_uint32 * anewid,
afs_uint32 * aroid, afs_uint32 * abkid)
{
- register struct rx_connection *aconn;
+ struct rx_connection *aconn;
afs_int32 tid;
- register afs_int32 code;
+ afs_int32 code;
afs_int32 error;
afs_int32 rcode, vcode;
afs_int32 lastid;
UV_AddVLDBEntry(afs_uint32 aserver, afs_int32 apart, char *aname,
afs_uint32 aid)
{
- register struct rx_connection *aconn;
+ struct rx_connection *aconn;
afs_int32 error;
afs_int32 vcode;
struct nvldbentry entry, storeEntry; /*the new vldb entry */
afs_int32 tmp;
afs_uint32 tmpVol;
struct restoreCookie cookie;
- register afs_int32 vcode, code;
+ afs_int32 vcode, code;
struct volser_status tstatus;
struct destServer destination;
afs_int32 rcode;
afs_int32 fromDate, cloneFromDate;
struct restoreCookie cookie;
- register afs_int32 vcode, code;
+ afs_int32 vcode, code;
afs_uint32 newVol;
afs_int32 volflag;
struct volser_status tstatus;
struct rx_connection *aconn;
struct pIDs partIds;
struct partEntries partEnts;
- register int i, j = 0, code;
+ int i, j = 0, code;
*cntp = 0;
aconn = UV_Bind(aserver, AFSCONF_VOLUMEPORT);
ovlentry_to_nvlentry(struct vldbentry *oentryp,
struct nvldbentry *nentryp)
{
- register int i;
+ int i;
memset(nentryp, 0, sizeof(struct nvldbentry));
strncpy(nentryp->name, oentryp->name, sizeof(nentryp->name));
nvlentry_to_ovlentry(struct nvldbentry *nentryp,
struct vldbentry *oentryp)
{
- register int i;
+ int i;
memset(oentryp, 0, sizeof(struct vldbentry));
strncpy(oentryp->name, nentryp->name, sizeof(oentryp->name));
VLDB_CreateEntry(struct nvldbentry *entryp)
{
struct vldbentry oentry;
- register int code;
+ int code;
if (newvlserver == 1) {
tryold:
VLDB_GetEntryByID(afs_uint32 volid, afs_int32 voltype, struct nvldbentry *entryp)
{
struct vldbentry oentry;
- register int code;
+ int code;
if (newvlserver == 1) {
tryold:
VLDB_GetEntryByName(char *namep, struct nvldbentry *entryp)
{
struct vldbentry oentry;
- register int code;
+ int code;
if (newvlserver == 1) {
tryold:
VLDB_ReplaceEntry(afs_uint32 volid, afs_int32 voltype, struct nvldbentry *entryp, afs_int32 releasetype)
{
struct vldbentry oentry;
- register int code;
+ int code;
if (newvlserver == 1) {
tryold:
nbulkentries *blkentriesp)
{
bulkentries arrayEntries;
- register int code, i;
+ int code, i;
if (newvlserver == 1) {
tryold:
int
VLDB_IsSameAddrs(afs_uint32 serv1, afs_uint32 serv2, afs_int32 *errorp)
{
- register int code;
+ int code;
ListAddrByAttributes attrs;
bulkaddrs addrs;
afs_uint32 *addrp, i, j, f1, f2;
xstat_cm_LWP(void *unused)
{
static char rn[] = "xstat_cm_LWP"; /*Routine name */
- register afs_int32 code; /*Results of calls */
+ afs_int32 code; /*Results of calls */
int oneShotCode; /*Result of one-shot signal */
struct timeval tv; /*Time structure */
int conn_idx; /*Connection index */
{
static char rn[] = "xstat_cm_Init"; /*Routine name */
- register afs_int32 code; /*Return value */
+ afs_int32 code; /*Return value */
struct rx_securityClass *secobj; /*Client security object */
int arg_errfound; /*Argument error found? */
int curr_srv; /*Current server idx */
PrintCallInfo(void)
{ /*PrintCallInfo */
- register int i; /*Loop variable */
+ int i; /*Loop variable */
int numInt32s; /*# int32words returned */
afs_int32 *currInt32; /*Ptr to current afs_int32 value */
char *printableTime; /*Ptr to printable time string */
{ /*Main routine */
static char rn[] = "xstat_cm_test"; /*Routine name */
- register afs_int32 code; /*Return code */
+ afs_int32 code; /*Return code */
struct cmd_syndesc *ts; /*Ptr to cmd line syntax desc */
/*
xstat_fs_LWP(void *unused)
{
static char rn[] = "xstat_fs_LWP"; /*Routine name */
- register afs_int32 code; /*Results of calls */
+ afs_int32 code; /*Results of calls */
int oneShotCode; /*Result of one-shot signal */
struct timeval tv; /*Time structure */
int conn_idx; /*Connection index */
int a_numCollections, afs_int32 * a_collIDP)
{
static char rn[] = "xstat_fs_Init"; /*Routine name */
- register afs_int32 code; /*Return value */
+ afs_int32 code; /*Return value */
static struct rx_securityClass *CBsecobj; /*Callback security object */
struct rx_securityClass *secobj; /*Client security object */
struct rx_service *rxsrv_afsserver; /*Server for AFS */
void
PrintCallInfo(void)
{ /*PrintCallInfo */
- register int i; /*Loop variable */
+ int i; /*Loop variable */
int numInt32s; /*# int32words returned */
afs_int32 *currInt32; /*Ptr to current afs_int32 value */
char *printableTime; /*Ptr to printable time string */
main(int argc, char **argv)
{
static char rn[] = "xstat_fs_test"; /*Routine name */
- register afs_int32 code; /*Return code */
+ afs_int32 code; /*Return code */
struct cmd_syndesc *ts; /*Ptr to cmd line syntax desc */
/*