struct afs_FSStats afs_fsstats;
-void ResetDebug(), SetDebug(), Terminate();
-
int LogLevel = 0;
int supported = 1;
int Console = 0;
int retry_flag = 1;
int code = 0;
char hoststr[16], hoststr2[16];
+#ifdef AFS_PTHREAD_ENV
struct ubik_client *uclient;
-
+#endif
*ahostp = NULL;
if (!tconn) {
static afs_int32
CheckVnode(AFSFid * fid, Volume ** volptr, Vnode ** vptr, int lock)
{
- int fileCode = 0;
- afs_int32 local_errorCode, errorCode = -1;
+ Error fileCode = 0;
+ Error local_errorCode, errorCode = -1;
static struct timeval restartedat = { 0, 0 };
if (fid->Volume == 0 || fid->Vnode == 0) /* not: || fid->Unique == 0) */
assert(Fid != 0);
while (1) {
VnodeId parentvnode;
- int errorCode = 0;
+ Error errorCode = 0;
parentvnode = (*targetptr)->disk.parent;
VPutVnode(&errorCode, *targetptr);
{
struct acl_accessList *aCL; /* Internal access List */
int aCLSize; /* size of the access list */
- int errorCode = 0; /* return code to caller */
+ Error errorCode = 0; /* return code to caller */
if ((errorCode = CheckVnode(Fid, volptr, targetptr, locktype)))
return (errorCode);
PutVolumePackage(Vnode * parentwhentargetnotdir, Vnode * targetptr,
Vnode * parentptr, Volume * volptr, struct client **client)
{
- int fileCode = 0; /* Error code returned by the volume package */
+ Error fileCode = 0; /* Error code returned by the volume package */
if (parentwhentargetnotdir) {
VPutVnode(&fileCode, parentwhentargetnotdir);
afs_int32 rights, int CallingRoutine,
AFSStoreStatus * InStatus)
{
- int errorCode = 0;
+ Error errorCode = 0;
#define OWNSp(client, target) ((client)->ViceId == (target)->disk.owner)
#define CHOWN(i,t) (((i)->Mask & AFS_SETOWNER) &&((i)->Owner != (t)->disk.owner))
#define CHGRP(i,t) (((i)->Mask & AFS_SETGROUP) &&((i)->Group != (t)->disk.group))
* error code indicates that the disk is full, we roll-back to
* the initial state.
*/
- if ((rdlen != length) || (wrlen != length))
+ if ((rdlen != length) || (wrlen != length)) {
if ((wrlen < 0) && (errno == ENOSPC)) { /* disk full */
ViceLog(0,
("CopyOnWrite failed: Partition %s containing volume %u is full\n",
VTakeOffline(volptr);
return EIO;
}
+ }
#ifndef AFS_PTHREAD_ENV
IOMGR_Poll();
#endif /* !AFS_PTHREAD_ENV */
DirHandle * dir, AFSFid * fileFid, char *Name, int ChkForDir)
{
DirHandle childdir; /* Handle for dir package I/O */
- int errorCode = 0;
+ Error errorCode = 0;
int code;
/* watch for invalid names */
{
afs_fsize_t newlength; /* Holds new directory length */
afs_fsize_t parentLength;
- int errorCode;
+ Error errorCode;
#if FS_STATS_DETAILED
Date currDate; /*Current date */
int writeIdx; /*Write index to bump */
AdjustDiskUsage(Volume * volptr, afs_sfsize_t length,
afs_sfsize_t checkLength)
{
- int rc;
- int nc;
+ Error rc;
+ Error nc;
VAdjustDiskUsage(&rc, volptr, length, checkLength);
if (rc) {
Vnode ** targetptr, char *Name, struct AFSFid *OutFid,
int FileType, afs_sfsize_t BlocksPreallocatedForVnode)
{
- int errorCode = 0; /* Error code returned back */
- int temp;
+ Error errorCode = 0; /* Error code returned back */
+ Error temp;
Inode inode = 0;
Inode nearInode; /* hint for inode allocation in solaris */
struct FsCmdOutputs * Outputs)
{
afs_int32 code = 0;
- struct AFSCallBack callback;
- struct AFSVolSync sync;
switch (Inputs->command) {
default:
Vnode *targetptr = 0; /* pointer to vnode to fetch */
Vnode *parentwhentargetnotdir = 0; /* parent vnode if vptr is a file */
Vnode tparentwhentargetnotdir; /* parent vnode for GetStatus */
- int errorCode = 0; /* return code to caller */
- int fileCode = 0; /* return code from vol package */
+ Error errorCode = 0; /* return code to caller */
+ Error fileCode = 0; /* return code from vol package */
Volume *volptr = 0; /* pointer to the volume */
struct client *client = 0; /* pointer to the client data */
struct rx_connection *tcon; /* the connection we're part of */
{
Vnode *targetptr = 0; /* pointer to vnode to fetch */
Vnode *parentwhentargetnotdir = 0; /* parent vnode if targetptr is a file */
- int errorCode = 0; /* return error code to caller */
+ Error errorCode = 0; /* return error code to caller */
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 */
{
Vnode *targetptr = 0; /* pointer to vnode to fetch */
Vnode *parentwhentargetnotdir = 0; /* parent vnode if targetptr is a file */
- int errorCode = 0; /* return code to caller */
+ Error errorCode = 0; /* return code to caller */
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 */
afs_int32 nfiles;
Vnode *targetptr = 0; /* pointer to vnode to fetch */
Vnode *parentwhentargetnotdir = 0; /* parent vnode if targetptr is a file */
- int errorCode = 0; /* return code to caller */
+ Error errorCode = 0; /* return code to caller */
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 */
afs_int32 nfiles;
Vnode *targetptr = 0; /* pointer to vnode to fetch */
Vnode *parentwhentargetnotdir = 0; /* parent vnode if targetptr is a file */
- int errorCode = 0; /* return code to caller */
+ Error errorCode = 0; /* return code to caller */
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 */
Vnode *targetptr = 0; /* pointer to input fid */
Vnode *parentwhentargetnotdir = 0; /* parent of Fid to get ACL */
Vnode tparentwhentargetnotdir; /* parent vnode for GetStatus */
- int errorCode = 0; /* return code for caller */
- int fileCode = 0; /* return code from vol package */
+ Error errorCode = 0; /* return code for caller */
+ Error fileCode = 0; /* return code from vol package */
Volume *volptr = 0; /* pointer to the volume header */
struct client *client = 0; /* pointer to client structure */
afs_int32 rights, anyrights; /* rights for this and any user */
{
Vnode *targetptr = 0; /* pointer to input fid */
Vnode *parentwhentargetnotdir = 0; /* parent of Fid to get ACL */
- int errorCode = 0; /* return code for caller */
+ Error errorCode = 0; /* return code for caller */
struct AFSStoreStatus InStatus; /* Input status for fid */
Volume *volptr = 0; /* pointer to the volume header */
struct client *client = 0; /* pointer to client structure */
{
Vnode *targetptr = 0; /* pointer to input fid */
Vnode *parentwhentargetnotdir = 0; /* parent of Fid to get ACL */
- int errorCode = 0; /* return code for caller */
+ Error errorCode = 0; /* return code for caller */
Volume *volptr = 0; /* pointer to the volume header */
struct client *client = 0; /* pointer to client structure */
afs_int32 rights, anyrights; /* rights for this and any user */
Vnode *targetptr = 0; /* file to be deleted */
Volume *volptr = 0; /* pointer to the volume header */
AFSFid fileFid; /* area for Fid from the directory */
- int errorCode = 0; /* error code */
+ Error errorCode = 0; /* error code */
DirHandle dir; /* Handle for dir package I/O */
struct client *client = 0; /* pointer to client structure */
afs_int32 rights, anyrights; /* rights for this and any user */
Vnode *targetptr = 0; /* vnode of the new file */
Vnode *parentwhentargetnotdir = 0; /* parent for use in SetAccessList */
Volume *volptr = 0; /* pointer to the volume header */
- int errorCode = 0; /* error code */
+ Error errorCode = 0; /* error code */
DirHandle dir; /* Handle for dir package I/O */
struct client *client = 0; /* pointer to client structure */
afs_int32 rights, anyrights; /* rights for this and any user */
Vnode *newfileptr = 0; /* vnode of the file to delete */
Vnode *testvptr = 0; /* used in directory tree walk */
Vnode *parent = 0; /* parent for use in SetAccessList */
- int errorCode = 0; /* error code */
- int fileCode = 0; /* used when writing Vnodes */
+ Error errorCode = 0; /* error code */
+ Error fileCode = 0; /* used when writing Vnodes */
VnodeId testnode; /* used in directory tree walk */
AFSFid fileFid; /* Fid of file to move */
AFSFid newFileFid; /* Fid of new file */
Vnode *parentptr = 0; /* vnode of input Directory */
Vnode *targetptr = 0; /* vnode of the new link */
Vnode *parentwhentargetnotdir = 0; /* parent for use in SetAccessList */
- int errorCode = 0; /* error code */
+ Error errorCode = 0; /* error code */
int len, code = 0;
DirHandle dir; /* Handle for dir package I/O */
Volume *volptr = 0; /* pointer to the volume header */
afs_int32
-SRXAFS_Symlink(acall, DirFid, Name, LinkContents, InStatus, OutFid,
- OutFidStatus, OutDirStatus, Sync)
- struct AFSVolSync *Sync;
- struct rx_call *acall; /* Rx call */
- struct AFSFid *DirFid; /* Parent dir's fid */
- char *Name; /* File name to create */
- char *LinkContents; /* Contents of the new created file */
- struct AFSStoreStatus *InStatus; /* Input status for the new symbolic link */
- struct AFSFid *OutFid; /* Fid for newly created symbolic link */
- struct AFSFetchStatus *OutFidStatus; /* Output status for new symbolic link */
- struct AFSFetchStatus *OutDirStatus; /* Output status for parent dir */
-
+SRXAFS_Symlink(struct rx_call *acall, /* Rx call */
+ struct AFSFid *DirFid, /* Parent dir's fid */
+ char *Name, /* File name to create */
+ char *LinkContents, /* Contents of the new created file */
+ struct AFSStoreStatus *InStatus, /* Input status for the new symbolic link */
+ struct AFSFid *OutFid, /* Fid for newly created symbolic link */
+ struct AFSFetchStatus *OutFidStatus, /* Output status for new symbolic link */
+ struct AFSFetchStatus *OutDirStatus, /* Output status for parent dir */
+ struct AFSVolSync *Sync)
{
afs_int32 code;
struct rx_connection *tcon;
Vnode *targetptr = 0; /* vnode of the new file */
Vnode *parentwhentargetnotdir = 0; /* parent for use in SetAccessList */
Volume *volptr = 0; /* pointer to the volume header */
- int errorCode = 0; /* error code */
+ Error errorCode = 0; /* error code */
DirHandle dir; /* Handle for dir package I/O */
struct client *client = 0; /* pointer to client structure */
afs_int32 rights, anyrights; /* rights for this and any user */
Vnode *targetptr = 0; /* vnode of the new file */
Vnode *parentwhentargetnotdir = 0; /* parent for use in SetAccessList */
Volume *volptr = 0; /* pointer to the volume header */
- int errorCode = 0; /* error code */
+ Error errorCode = 0; /* error code */
struct acl_accessList *newACL; /* Access list */
int newACLSize; /* Size of access list */
DirHandle dir; /* Handle for dir package I/O */
Vnode *parentwhentargetnotdir = 0; /* parent for use in SetAccessList */
Vnode *targetptr = 0; /* file to be deleted */
AFSFid fileFid; /* area for Fid from the directory */
- int errorCode = 0; /* error code */
+ Error errorCode = 0; /* error code */
DirHandle dir; /* Handle for dir package I/O */
Volume *volptr = 0; /* pointer to the volume header */
struct client *client = 0; /* pointer to client structure */
{
Vnode *targetptr = 0; /* vnode of input file */
Vnode *parentwhentargetnotdir = 0; /* parent for use in SetAccessList */
- int errorCode = 0; /* error code */
+ Error errorCode = 0; /* error code */
Volume *volptr = 0; /* pointer to the volume header */
struct client *client = 0; /* pointer to client structure */
afs_int32 rights, anyrights; /* rights for this and any user */
{
Vnode *targetptr = 0; /* vnode of input file */
Vnode *parentwhentargetnotdir = 0; /* parent for use in SetAccessList */
- int errorCode = 0; /* error code */
+ Error errorCode = 0; /* error code */
Volume *volptr = 0; /* pointer to the volume header */
struct client *client = 0; /* pointer to client structure */
afs_int32 rights, anyrights; /* rights for this and any user */
{
Vnode *targetptr = 0; /* vnode of input file */
Vnode *parentwhentargetnotdir = 0; /* parent for use in SetAccessList */
- int errorCode = 0; /* error code */
+ Error errorCode = 0; /* error code */
Volume *volptr = 0; /* pointer to the volume header */
struct client *client = 0; /* pointer to client structure */
afs_int32 rights, anyrights; /* rights for this and any user */
afs_int32 code;
struct rx_connection *tcon;
struct host *thost;
- afs_int32 *dataBuffP;
+ afs_uint32 *dataBuffP;
afs_int32 dataBytes;
FS_LOCK;
goto Bad_GetCaps;
dataBytes = 1 * sizeof(afs_int32);
- dataBuffP = (afs_int32 *) malloc(dataBytes);
+ dataBuffP = (afs_uint32 *) malloc(dataBytes);
dataBuffP[0] = VICED_CAPABILITY_ERRORTRANS | VICED_CAPABILITY_WRITELOCKACL;
#if defined(AFS_64BIT_ENV) && defined(AFS_LARGEFILE_ENV)
dataBuffP[0] |= VICED_CAPABILITY_64BITFILES;
int i;
afs_int32 nids, naddrs;
afs_int32 *vd, *addr;
- int errorCode = 0; /* return code to caller */
+ Error errorCode = 0; /* return code to caller */
struct client *client = 0;
struct rx_connection *tcon = rx_ConnectionOf(acall);
{
Vnode *targetptr = 0; /* vnode of the new file */
Vnode *parentwhentargetnotdir = 0; /* vnode of parent */
- int errorCode = 0; /* error code */
+ Error errorCode = 0; /* error code */
Volume *volptr = 0; /* pointer to the volume header */
struct client *client = 0; /* pointer to client entry */
afs_int32 rights, anyrights; /* rights for this and any user */
{
Vnode *targetptr = 0; /* vnode of the new file */
Vnode *parentwhentargetnotdir = 0; /* vnode of parent */
- int errorCode = 0; /* error code */
+ Error errorCode = 0; /* error code */
Volume *volptr = 0; /* pointer to the volume header */
struct client *client = 0; /* pointer to client entry */
afs_int32 rights, anyrights; /* rights for this and any user */
char *temp;
struct rx_connection *tcon;
struct host *thost;
+ Error errorCode = 0;
#endif
- int errorCode = 0;
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime; /* Start time for RPC op */
)
{
struct timeval StartTime, StopTime; /* used to calculate file transfer rates */
- int errorCode = 0; /* Returned error code to caller */
+ Error errorCode = 0; /* Returned error code to caller */
IHandle_t *ihP;
FdHandle_t *fdP;
#ifdef AFS_NT40_ENV
{
afs_sfsize_t bytesTransfered; /* number of bytes actually transfered */
struct timeval StartTime, StopTime; /* Used to measure how long the store takes */
- int errorCode = 0; /* Returned error code to caller */
+ Error errorCode = 0; /* Returned error code to caller */
#ifdef AFS_NT40_ENV
register char *tbuffer; /* data copying buffer */
#else /* AFS_NT40_ENV */
struct rx_connection *conn;
#endif
- if (errorCode = CallPreamble(acall, ACTIVECALL, &tcon, &tcallhost))
+ if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon, &tcallhost)))
goto Bad_CallBackRxConnAddr1;
#ifndef __EXPERIMENTAL_CALLBACK_CONN_MOVING
#include <afs/ptuser.h>
#include <afs/audit.h>
#include <afs/partition.h>
+#include <afs/dir.h>
#ifndef AFS_NT40_ENV
#include <afs/netutils.h>
#endif
#include "sys/lock.h"
#endif
#include <rx/rx_globals.h>
+#include <rx/rxstat_prototypes.h>
#ifdef O_LARGEFILE
#define afs_stat stat64
#define afs_fopen fopen
#endif /* !O_LARGEFILE */
-extern int BreakVolumeCallBacks(), InitCallBack();
-extern int BreakVolumeCallBacks(), InitCallBack(), BreakLaterCallBacks();
-extern int BreakVolumeCallBacksLater();
-extern int LogLevel, etext;
-extern afs_int32 BlocksSpare, PctSpare;
+extern int etext;
void *ShutDown(void *);
-static void ClearXStatValues(), NewParms(), PrintCounters();
-static void ResetCheckDescriptors(void), ResetCheckSignal(void);
+static void ClearXStatValues(void);
+static void NewParms(int);
+static void PrintCounters(void);
+static void ResetCheckDescriptors(void);
+static void ResetCheckSignal(void);
static void *CheckSignal(void *);
-extern int GetKeysFromToken();
-extern int RXAFS_ExecuteRequest();
-extern int RXSTATS_ExecuteRequest();
-afs_int32 Do_VLRegisterRPC();
+
+extern int RXAFS_ExecuteRequest(struct rx_call *);
+extern int RXSTATS_ExecuteRequest(struct rx_call *);
+
+static afs_int32 Do_VLRegisterRPC(void);
int eventlog = 0, rxlog = 0;
FILE *debugFile;
/* All addresses in FS_HostAddrs are in NBO */
afsUUID FS_HostUUID;
-static void FlagMsg();
+static void FlagMsg(void);
#ifdef AFS_DEMAND_ATTACH_FS
/*
#ifdef AFS_PTHREAD_ENV
void
-CheckSignal_Signal(x)
+CheckSignal_Signal(int x)
{
CheckSignal(NULL);
}
void
-ShutDown_Signal(x)
+ShutDown_Signal(int x)
{
ShutDown(NULL);
}
void
-CheckDescriptors_Signal(x)
+CheckDescriptors_Signal(int x)
{
CheckDescriptors(NULL);
}
#else /* AFS_PTHREAD_ENV */
void
-CheckSignal_Signal(x)
+CheckSignal_Signal(int x)
{
IOMGR_SoftSig(CheckSignal, 0);
}
void
-ShutDown_Signal(x)
+ShutDown_Signal(int x)
{
IOMGR_SoftSig(ShutDown, 0);
}
void
-CheckDescriptors_Signal(x)
+CheckDescriptors_Signal(int x)
{
IOMGR_SoftSig(CheckDescriptors, 0);
}
}
memcpy(akey, tkey.key, sizeof(tkey.key));
return 0;
-
} /*get_key */
#ifndef AFS_NT40_ENV
viced_syscall(afs_uint32 a3, afs_uint32 a4, void *a5)
{
afs_uint32 rcode;
- void (*old) ();
+ void (*old) (int);
#ifndef AFS_LINUX20_ENV
- old = (void (*)())signal(SIGSYS, SIG_IGN);
+ old = (void (*)(int))signal(SIGSYS, SIG_IGN);
#endif
rcode = syscall(AFS_SYSCALL, 28 /* AFSCALL_CALL */ , a3, a4, a5);
#ifndef AFS_LINUX20_ENV
char adminName[MAXADMINNAME];
static void
-CheckAdminName()
+CheckAdminName(void)
{
int fd = 0;
struct afs_stat status;
*------------------------------------------------------------------------*/
static void
-ClearXStatValues()
+ClearXStatValues(void)
{ /*ClearXStatValues */
struct fs_stats_opTimingData *opTimeP; /*Ptr to timing struct */
afs_fsize_t CopyOnWrite_maxsize = 0;
static void
-PrintCounters()
+PrintCounters(void)
{
int dirbuff, dircall, dirio;
struct timeval tpl;
static void
-FlagMsg()
+FlagMsg(void)
{
/* default supports help flag */
afs_int32
-InitPR()
+InitPR(void)
{
int code;
#define SYSIDVERSION 1
afs_int32
-ReadSysIdFile()
+ReadSysIdFile(void)
{
afs_int32 fd, nentries, i;
struct versionStamp vsn;
}
afs_int32
-WriteSysIdFile()
+WriteSysIdFile(void)
{
afs_int32 fd, i;
struct versionStamp vsn;
* and so we need to convert each of them into HBO which is what the extra
* array called FS_HostAddrs_HBO is used here.
*/
-afs_int32
-Do_VLRegisterRPC()
+static afs_int32
+Do_VLRegisterRPC(void)
{
register int code;
bulkaddrs addrs;
- extern int VL_RegisterAddrs();
afs_uint32 FS_HostAddrs_HBO[ADDRSPERSITE];
int i = 0;
}
afs_int32
-SetupVL()
+SetupVL(void)
{
afs_int32 code;
- extern int rxi_numNetAddrs;
- extern afs_uint32 rxi_NetAddrs[];
if (AFSDIR_SERVER_NETRESTRICT_FILEPATH || AFSDIR_SERVER_NETINFO_FILEPATH) {
/*
}
afs_int32
-InitVL()
+InitVL(void)
{
afs_int32 code;