int version;
};
-main(argc, argv)
- int argc;
- char **argv;
+int main(int argc, char **argv)
{
int fd, size, i;
#endif
-
-
struct ubik_client *cstruct;
struct rx_connection *serverconns[MAXSERVERS];
char *(args[50]);
extern int AFS_BulkFetchVV(), AFS_BulkKeepAlive();
extern int AFS_Spare1(), AFS_Spare2(), AFS_Spare3(), AFS_Spare4(), AFS_Spare5(), AFS_Spare6();
-afs_int32 pxclient_Initialize(auth, serverAddr)
-int auth;
-afs_int32 serverAddr;
-{ afs_int32 code;
+afs_int32 pxclient_Initialize(int auth, afs_int32 serverAddr)
+{
+ afs_int32 code;
afs_int32 scIndex;
struct rx_securityClass *sc;
#include "AFS_component_version_number.c"
-main(argc, argv)
- int argc;
- char **argv; {
+int
+main(int argc, char **argv)
+{
char **av = argv;
struct sockaddr_in host;
register afs_int32 code;
else
printf("return code is %d\n", code);
-#ifdef notdef
+#ifdef notdef
while (1) {
char line[500];
int nargs;
}
-GetArgs(line,args, nargs)
- register char *line;
- register char **args;
- register int *nargs;
+void GetArgs(register char *line, register char **args, register int *nargs)
{
*nargs = 0;
while (*line) {
}
}
-#ifdef notdef
-FetchData(argp)
- char **argp;
+#ifdef notdef
+afs_int32 FetchData(char **argp)
{
struct afsFetchStatus OutStatus;
struct afsToken Token;
code = EndAFS_FetchData(tcall, &OutStatus, &Token, &tsync);
}
code = rx_EndCall(tcall, code);
+ return code;
}
-static FetchProc(acall)
- register struct rx_call *acall;
+static afs_int32 FetchProc(register struct rx_call *acall)
{
extern char *malloc();
register char *tbuffer;
}
-FetchStatus(argp)
- char **argp;
+afs_int32 FetchStatus(char **argp)
{
struct afsFetchStatus OutStatus;
struct afsToken Token;
}
-FetchACL(argp)
- char **argp;
+afs_int32 FetchACL(char **argp)
{
struct afsFetchStatus OutStatus;
struct afsACL AccessList;
}
-StoreData(argp)
- char **argp;
+afs_int32 StoreData(char **argp)
{
struct afsStoreStatus InStatus;
struct afsFetchStatus OutStatus;
}
-static StoreProc(acall, string, length)
- register struct rx_call *acall;
- char *string;
- int length;
+static afs_int32 StoreProc(register struct rx_call *acall,
+ char *string, int length)
{
afs_int32 tlen, code;
}
-StoreStatus(argp)
- char **argp;
+afs_int32 StoreStatus(char **argp)
{
struct afsStoreStatus InStatus;
struct afsFetchStatus OutStatus;
}
-StoreACL(argp)
- char **argp;
+afs_int32 StoreACL(char **argp)
{
struct afsFetchStatus OutStatus;
struct afsACL AccessList;
}
-RemoveFile(argp)
- char **argp;
+afs_int32 RemoveFile(char **argp)
{
struct afsFetchStatus OutDirStatus, OutFidStatus;
struct afsVolSync tsync;
}
-CreateFile(argp)
- char **argp;
+afs_int32 CreateFile(char **argp)
{
struct afsFetchStatus OutDirStatus, OutFidStatus;
struct afsStoreStatus InStatus;
}
-Rename(argp)
- char **argp;
+afs_int32 Rename(char **argp)
{
struct afsFetchStatus OutOldDirStatus, OutNewDirStatus;
struct afsFetchStatus OutOldFileStatus, OutNewFileStatus;
}
-Symlink(argp)
- char **argp;
+afs_int32 Symlink(char **argp)
{
struct afsFetchStatus OutDirStatus, OutFidStatus;
struct afsStoreStatus InStatus;
}
-HardLink(argp)
- char **argp;
+afs_int32 HardLink(char **argp)
{
struct afsFetchStatus OutDirStatus, OutFidStatus;
struct afsVolSync tsync;
}
-MakeDir(argp)
- char **argp;
+afs_int32 MakeDir(char **argp)
{
struct afsFetchStatus OutDirStatus, OutFidStatus;
struct afsStoreStatus InStatus;
}
-RemoveDir(argp)
- char **argp;
+afs_int32 RemoveDir(char **argp)
{
struct afsFetchStatus OutDirStatus;
struct afsVolSync tsync;
}
-Readdir(argp)
- char **argp;
+afs_int32 Readdir(char **argp)
{
struct afsFetchStatus OutDirStatus;
struct afsVolSync tsync;
}
-static FetchDir(acall)
- register struct rx_call *acall;
+static afs_int32 FetchDir(register struct rx_call *acall)
{
extern char *malloc();
register char *tbuffer;
}
-Lookup(argp)
- char **argp;
+afs_int32 Lookup(char **argp)
{
struct afsFetchStatus OutDirStatus, OutFidStatus;
struct afsVolSync tsync;
}
-GetToken(argp)
- char **argp;
+afs_int32 GetToken(char **argp)
{
struct afsFetchStatus OutStatus;
struct afsVolSync tsync;
}
-MakeMountPoint(argp)
-char **argp;
+afs_int32 MakeMountPoint(char **argp)
{ }
-ReleaseTokens(argp)
-char **argp;
+afs_int32 ReleaseTokens(char **argp)
{ }
-BulkStatus(argp)
-char **argp;
+afs_int32 BulkStatus(char **argp)
{ }
/* printf("ka <vol.l> <vnode> <unique> <isExec> <kaTime>\n"); */
-KeepAlive(argp)
- char **argp;
+afs_int32 KeepAlive(char **argp)
{
struct afsBulkFEX fex;
afs_uint32 numExec, spare4;
code = ubik_Call(AFS_BulkKeepAlive, cstruct, 0, &fex, numExec, 0, 0, 0, &spare4);
return (code);
}
-#endif /* notfdef */
+#endif /* notdef */
afs_int32 lpErrno, lpCount;
/* returns 0 on success, errno on failure */
-int ReallyRead (file, block, data)
-DirHandle * file;
-afs_size_t block;
-char * data;
+int ReallyRead (DirHandle *file, afs_size_t block, char *data)
{
int code;
FdHandle_t *fdP;
}
/* returns 0 on success, errno on failure */
-int ReallyWrite (file, block, data)
-DirHandle * file;
-afs_size_t block;
-char * data;
+int ReallyWrite (DirHandle *file, afs_size_t block, char *data)
{
afs_int32 count;
FdHandle_t *fdP;
}
-SetDirHandle(dir, vnode)
-register DirHandle *dir;
-register Vnode *vnode;
+void SetDirHandle(register DirHandle *dir, register Vnode *vnode)
{
register Volume *vp = vnode->volumePtr;
register IHandle_t *h;
dir->dirh_handle = h;
}
-FidZap (file)
-DirHandle * file;
+void FidZap(DirHandle *file)
{
IH_RELEASE(file->dirh_handle);
memset((char *)file, 0, sizeof(DirHandle));
}
-FidZero (file)
-DirHandle * file;
-
+void FidZero(DirHandle *file)
{
memset((char *)file, 0, sizeof(DirHandle));
}
-FidEq (afile, bfile)
-DirHandle * afile;
-DirHandle * bfile;
-
+int FidEq(DirHandle *afile, DirHandle *bfile)
{
if (afile->dirh_ino != bfile->dirh_ino) return 0;
if (afile->dirh_dev != bfile->dirh_dev) return 0;
return 1;
}
-FidVolEq (afile, vid)
-DirHandle * afile;
-afs_int32 vid;
-
+int FidVolEq(DirHandle *afile, afs_int32 vid)
{
if (afile->dirh_vid != vid) return 0;
return 1;
}
-FidCpy (tofile, fromfile)
-DirHandle * tofile;
-DirHandle * fromfile;
-
+int FidCpy(DirHandle *tofile, DirHandle *fromfile)
{
*tofile = *fromfile;
IH_COPY(tofile->dirh_handle, fromfile->dirh_handle);
int ProfileToggle();
/* Arrange to start and stop profiling when signo is sent. */
-ProfileSig(signo)
- int signo;
+void ProfileSig(int signo)
{
#if !defined (AFS_AIX_ENV) && !defined (AFS_HPUX_ENV)
/* Soon should handle aix profiling */
return 0;
}
-#if 0
-static int AddrsEqual(cnt, addr1, addr2)
- int cnt;
- afs_int32 *addr1, *addr2;
-{
- register int i, j;
-
- for (i = 0; i < cnt; i++) {
- for (j = 0; j < cnt; j++) {
- if (addr1[i] == addr2[j]) break;
- }
- if (j == cnt) return 0;
- }
- return 1;
-}
-#endif
-
-afs_int32
-InitVL() {
+afs_int32 InitVL() {
int (*old)();
afs_int32 code;
afs_int32 cnt, i;
void CloneVolume();
void CloneVolume_r();
-static ci_AddItem(ah, aino)
-Inode aino;
-struct clone_head *ah; {
+static int ci_AddItem(struct clone_head *ah, Inode aino)
+{
register struct clone_items *ti;
/* if no last elt (first call) or last item full, get a new one */
return 0;
}
-static IDecProc(adata, aparm)
-Inode adata;
-struct clone_rock *aparm; {
+static int IDecProc(Inode adata, struct clone_rock *aparm)
+{
IH_DEC(aparm->h, adata, aparm->vol);
DOPOLL;
return 0;
}
-afs_int32 DoCloneIndex(rwvp, clvp, class, reclone)
- Volume *rwvp; /* The RW volume */
- Volume *clvp; /* The cloned volume */
- VnodeClass class;
- int reclone; /* Whether to reclone or not */
+afs_int32 DoCloneIndex(Volume *rwvp, Volume *clvp,
+ VnodeClass class, int reclone)
{
afs_int32 code, error=0;
FdHandle_t *rwFd=0, *clFdIn=0, *clFdOut=0;
}
void
-CloneVolume(error, original, new, old)
- Error *error;
- Volume *original, *new, *old;
+CloneVolume(Error *error, Volume *original, Volume *new, Volume *old)
{
VOL_LOCK
CloneVolume_r(error, original, new, old);
}
void
-CloneVolume_r(rerror, original, new, old)
- Error *rerror;
- Volume *original, *new, *old;
+CloneVolume_r(Error *rerror, Volume *original, Volume *new, Volume *old)
{
afs_int32 code, error=0;
afs_int32 reclone;
/* ensure that we don't have a "/" instead of a "/dev/rxd0a" type of device.
* returns pointer to static storage; copy it out quickly!
*/
-char *vol_DevName(adev, wpath)
-char *wpath;
-dev_t adev; {
+char *vol_DevName(dev_t adev, char *wpath)
+{
static char pbuffer[128];
char pbuf[128], *ptr;
int code, i;
return NULL;
}
}
-#ifndef AFS_AIX_ENV
#ifdef AFS_SUN5_ENV
(void) fclose(mntfile);
#else
#if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_LINUX22_ENV)
endmntent(mfd);
#else
+#ifndef AFS_AIX_ENV
endfsent();
#endif
-#endif /* AFS_SGI_ENV */
#endif
+#endif /* AFS_SGI_ENV */
return NULL;
}
-
/* Search for the raw device name. Will put an "r" in front of each
* directory and file entry of the pathname until we find a character
* device.
*/
-char *afs_rawname(devfile)
- char *devfile;
+char *afs_rawname(char *devfile)
{
static char rawname[100];
struct stat statbuf;
#endif /* AFS_PTHREAD_ENV */
}
-static int getport(addr)
- struct sockaddr_in *addr;
+static int getport(struct sockaddr_in *addr)
{
int sd;
}
}
-static void FSYNC_newconnection(afd)
- int afd;
+static void FSYNC_newconnection(int afd)
{
struct sockaddr_in other;
int junk, fd;
*/
afs_int32 FS_cnt = 0;
-static void FSYNC_com(fd)
- int fd;
+static void FSYNC_com(int fd)
{
byte rc = FSYNC_OK;
int n, i;
#endif
}
-static void FSYNC_Drop(fd)
- int fd;
+static void FSYNC_Drop(int fd)
{
struct offlineInfo *p;
register i;
ReleaseReadLock(&FSYNC_handler_lock);
}
-static int AddHandler (afd, aproc)
- int afd;
- int (*aproc)();
+static int AddHandler (int afd, int (*aproc)())
{
register int i;
ObtainWriteLock(&FSYNC_handler_lock);
return 1;
}
-static int FindHandler (afd)
- register int afd;
+static int FindHandler(register int afd)
{
register int i;
ObtainReadLock(&FSYNC_handler_lock);
return -1; /* satisfy compiler */
}
-static int FindHandler_r (afd)
- register int afd;
+static int FindHandler_r(register int afd)
{
register int i;
for(i=0;i<MAXHANDLERS;i++)
return -1; /* satisfy compiler */
}
-static int RemoveHandler (afd)
- register int afd;
+static int RemoveHandler(register int afd)
{
ObtainWriteLock(&FSYNC_handler_lock);
HandlerFD[FindHandler_r(afd)] = -1;
return 1;
}
-static void GetHandler (fd_set *fdsetp, int *maxfdp)
+static void GetHandler(fd_set *fdsetp, int *maxfdp)
{
register int i;
register int maxfd = -1;
#include "AFS_component_version_number.c"
-main(argc,argv)
-char **argv;
+int main(int argc, char **argv)
{
int error=0;
struct stat status;
#endif /* AFS_NT40_ENV || AFS_NAMEI_ENV */
}
-Perror(err, a1, a2, a3)
- char *err;
+void Perror(char *err, int a1, int a2, int a3)
{
- char msg[200];
- sprintf(msg, err, a1, a2, a3);
- perror(msg);
+ char msg[200];
+ sprintf(msg, err, a1, a2, a3);
+ perror(msg);
}
* -1 - Unable to read the inodes.
* -2 - Unable to completely write temp file. Produces warning message in log.
*/
-ListViceInodes(devname, mountedOn, resultFile, judgeInode, judgeParam, forcep, forceR, wpath)
-char *devname, *mountedOn, *resultFile, *wpath;
-int (*judgeInode)();
-int *forcep, forceR;
+int
+ListViceInodes(char *devname, char *mountedOn, char *resultFile,
+ int (*judgeInode)(), int judgeParam, int *forcep, int forceR,
+ char *wpath)
{
Log("ListViceInodes not implemented for this platform!\n");
return -1;
struct dinode *ginode();
-
-ListViceInodes(devname, mountedOn, resultFile, judgeInode, judgeParam, forcep, forceR, wpath)
-char *devname, *mountedOn, *resultFile, *wpath;
-int (*judgeInode)();
-int *forcep, forceR; {
+int
+ListViceInodes(char *devname, char *mountedOn, char *resultFile,
+ int (*judgeInode)(), int judgeParam, int *forcep, int forceR,
+ char *wpath)
+{
FILE *inodeFile = NULL;
char dev[50], rdev[51];
struct stat status;
int
-efs_ListViceInodes(devname, mountedOn, resultFile, judgeInode, judgeParam,
- forcep, forceR, wpath)
-char *devname, *mountedOn, *resultFile, *wpath;
-int (*judgeInode)();
-int *forcep, forceR;
+efs_ListViceInodes(char *devname, char *mountedOn, char *resultFile,
+ int (*judgeInode)(), int judgeParam, int *forcep, int forceR,
+ char *wpath)
{
FILE *inodeFile = NULL;
char dev[50], rdev[51];
}
-xfs_ListViceInodes(devname, mountedOn, resultFile, judgeInode, judgeParam,
- forcep, forceR, wpath)
-char *devname, *mountedOn, *resultFile, *wpath;
-int (*judgeInode)();
-int *forcep, forceR;
+int
+xfs_ListViceInodes(char *devname, char *mountedOn, char *resultFile,
+ int (*judgeInode)(), int judgeParam, int *forcep, int forceR,
+ char *wpath)
{
FILE *inodeFile = NULL;
i_list_inode_t info;
#endif
-ListViceInodes(devname, mountedOn, resultFile, judgeInode, judgeParam, forcep,
- forceR, wpath)
-char *devname, *mountedOn, *resultFile, *wpath;
-int (*judgeInode)();
-int *forcep, forceR;
+int
+ListViceInodes(char *devname, char *mountedOn, char *resultFile,
+ int (*judgeInode)(), int judgeParam, int *forcep, int forceR,
+ char *wpath)
{
FILE *inodeFile = NULL;
char dev[50], rdev[51];
#endif /* AFS_HPUX_ENV */
extern char *afs_rawname();
-int ListViceInodes(devname, mountedOn, resultFile, judgeInode, judgeParam, forcep, forceR, wpath)
- char *devname, *mountedOn, *resultFile, *wpath;
- int (*judgeInode)(), *forcep, forceR;
+int
+ListViceInodes(char *devname, char *mountedOn, char *resultFile,
+ int (*judgeInode)(), int judgeParam, int *forcep, int forceR,
+ char *wpath)
{
union {
#ifdef AFS_AIX_ENV
#define dbtob(db) ((unsigned)(db) << DEV_BSHIFT)
#endif
-int bread(fd, buf, blk, size)
- int fd;
- char *buf;
- daddr_t blk;
- afs_int32 size;
+int bread(int fd, char *buf, daddr_t blk, afs_int32 size)
{
#ifdef AFS_AIX_ENV
#ifdef AFS_AIX41_ENV
* is the volume ID. Returns true if we should keep this inode, otherwise false.
* Note that ainfo->u.param[0] is always the volume ID, for any vice inode.
*/
-static NukeProc(ainfo, avolid)
-struct ViceInodeInfo *ainfo;
-afs_int32 avolid; {
+static int NukeProc(struct ViceInodeInfo *ainfo, afs_int32 avolid)
+{
struct ilist *ti;
register afs_int32 i;
* cloned from that RW volume ID, too, since everything except for their
* indices will be gone.
*/
-nuke(aname, avolid)
-char *aname;
-afs_int32 avolid; {
+int nuke(char *aname, afs_int32 avolid)
+{
/* first process the partition containing this junk */
struct stat tstat;
struct ilist *ti, *ni;
*
* Use partition name as devname.
*/
-int VCheckPartition(part, devname)
- char *part;
- char *devname;
+int VCheckPartition(char *part, char *devname)
{
#ifdef AFS_LARGEFILE_ENV
struct stat64 status;
* mounted partition (return value 0). For non-NAMEI environments, it
* always returns 0.
*/
-static int VIsAlwaysAttach(part)
- char *part;
+static int VIsAlwaysAttach(char *part)
{
#ifdef AFS_NAMEI_ENV
struct stat st;
* (This function was grabbed from df.c)
*/
int
-getmount(vmountpp)
-register struct vmount **vmountpp; /* place to tell where buffer is */
+getmount(register struct vmount **vmountpp)
{
int size;
register struct vmount *vm;
#include "afs/dir.h"
/* returns 0 on success, errno on failure */
-int ReallyRead (file, block, data)
-DirHandle * file;
-afs_size_t block;
-char * data;
+int ReallyRead(DirHandle *file, afs_size_t block, char *data)
{
FdHandle_t *fdP;
int code;
}
/* returns 0 on success, errno on failure */
-int ReallyWrite (file, block, data)
-DirHandle * file;
-afs_size_t block;
-char * data;
+int ReallyWrite(DirHandle *file, afs_size_t block, char *data)
{
FdHandle_t *fdP;
extern int VolumeChanged;
* Create a handle to a directory entry and reference it (IH_INIT).
* The handle needs to be dereferenced with the FidZap() routine.
*/
-SetSalvageDirHandle(dir, volume, device, inode)
-DirHandle *dir;
-afs_int32 volume;
-Inode inode;
-Device device;
+void SetSalvageDirHandle(DirHandle *dir, afs_int32 volume, Device device,
+ Inode inode)
{
static SalvageCacheCheck = 1;
memset(dir, 0, sizeof(DirHandle));
dir->dirh_cacheCheck = SalvageCacheCheck++;
}
-FidZap (file)
-DirHandle * file;
+void FidZap(DirHandle *file)
{
IH_RELEASE(file->dirh_handle);
memset(file, 0, sizeof(DirHandle));
}
-FidZero (file)
-DirHandle * file;
-
+void FidZero(DirHandle *file)
{
memset(file, 0, sizeof(DirHandle));
}
-FidEq (afile, bfile)
-DirHandle * afile;
-DirHandle * bfile;
-
+int FidEq(DirHandle *afile, DirHandle *bfile)
{
if (afile->dirh_volume != bfile->dirh_volume) return 0;
if (afile->dirh_device != bfile->dirh_device) return 0;
return 1;
}
-FidVolEq (afile, vid)
-DirHandle * afile;
-afs_int32 vid;
-
+int FidVolEq(DirHandle *afile, afs_int32 vid)
{
if (afile->dirh_volume != vid) return 0;
return 1;
}
-FidCpy (tofile, fromfile)
-DirHandle * tofile;
-DirHandle * fromfile;
-
+void FidCpy(DirHandle *tofile, DirHandle *fromfile)
{
*tofile = *fromfile;
IH_COPY(tofile->dirh_handle, fromfile->dirh_handle);
}
-Die (msg)
-char * msg;
-
+void Die(char *msg)
{
printf("%s\n",msg);
assert(1==2);
things work and we should be called again, 1 if success full and done, and -1
if an error occurred. It adjusts offset appropriately on 0 or 1 return codes,
and otherwise doesn't touch it */
-static ObliterateRegion(avp, aclass, afile, aoffset)
-afs_int32 *aoffset;
-StreamHandle_t *afile;
-VnodeClass aclass;
-Volume *avp; {
+static int ObliterateRegion(Volume *avp, VnodeClass aclass,
+ StreamHandle_t *afile, afs_int32 *aoffset)
+{
register struct VnodeClassInfo *vcp;
Inode inodes[MAXOBLITATONCE];
register afs_int32 iindex, nscanned;
IH_DEC(V_linkHandle(vp), vp->linkHandle->ih_ino, V_parentId(vp));
#endif
}
-
-
/* Code to invalidate a vnode entry. Called when we've damaged a vnode, and want
to prevent future VGetVnode's from applying to it. Leaves it in the same hash bucket
but that shouldn't be important. */
-VInvalidateVnode_r(avnode)
-register struct Vnode *avnode; {
+void VInvalidateVnode_r(register struct Vnode *avnode)
+{
avnode->changed_newTime = 0; /* don't let it get flushed out again */
avnode->changed_oldTime = 0;
avnode->delete = 0; /* it isn't deleted, erally */
}
/* Not normally called by general client; called by volume.c */
-VInitVnodes(class,nVnodes)
- VnodeClass class;
- int nVnodes;
+int VInitVnodes(VnodeClass class, int nVnodes)
{
byte *va;
register struct VnodeClassInfo *vcp = &VnodeClassInfo[class];