afs_int32 retry; /* handle low-level SGI MP race conditions */
long volStates; /* flags from vol structure */
struct volume *volp = 0; /* volume ptr */
- struct VenusFid dotdot;
+ struct VenusFid dotdot = {0, 0, 0};
int flagIndex = 0; /* First file with bulk fetch flag set */
int inlinebulk = 0; /* Did we use InlineBulk RPC or not? */
XSTATS_DECLS;
struct bc_volumeDump *tvd; /*Ptr to new dump instance */
struct bc_volumeEntry *tve, *ctve; /*Ptr to new volume entry instance */
char patt[256]; /*Composite regex; also, target string */
- int volType; /*Type of volume that worked */
+ int volType = 0; /*Type of volume that worked */
afs_int32 index; /*Current VLDB entry index */
afs_int32 count; /*Needed by VL_ListEntry() */
afs_int32 next_index; /*Next index to list */
struct vldbentry entry; /*VLDB entry */
int srvpartpair; /*Loop counter: server/partition pair */
afs_int32 total = 0;
- int found, foundentry;
+ int found;
+ int foundentry = 0;
struct serversort *servers = 0, *ss = 0;
struct partitionsort *ps = 0;
bc_DumpCmd(struct cmd_syndesc *as, void *arock)
{ /*bc_DumpCmd */
static char rn[] = "bc_DumpCmd"; /*Routine name */
- char *dumpPath, *vsName; /*Ptrs to various names */
- struct bc_volumeSet *tvs; /*Ptr to list of generated volume info */
- struct bc_dumpSchedule *tds, *baseds; /*Ptr to dump schedule node */
+ char *dumpPath = NULL;
+ char *vsName = NULL; /*Ptrs to various names */
+ struct bc_volumeSet *tvs = NULL; /*Ptr to list of generated volume info */
+ struct bc_dumpSchedule *tds;
+ struct bc_dumpSchedule *baseds = NULL; /*Ptr to dump schedule node */
struct bc_volumeDump *tve, *volsToDump; /*Ptr to individual vols to be dumped */
struct budb_dumpEntry dumpEntry, de, fde; /* dump entry */
afs_uint32 d;
afs_int32 doAt, atTime; /* Time a timed-dump is to start at */
afs_int32 length;
char *timeString;
- int doAppend; /* Append the dump to dump set */
+ int doAppend = 0; /* Append the dump to dump set */
afs_int32 code; /* Return code */
int loadfile; /* whether to load a file or not */
int n;
int i;
int length;
- dbadr ta;
+ dbadr ta = NULL;
if ((mht == 0)
|| ((ht = mht->ht) == 0)
{
afs_int32 curChunk;
afs_uint32 totalWritten = 0;
- afs_int32 code;
+ afs_int32 code = 0;
afs_int32 headBytes, tailBytes, w;
afs_int32 taskId;
afs_int32 nbytes; /* # bytes data in last tape block read */
struct volumeHeader vh;
char trailer[12];
struct blockMark *bmark, *bmark2;
- char *data, *data2;
+ char *data;
+ char *data2 = NULL;
int count, count2;
int tlen, skip, pos;
char *data;
char *tblock;
afs_int32 code;
- struct volumeHeader *volheaderPtr;
+ struct volumeHeader *volheaderPtr = NULL;
int eod = 1;
int rc;
char *nextblock; /* We cycle through three tape blocks so we */
PROCESS pid;
#endif
struct scanTapeIf *ptr;
- statusP statusPtr;
+ statusP statusPtr = NULL;
afs_int32 code = 0;
extern afs_int32 allocTaskId();
char *writeBufPtr;
afs_int32 transferSize;
- char *readBufPtr;
+ char *readBufPtr = NULL;
afs_int32 maxReadSize;
charListT charList;
struct ViceIoctl iob;
afs_int32 pheader[6];
char tbuffer[1024];
- register afs_int32 code;
+ afs_int32 code = 0;
int index, newIndex;
char *stp; /* secret token ptr */
struct ClearToken ct;
void *bosHandle;
char dbhostName[MAXHOSTSPERCELL][BOS_MAX_NAME_LEN];
char dbhostCell[BOS_MAX_NAME_LEN];
- int dbhostCount;
+ int dbhostCount = 0;
if (!afsclient_NullCellOpen(&cellHandle, &tst2)) {
tst = tst2;
free(ctrlBlockp);
} else {
/* fill name blocks, handing each to a worker thread */
- void *nameBlockIter;
+ void *nameBlockIter = NULL;
short workersStarted = 0;
if (!NameBlockGetBegin
if (tst == 0) {
kas_identity_t afsIdentity;
kas_encryptionKey_t afsKey;
- int afsKvno;
+ int afsKvno = 0;
strcpy(afsIdentity.principal, "afs");
afsIdentity.instance[0] = '\0';
if (dirp != NULL) {
/* check that not a portition of a larger path */
- char oneBefore, oneAfter, twoAfter;
+ char oneBefore, oneAfter;
+ char twoAfter = 0;
oneBefore = *(dirp - 1);
oneAfter = *(dirp + sizeof(AFSDIR_CANONICAL_SERVER_ETC_DIRPATH) - 1);
if (dirp != NULL) {
/* check that not a portition of a larger path */
- char oneBefore, oneAfter, twoAfter;
+ char oneBefore, oneAfter;
+ char twoAfter = 0;
oneBefore = *(dirp - 1);
oneAfter = *(dirp + sizeof(AFSDIR_CANONICAL_SERVER_BIN_DIRPATH) - 1);
tst = tst2;
dbhostDone = 1;
} else {
- short isSyncSite, isWriteReady;
+ short isSyncSite = 0;
+ short isWriteReady = 0;
/* ignore errors fetching Ubik vote status; there might be
* an unreachable dbserver yet a reachable sync site.
(afs_admin_iterator_p) malloc(sizeof(afs_admin_iterator_t));
server_get_p serv = (server_get_p) calloc(1, sizeof(server_get_t));
server_get_p serv_cache = NULL;
- const char *cellName;
+ const char *cellName = NULL;
void *database_iter;
util_databaseServerEntry_t database_entry;
void *fileserver_iter;
LocalParseLine(char *aline, struct token **alist)
{
char tbuffer[256];
- register char *tptr;
+ char *tptr = NULL;
int inToken;
struct token *first, *last;
register struct token *ttok;
const char *process = NULL;
int stop = 0;
int run = 0;
- bos_ProcessExecutionState_t state;
+ bos_ProcessExecutionState_t state = 0;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
const char *process = NULL;
int stop = 0;
int run = 0;
- bos_ProcessExecutionState_t state;
+ bos_ProcessExecutionState_t state = 0;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
typedef enum { SERVER, ADMIN } DoBosAdminCreate_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
- const char *admin;
+ const char *admin = NULL;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
typedef enum { SERVER, ADMIN } DoBosAdminDelete_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
- const char *admin;
+ const char *admin = NULL;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
typedef enum { SERVER, VERSIONNUMBER, KEY } DoBosKeyCreate_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
- int version_number;
+ int version_number = 0;
kas_encryptionKey_t key = { {0, 0, 0, 0, 0, 0, 0, 0} };
const char *cell;
typedef enum { SERVER, VERSIONNUMBER } DoBosKeyDelete_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
- int version_number;
+ int version_number = 0;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
typedef enum { SERVER, CELL } DoBosCellSet_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
- const char *cell;
+ const char *cell = NULL;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
typedef enum { SERVER, HOST } DoBosHostCreate_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
- const char *host;
+ const char *host = NULL;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
typedef enum { SERVER, HOST } DoBosHostDelete_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
- const char *host;
+ const char *host = NULL;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
} DoBosExecutableRestartTimeSet_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
- bos_Restart_t type;
+ bos_Restart_t type = 0;
int have_daily = 0;
int have_weekly = 0;
bos_RestartTime_t time;
} DoBosExecutableRestartTimeGet_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
- bos_Restart_t type;
+ bos_Restart_t type = 0;
int have_daily = 0;
int have_weekly = 0;
bos_RestartTime_t restart_time;
typedef enum { SERVER, LOGFILE } DoBosLogGet_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
- const char *log_file;
+ const char *log_file = NULL;
unsigned long buf_size = INITIAL_BUF_SIZE;
char *buf = NULL;
typedef enum { SERVER, REQUIREAUTH, DISABLEAUTH } DoBosAuthSet_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
- bos_Auth_t auth;
+ bos_Auth_t auth = 0;
int have_req = 0;
int have_dis = 0;
typedef enum { SERVER, COMMAND } DoBosCommandExecute_parm_t;
afs_status_t st = 0;
void *bos_server = NULL;
- const char *command;
+ const char *command = NULL;
if (as->parms[SERVER].items) {
if (!bos_ServerOpen
CHECK
} DoClientMountPointCreate_parm_t;
afs_status_t st = 0;
- const char *directory;
- const char *volume;
+ const char *directory = NULL;
+ const char *volume = NULL;
vol_type_t vol_type = READ_ONLY;
vol_check_t vol_check = DONT_CHECK_VOLUME;
{
typedef enum { SERVER } DoClientAFSServerGet_parm_t;
afs_status_t st = 0;
- const char *server;
+ const char *server = NULL;
afs_serverEntry_t entry;
if (as->parms[SERVER].items) {
int servAddr = 0;
afs_stat_source_t type;
int srvrPort;
- int typeIsValid;
- afs_stat_type_t which;
+ int typeIsValid = 0;
+ afs_stat_type_t which = 0;
afs_RPCStatsState_t state;
if (as->parms[PROCESS].items) {
int servAddr = 0;
afs_stat_source_t type;
int srvrPort;
- int typeIsValid;
- afs_stat_type_t which;
+ int typeIsValid = 0;
+ afs_stat_type_t which = 0;
if (as->parms[PROCESS].items) {
typeIsValid =
int servAddr = 0;
afs_stat_source_t type;
int srvrPort;
- int typeIsValid;
- afs_stat_type_t which;
+ int typeIsValid = 0;
+ afs_stat_type_t which = 0;
if (as->parms[PROCESS].items) {
typeIsValid =
int servAddr = 0;
afs_stat_source_t type;
int srvrPort;
- int typeIsValid;
- afs_stat_type_t which;
+ int typeIsValid = 0;
+ afs_stat_type_t which = 0;
afs_RPCStats_t stats;
void *iter;
- int i;
+ int i = 0;
#ifdef AFS_NT40_ENV
(pthread_func_list_done
int servAddr = 0;
afs_stat_source_t type;
int srvrPort;
- int typeIsValid;
- afs_stat_type_t which;
+ int typeIsValid = 0;
+ afs_stat_type_t which = 0;
afs_RPCStatsClearFlag_t flag = 0;
int seen_all = 0;
int seen_any = 0;
afs_stat_source_t type;
int servAddr = 0;
int srvrPort;
- int typeIsValid;
+ int typeIsValid = 0;
afs_RPCStatsVersion_t version;
if (as->parms[PROCESS].items) {
{
typedef enum { VOLUME } DoVosBackupVolumeCreate_parm_t;
afs_status_t st = 0;
- unsigned int volume_id;
+ unsigned int volume_id = 0;
if (as->parms[VOLUME].items) {
const char *volume = as->parms[VOLUME].items->data;
typedef enum { SERVER, PARTITION } DoVosPartitionGet_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
- unsigned int partition_id;
+ unsigned int partition_id = 0;
vos_partitionEntry_t entry;
if (as->parms[SERVER].items) {
NEWADDRESS
} DoVosFileServerAddressChange_parm_t;
afs_status_t st = 0;
- int old_addr, new_addr;
+ int old_addr = 0;
+ int new_addr = 0;
if (as->parms[OLDADDRESS].items) {
const char *addr = as->parms[OLDADDRESS].items->data;
{
typedef enum { ADDRESS } DoVosFileServerAddressRemove_parm_t;
afs_status_t st = 0;
- int address;
+ int address = 0;
if (as->parms[ADDRESS].items) {
const char *addr = as->parms[ADDRESS].items->data;
{
typedef enum { VOLUME } DoVosVLDBEntryLoc_parm_tk;
afs_status_t st = 0;
- unsigned int volume_id;
+ unsigned int volume_id = 0;
if (as->parms[VOLUME].items) {
const char *volume = as->parms[VOLUME].items->data;
{
typedef enum { VOLUME } DoVosVLDBEntryUnlock_parm_t;
afs_status_t st = 0;
- unsigned int volume_id;
+ unsigned int volume_id = 0;
if (as->parms[VOLUME].items) {
const char *volume = as->parms[VOLUME].items->data;
} DoVosVLDBReadOnlySiteCreate_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
- unsigned int partition_id;
- unsigned int volume_id;
+ unsigned int partition_id = 0;
+ unsigned int volume_id = 0;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
} DoVosVLDBReadOnlySiteDelete_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
- unsigned int partition_id;
- unsigned int volume_id;
+ unsigned int partition_id = 0;
+ unsigned int volume_id = 0;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
} DoVosVolumeCreate_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
- unsigned int partition_id;
+ unsigned int partition_id = 0;
unsigned int volume_id;
const char *volume = NULL;
- unsigned int quota;
+ unsigned int quota = 0;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeDelete_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
- unsigned int partition_id;
- unsigned int volume_id;
+ unsigned int partition_id = 0;
+ unsigned int volume_id = 0;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
{
typedef enum { OLDVOLUME, NEWVOLUME } DoVosVolumeRename_parm_t;
afs_status_t st = 0;
- unsigned int old_volume;
- const char *new_volume;
+ unsigned int old_volume = 0;
+ const char *new_volume = 0;
if (as->parms[OLDVOLUME].items) {
const char *volume = as->parms[OLDVOLUME].items->data;
unsigned int partition_id;
unsigned int *part_ptr = NULL;
int have_server = 0;
- unsigned int volume_id;
- unsigned int start_time;
- const char *dumpfile;
+ unsigned int volume_id = 0;
+ unsigned int start_time = 0;
+ const char *dumpfile = NULL;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
} DoVosVolumeRestore_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
- unsigned int partition_id;
+ unsigned int partition_id = 0;
unsigned int volume_id;
unsigned int *vol_ptr = NULL;
- const char *dumpfile;
- const char *volume_name;
+ const char *dumpfile = NULL;
+ const char *volume_name = NULL;
vos_volumeRestoreType_t restore = VOS_RESTORE_INCREMENTAL;
if (as->parms[SERVER].items) {
} DoVosVolumeOnline_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
- unsigned int partition_id;
- unsigned int volume_id;
- unsigned int sleep;
+ unsigned int partition_id = 0;
+ unsigned int volume_id = 0;
+ unsigned int sleep = 0;
vos_volumeOnlineType_t type = VOS_ONLINE_OFFLINE;
if (as->parms[SERVER].items) {
typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeOffline_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
- unsigned int partition_id;
- unsigned int volume_id;
+ unsigned int partition_id = 0;
+ unsigned int volume_id = 0;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeGet_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
- unsigned int partition_id;
- unsigned int volume_id;
+ unsigned int partition_id = 0;
+ unsigned int volume_id = 0;
vos_volumeEntry_t entry;
if (as->parms[SERVER].items) {
afs_status_t st = 0;
void *vos_server = NULL;
void *iter = NULL;
- unsigned int partition_id;
+ unsigned int partition_id = 0;
vos_volumeEntry_t entry;
if (as->parms[SERVER].items) {
afs_status_t st = 0;
void *from_server = NULL;
void *to_server = NULL;
- unsigned int from_partition;
- unsigned int to_partition;
- unsigned int volume_id;
+ unsigned int from_partition = 0;
+ unsigned int to_partition = 0;
+ unsigned int volume_id = 0;
if (as->parms[FROMSERVER].items) {
if (!vos_ServerOpen
{
typedef enum { VOLUME, FORCE } DoVosVolumeRelease_parm_t;
afs_status_t st = 0;
- unsigned int volume_id;
+ unsigned int volume_id = 0;
vos_force_t force = VOS_NORMAL;
if (as->parms[VOLUME].items) {
typedef enum { SERVER, PARTITION, VOLUME, FORCE } DoVosVolumeZap_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
- unsigned int partition_id;
- unsigned int volume_id;
+ unsigned int partition_id = 0;
+ unsigned int volume_id = 0;
vos_force_t force = VOS_NORMAL;
if (as->parms[SERVER].items) {
{
typedef enum { PARTITION } DoVosPartitionNameToId_parm_t;
afs_status_t st = 0;
- unsigned int partition_id;
+ unsigned int partition_id = 0;
if (as->parms[PARTITION].items) {
partition_id =
{
typedef enum { PARTITIONID } DoVosPartitionIdToName_parm_t;
afs_status_t st = 0;
- unsigned int partition_id;
+ unsigned int partition_id = 0;
char partition[VOS_MAX_PARTITION_NAME_LEN];
if (as->parms[PARTITIONID].items) {
} DoVosVolumeQuotaChange_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
- unsigned int partition_id;
- unsigned int volume_id;
- unsigned int quota;
+ unsigned int partition_id = 0;
+ unsigned int volume_id = 0;
+ unsigned int quota = 0;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeGet_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
- afs_uint32 partition_id;
- afs_uint32 volume_id;
+ afs_uint32 partition_id = 0;
+ afs_uint32 volume_id = 0;
volintInfo info;
memset(&info, 0, sizeof(struct volintInfo));
typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeGet_parm_t;
afs_status_t st = 0;
void *vos_server = NULL;
- unsigned int partition_id;
- unsigned int volume_id;
+ unsigned int partition_id = 0;
+ unsigned int volume_id = 0;
if (as->parms[SERVER].items) {
if (!vos_ServerOpen
char name[16];
afs_int32 id = 0;
afs_int32 flags = PRGRP;
- afs_int32 owner;
- char *ownerName;
+ afs_int32 owner = 0;
+ char *ownerName = NULL;
int ownerType; /* type of ownership */
static char *lastGroupPrefix; /* prefix used for type==2 */
handle_split_proc(definition * defp, int multi_flag)
{
char *startname = SplitStart, *endname = SplitEnd;
- int numofparams;
+ int numofparams = 0;
if (!startname)
startname = "Start";
int num_src_chars; /*# of chars in source */
int true_num_src_chars; /*# src chars before truncation */
int trunc_needed; /*Is truncation needed? */
- char diskChar; /*Disk name prefix */
+ char diskChar = 0; /*Disk name prefix */
if (scout_debug) {
fprintf(scout_debugfd, "[%s] Called with '%s', dest width=%d\n", rn,
int code;
int line_no = 0;
- int error;
+ int error = 0;
char tbuf[USS_BULK_BUF_CHARS];
/*
char cd[300]; /*Current directory for search */
- int i, count, MinIndex, mina = 10000;
+ int i, count, MinIndex = 0, mina = 10000;
struct dirent *dp;
DIR *dirp;
char dirname[300];
{ /*uss_vol_DeleteVol */
static char rn[] = "uss_vol_DeleteVol"; /*Routine name */
- register afs_int32 code; /*Return code */
+ register afs_int32 code = 0; /*Return code */
/*
* Make sure we've initialized our VLDB connection(s) before
for (i = 0; i < ICL_LOGSPERSET; i++) {
code =
afs_syscall(AFSCALL_ICL, ICL_OP_ENUMLOGSBYSET, (long)setname,
- i, (long)tname, sizeof(tname));
+ i, (long)tname, sizeof(tname), 0, 0);
if (code) {
if (errno == EBADF) {
code = 0;
}
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)tname,
- (long)&dummy, (long)&dummy2, 0);
+ (long)&dummy, (long)&dummy2, 0, 0, 0);
if (code)
break;
found++;
for (i = 0; i < 1000; i++) {
code =
afs_syscall(AFSCALL_ICL, ICL_OP_ENUMLOGS, i, (long)tname,
- sizeof(tname), (long)&dummy);
+ sizeof(tname), (long)&dummy, 0, 0);
if (code)
break;
if (dummy > bufferSize) /* find biggest log */
code =
afs_syscall(AFSCALL_ICL, ICL_OP_COPYOUT, (long)lip->name,
(long)(bufferp + nwords), bufferSize - nwords,
- (long)&i);
+ (long)&i, 0, 0);
if (code < 0) {
/* otherwise we've got an error */
fprintf(outFilep, "Returned error %d dumping log.\n", errno);
{
afs_int32 code;
- code = afs_syscall(AFSCALL_ICL, ICL_OP_CLRLOG, (long)name, 0, 0, 0);
+ code = afs_syscall(AFSCALL_ICL, ICL_OP_CLRLOG, (long)name, 0, 0, 0, 0, 0);
return code;
}
{
afs_int32 code;
- code = afs_syscall(AFSCALL_ICL, ICL_OP_CLRSET, (long)name, 0, 0, 0);
+ code = afs_syscall(AFSCALL_ICL, ICL_OP_CLRSET, (long)name, 0, 0, 0, 0, 0);
return code;
}
{
afs_int32 code;
- code = afs_syscall(AFSCALL_ICL, ICL_OP_CLRALL, 0, 0, 0, 0);
+ code = afs_syscall(AFSCALL_ICL, ICL_OP_CLRALL, 0, 0, 0, 0, 0, 0);
return code;
}
for (i = 0; i < 1000; i++) {
code =
afs_syscall(AFSCALL_ICL, ICL_OP_ENUMSETS, i, (long)tname,
- sizeof(tname), (long)&states);
+ sizeof(tname), (long)&states, 0, 0);
if (code)
break;
(void)fprintf(outFileP, "%s %s%s%s\n", tname,
for (i = 0; i < 1000; i++) {
code =
afs_syscall(AFSCALL_ICL, ICL_OP_ENUMLOGS, i, (long)tname,
- sizeof(tname), (long)&logSize);
+ sizeof(tname), (long)&logSize, 0, 0);
if (code)
break;
if (int32flg) {
/* get more information on the log */
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)tname,
- (long)&logSize, (long)&allocated, 0);
+ (long)&logSize, (long)&allocated, 0, 0, 0);
if (code)
break;
(void)fprintf(outFileP, "%s : %d kbytes (%s)\n", tname,
for (i = 0; i < ICL_LOGSPERSET; i++) {
code =
afs_syscall(AFSCALL_ICL, ICL_OP_ENUMLOGSBYSET, (long)setname, i,
- (long)tname, sizeof(tname));
+ (long)tname, sizeof(tname), 0, 0);
if (code) {
if (errno == EBADF) {
code = 0;
/* get more information on the log */
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)tname,
- (long)&logSize, (long)&allocated, 0);
+ (long)&logSize, (long)&allocated, 0, 0, 0);
if (code)
break;
(void)fprintf(outFileP, "%s : %d kbytes (%s)\n", tname,
{
afs_int32 code;
- code = afs_syscall(AFSCALL_ICL, ICL_OP_SETSTAT, (long)name, op, 0, 0);
+ code = afs_syscall(AFSCALL_ICL, ICL_OP_SETSTAT, (long)name, op, 0, 0, 0, 0);
return code;
}
{
afs_int32 code;
- code = afs_syscall(AFSCALL_ICL, ICL_OP_SETSTATALL, op, 0, 0, 0);
+ code = afs_syscall(AFSCALL_ICL, ICL_OP_SETSTATALL, op, 0, 0, 0, 0, 0);
return code;
}
code =
afs_syscall(AFSCALL_ICL, ICL_OP_SETLOGSIZE, (long)name, logSize, 0,
- 0);
+ 0, 0, 0);
return code;
}
afs_int32 code;
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)logname,
- (long)logSizeP, (long)allocatedP, 0);
+ (long)logSizeP, (long)allocatedP, 0, 0, 0);
return code;
}
afs_int32 code;
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETSETINFO, (long)setname,
- (long)stateP, 0, 0);
+ (long)stateP, 0, 0, 0, 0);
return code;
}
/* get information about the specified log */
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)logname,
- (long)&bufferSize, (long)&allocated, 0);
+ (long)&bufferSize, (long)&allocated, 0, 0, 0);
if (code) {
if (errno == ENOENT)
(void)fprintf(stderr, "'%s' not found\n", logname);
code =
afs_syscall(AFSCALL_ICL, ICL_OP_COPYOUTCLR, (long)logname,
(long)(bufferp + nwords), bufferSize - nwords,
- (long)&i);
+ (long)&i, 0, 0);
if (code < 0) {
/* otherwise we've got an error */
fprintf(stderr, "returned error %d dumping log.\n", errno);
/* see if things have changed */
code =
afs_syscall(AFSCALL_ICL, ICL_OP_GETLOGINFO, (long)logname,
- (long)&newBufferSize, (long)&allocated, 0);
+ (long)&newBufferSize, (long)&allocated, 0, 0, 0);
if (code) {
if (errno == ENOENT)
(void)fprintf(stderr, "'%s' not found\n", logname);
int code;
int len;
char *file = 0;
- int fd;
+ int fd = 0;
if (as->parms[0].items) {
file = as->parms[0].items->data;
afs_sfsize_t tlen; /* temp for xfr length */
Inode tinode; /* inode for I/O */
afs_int32 optSize; /* optimal transfer size */
- afs_sfsize_t DataLength; /* size of inode */
+ afs_sfsize_t DataLength = 0; /* size of inode */
afs_sfsize_t TruncatedLength; /* size after ftruncate */
afs_fsize_t NewLength; /* size after this store completes */
afs_sfsize_t adjustSize; /* bytes to call VAdjust... with */
- int linkCount; /* link count on inode */
+ int linkCount = 0; /* link count on inode */
FdHandle_t *fdP;
struct in_addr logHostAddr; /* host ip holder for inet_ntoa */
struct FileEntry *fe;
struct CallBack *cb = 0, *lastcb = 0;
struct FileEntry *newfe = 0;
- afs_uint32 time_out;
+ afs_uint32 time_out = 0;
afs_uint32 *Thead = thead;
struct CallBack *newcb = 0;
int safety;
return VL_SIZEEXCEEDED;
}
} else {
- afs_int32 nextblockindex = 0, count = 0, k, match = 0;
+ afs_int32 nextblockindex = 0, count = 0, k = 0, match = 0;
while (nextblockindex =
NextEntry(trans, nextblockindex, &tentry, &count)) {
if (++pollcount > 50) {
return VL_SIZEEXCEEDED;
}
} else {
- afs_int32 nextblockindex = 0, count = 0, k, match = 0;
+ afs_int32 nextblockindex = 0, count = 0, k = 0, match = 0;
while (nextblockindex =
NextEntry(trans, nextblockindex, &tentry, &count)) {
if (++pollcount > 50) {
struct ubik_trans *trans;
struct nvlentry tentry;
struct nvldbentry *Vldbentry = 0, *VldbentryFirst = 0, *VldbentryLast = 0;
- afs_int32 blockindex = 0, count = 0, k, match, matchindex;
+ afs_int32 blockindex = 0, count = 0, k, match;
+ afs_int32 matchindex = 0;
int serverindex = -1; /* no server found */
int findserver = 0, findpartition = 0, findflag = 0, findname = 0;
char *t;
int pollcount = 0;
- int namematchRWBK, namematchRO, thismatch, matchtype;
+ int namematchRWBK, namematchRO, thismatch;
+ int matchtype = 0;
char volumename[VL_MAXNAMELEN];
#ifdef HAVE_POSIX_REGEX
regex_t re;
struct ubik_trans *trans;
struct nvlentry tentry;
vldblist vllist, *vllistptr;
- afs_int32 blockindex, count, k, match;
+ afs_int32 blockindex, count, match;
+ afs_int32 k = 0;
int serverindex;
int pollcount = 0;
struct ubik_trans *trans;
struct nvlentry tentry;
nvldblist vllist, *vllistptr;
- afs_int32 blockindex, count, k, match;
+ afs_int32 blockindex, count, match;
+ afs_int32 k = 0;
int serverindex;
int pollcount = 0;
afs_uint32 addrs[VL_MAXIPADDRS_PERMH];
afs_int32 fbase;
int count, willChangeEntry, foundUuidEntry, willReplaceCnt;
- int WillReplaceEntry, WillChange[MAXSERVERID + 1], FoundUuid,
- ReplaceEntry;
+ int WillReplaceEntry, WillChange[MAXSERVERID + 1];
+ int FoundUuid = 0;
+ int ReplaceEntry = 0;
int srvidx, mhidx;
COUNT_REQ(VLREGADDR);
{
int i, j;
afs_int32 code;
- struct extentaddr *exp;
- int base, index, mhidx;
+ struct extentaddr *exp = NULL;
+ int base = 0;
+ int index, mhidx;
afsUUID tuuid;
afs_int32 blockindex, count;
int pollcount = 0;
char buf[SIZEOF_LARGEDISKVNODE], dbuf[SIZEOF_LARGEDISKVNODE];
struct VnodeDiskObject *rwvnode = (struct VnodeDiskObject *)buf;
struct VnodeDiskObject *clvnode = (struct VnodeDiskObject *)dbuf;
- Inode rwinode, clinode;
+ Inode rwinode = 0;
+ Inode clinode;
struct clone_head decHead;
struct clone_rock decRock;
- afs_int32 offset, dircloned, inodeinced;
+ afs_int32 offset = 0;
+ afs_int32 dircloned, inodeinced;
struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
int ReadWriteOriginal = VolumeWriteable(rwvp);
static afs_int32 theLog[THELOGSIZE];
static afs_int32 vnLogPtr = 0;
void
-VNLog(aop, anparms, av1, av2, av3, av4)
- afs_int32 aop, anparms;
- afs_int32 av1, av2, av3, av4;
+VNLog(afs_int32 aop, afs_int32 anparms, afs_int32 av1, afs_int32 av2,
+ afs_int32 av3, afs_int32 av4)
{
register afs_int32 temp;
afs_int32 data[4];
if (Vn_refcount(vnp) != 0 || CheckLock(&vnp->lock))
Abort("VGetFreeVnode_r: locked vnode in lruq");
#endif
- VNLog(1, 2, Vn_id(vnp), (afs_int32) vnp);
+ VNLog(1, 2, Vn_id(vnp), (afs_int32) vnp, 0, 0);
/*
* it's going to be overwritten soon enough.
*/
vnrehash:
- VNLog(2, 1, vnodeNumber);
+ VNLog(2, 1, vnodeNumber, 0, 0, 0);
/* Prepare to move it to the new hash chain */
vnp = VLookupVnode(vp, vnodeNumber);
if (vnp) {
/* slot already exists. May even not be in lruq (consider store file locking a file being deleted)
* so we may have to wait for it below */
- VNLog(3, 2, vnodeNumber, (afs_int32) vnp);
+ VNLog(3, 2, vnodeNumber, (afs_int32) vnp, 0, 0);
VnCreateReservation_r(vnp);
if (Vn_refcount(vnp) == 1) {
}
sane:
- VNLog(4, 2, vnodeNumber, (afs_int32) vnp);
+ VNLog(4, 2, vnodeNumber, (afs_int32) vnp, 0, 0);
#ifndef AFS_DEMAND_ATTACH_FS
AddToVnHash(vnp);
#endif
}
- VNLog(5, 1, (afs_int32) vnp);
+ VNLog(5, 1, (afs_int32) vnp, 0, 0, 0);
memset(&vnp->disk, 0, sizeof(vnp->disk));
vnp->changed_newTime = 0; /* set this bit when vnode is updated */
vnp->changed_oldTime = 0; /* set this on CopyOnWrite. */
return NULL;
}
- VNLog(100, 1, vnodeNumber);
+ VNLog(100, 1, vnodeNumber, 0, 0, 0);
#ifdef AFS_DEMAND_ATTACH_FS
/*
if (vnp) {
/* vnode is in cache */
- VNLog(101, 2, vnodeNumber, (afs_int32) vnp);
+ VNLog(101, 2, vnodeNumber, (afs_int32) vnp, 0, 0);
VnCreateReservation_r(vnp);
#ifdef AFS_DEMAND_ATTACH_FS
/* Check that the vnode hasn't been removed while we were obtaining
* the lock */
- VNLog(102, 2, vnodeNumber, (afs_int32) vnp);
+ VNLog(102, 2, vnodeNumber, (afs_int32) vnp, 0, 0);
if ((vnp->disk.type == vNull) || (Vn_cacheCheck(vnp) == 0)) {
VnUnlock(vnp, locktype);
VnCancelReservation_r(vnp);
class = vnodeIdToClass(Vn_id(vnp));
vcp = &VnodeClassInfo[class];
assert(vnp->disk.vnodeMagic == vcp->magic);
- VNLog(200, 2, Vn_id(vnp), (afs_int32) vnp);
+ VNLog(200, 2, Vn_id(vnp), (afs_int32) vnp, 0, 0);
#ifdef AFS_DEMAND_ATTACH_FS
writeLocked = (Vn_state(vnp) == VN_STATE_EXCLUSIVE);
VNLog(201, 2, (afs_int32) vnp,
((vnp->changed_newTime) << 1) | ((vnp->
changed_oldTime) << 1) | vnp->
- delete);
+ delete, 0, 0);
if (thisProcess != vnp->writer)
Abort("VPutVnode: Vnode at 0x%x locked by another process!\n",
vnp);
/* No longer any directory entries for this vnode. Free the Vnode */
memset(&vnp->disk, 0, sizeof(vnp->disk));
/* delete flag turned off further down */
- VNLog(202, 2, Vn_id(vnp), (afs_int32) vnp);
+ VNLog(202, 2, Vn_id(vnp), (afs_int32) vnp, 0, 0);
} else if (vnp->changed_newTime) {
vnp->disk.serverModifyTime = now;
}
class = vnodeIdToClass(Vn_id(vnp));
vcp = &VnodeClassInfo[class];
assert(vnp->disk.vnodeMagic == vcp->magic);
- VNLog(300, 2, Vn_id(vnp), (afs_int32) vnp);
+ VNLog(300, 2, Vn_id(vnp), (afs_int32) vnp, 0, 0);
#ifdef AFS_DEMAND_ATTACH_FS
writeLocked = (Vn_state(vnp) == VN_STATE_EXCLUSIVE);
VNLog(301, 2, (afs_int32) vnp,
((vnp->changed_newTime) << 1) | ((vnp->
changed_oldTime) << 1) | vnp->
- delete);
+ delete, 0, 0);
/* sanity checks */
#ifdef AFS_PTHREAD_ENV
DumpFile(struct iod *iodp, int vnode, FdHandle_t * handleP)
{
int code = 0, error = 0;
- afs_int32 pad = 0, offset;
+ afs_int32 pad = 0;
+ afs_int32 offset = 0;
afs_sfsize_t n, nbytes, howMany, howBig;
afs_foff_t lcode = 0;
byte *p;
DumpFile(int dumpfd, int vnode, FdHandle_t * handleP, struct VnodeDiskObject *v)
{
int code = 0, failed_seek = 0, failed_write = 0;
- afs_int32 pad = 0, offset;
+ afs_int32 pad = 0;
+ afs_int32 offset = 0;
afs_sfsize_t n, nbytes, howMany, howBig;
byte *p;
#ifndef AFS_NT40_ENV
int quiet;
{
int totalOK, totalNotOK, totalBusy, i;
- afs_int32 volid;
+ afs_int32 volid = 0;
totalOK = 0;
totalNotOK = 0;
int totalNotOK; /*Total screwed volumes */
int totalBusy; /*Total busy volumes */
int i; /*Loop variable */
- afs_int32 volid; /*Current volume ID */
+ afs_int32 volid = 0; /*Current volume ID */
/*
* Initialize counters and (global!!) queues.
int totalNotOK; /*Total screwed volumes */
int totalBusy; /*Total busy volumes */
int i; /*Loop variable */
- afs_int32 volid; /*Current volume ID */
+ afs_int32 volid = 0; /*Current volume ID */
/*
* Initialize counters and (global!!) queues.
afs_int32 avolid, aparentid, aserver, apart, code, vcode, err;
afs_int32 aoverwrite = ASK;
afs_int32 acreation = 0, alastupdate = 0;
- int restoreflags, readonly = 0, offline = 0, voltype = RWVOL;
+ int restoreflags = 0;
+ int readonly = 0, offline = 0, voltype = RWVOL;
char prompt;
char afilename[MAXPATHLEN], avolname[VOLSER_MAXVOLNAME + 1], apartName[10];
char volname[VOLSER_MAXVOLNAME + 1];
{
afs_int32 apart, int32list, fast;
afs_int32 aserver, code;
- volintInfo *pntr, *oldpntr;
+ volintInfo *pntr;
+ volintInfo *oldpntr = NULL;
afs_int32 count;
int i;
char *base;
- volintXInfo *xInfoP, *origxInfoP; /*Ptr to current/orig extended vol info */
+ volintXInfo *xInfoP;
+ volintXInfo *origxInfoP = NULL; /*Ptr to current/orig extended vol info */
int wantExtendedInfo; /*Do we want extended vol info? */
char pname[10];
static int
DeleteEntry(register struct cmd_syndesc *as, void *arock)
{
- afs_int32 apart;
+ afs_int32 apart = 0;
afs_int32 avolid;
afs_int32 vcode;
struct VldbListByAttributes attributes;
struct VldbListByAttributes attributes;
nbulkentries arrayEntries;
struct nvldbentry *vllist, *tarray = 0, *ttarray;
- afs_int32 centries, nentries = 0, tarraysize, parraysize;
+ afs_int32 centries, nentries = 0;
+ afs_int32 tarraysize = 0;
+ afs_int32 parraysize;
int j;
char pname[10];
int quiet, sort, lock;
int comp = 0;
struct cmd_item *ti;
char *ccode;
- int match;
+ int match = 0;
memset(&attributes, 0, sizeof(struct VldbListByAttributes));
attributes.Mask = 0;
UnlockVLDB(register struct cmd_syndesc *as, void *arock)
{
afs_int32 apart;
- afs_int32 aserver, code;
+ afs_int32 aserver = NULL;
+ afs_int32 code;
afs_int32 vcode;
struct VldbListByAttributes attributes;
nbulkentries arrayEntries;
afs_int32 server, volid, code, i, same;
struct nvldbentry entry, storeEntry;
afs_int32 vcode;
- afs_int32 rwindex;
+ afs_int32 rwindex = 0;
afs_int32 rwserver = 0;
- afs_int32 rwpartition;
- afs_int32 roindex;
+ afs_int32 rwpartition = 0;
+ afs_int32 roindex = 0;
afs_int32 roserver = 0;
- afs_int32 ropartition;
+ afs_int32 ropartition = 0;
int force = 0;
struct rx_connection *aconn;
char c, dc;