}
memset(inode_for_V, '\0', (cacheFiles * sizeof(AFSD_INO_T)));
if (afsd_debug)
- printf("%s: %d inode_for_V entries at 0x%x, %d bytes\n", rn,
+ printf("%s: %d inode_for_V entries at 0x%x, %lu bytes\n", rn,
cacheFiles, inode_for_V, (cacheFiles * sizeof(AFSD_INO_T)));
#endif
if (pag == -1) {
sprintf(fname, "%s%d", prefix, getuid());
} else {
- sprintf(fname, "%sp%ld", prefix, (long int) pag);
+ sprintf(fname, "%sp%lu", prefix, afs_cast_uint32(pag));
}
ktc_set_tkt_string(fname);
buf1 = "(null)";
(void)sprintf(bufp, "coreName: %s\n", buf1);
bufp += strlen(bufp);
- (void)sprintf(bufp, "pid: %ld\n", (long int)tp->pid);
+ (void)sprintf(bufp, "pid: %ld\n", afs_cast_int32(tp->pid));
bufp += strlen(bufp);
- (void)sprintf(bufp, "lastExit: %ld\n", (long int)tp->lastExit);
+ (void)sprintf(bufp, "lastExit: %ld\n", afs_cast_int32(tp->lastExit));
bufp += strlen(bufp);
#ifdef notdef
- (void)sprintf(bufp, "lastSignal: %ld\n", (long int)tp->lastSignal);
+ (void)sprintf(bufp, "lastSignal: %ld\n", afs_cast_int32(tp->lastSignal));
bufp += strlen(bufp);
#endif
- (void)sprintf(bufp, "flags: %ld\n", (long int)tp->flags);
+ (void)sprintf(bufp, "flags: %ld\n", afs_cast_int32(tp->flags));
bufp += strlen(bufp);
(void)sprintf(bufp, "END bnode_proc\n");
bufp += strlen(bufp);
bufp += strlen(bufp);
(void)sprintf(bufp, "name: %s\n", tb->name);
bufp += strlen(bufp);
- (void)sprintf(bufp, "rsTime: %ld\n", (long int)tb->rsTime);
+ (void)sprintf(bufp, "rsTime: %ld\n", afs_cast_int32(tb->rsTime));
bufp += strlen(bufp);
- (void)sprintf(bufp, "rsCount: %ld\n", (long int)tb->rsCount);
+ (void)sprintf(bufp, "rsCount: %ld\n", afs_cast_int32(tb->rsCount));
bufp += strlen(bufp);
- (void)sprintf(bufp, "procStartTime: %ld\n", (long int)tb->procStartTime);
+ (void)sprintf(bufp, "procStartTime: %ld\n", afs_cast_int32(tb->procStartTime));
bufp += strlen(bufp);
- (void)sprintf(bufp, "procStarts: %ld\n", (long int)tb->procStarts);
+ (void)sprintf(bufp, "procStarts: %ld\n", afs_cast_int32(tb->procStarts));
bufp += strlen(bufp);
- (void)sprintf(bufp, "lastAnyExit: %ld\n", (long int)tb->lastAnyExit);
+ (void)sprintf(bufp, "lastAnyExit: %ld\n", afs_cast_int32(tb->lastAnyExit));
bufp += strlen(bufp);
- (void)sprintf(bufp, "lastErrorExit: %ld\n", (long int)tb->lastErrorExit);
+ (void)sprintf(bufp, "lastErrorExit: %ld\n", afs_cast_int32(tb->lastErrorExit));
bufp += strlen(bufp);
- (void)sprintf(bufp, "errorCode: %ld\n", (long int)tb->errorCode);
+ (void)sprintf(bufp, "errorCode: %ld\n", afs_cast_int32(tb->errorCode));
bufp += strlen(bufp);
- (void)sprintf(bufp, "errorSignal: %ld\n", (long int)tb->errorSignal);
+ (void)sprintf(bufp, "errorSignal: %ld\n", afs_cast_int32(tb->errorSignal));
bufp += strlen(bufp);
/*
(void) sprintf(bufp, "lastErrorName: %s\n", tb->lastErrorName);
if (mrafsParm->OptDontAskFS)
strcat(tbuffer, " -DontAskFS");
if (mrafsParm->OptLogLevel) {
- sprintf(pbuffer, " -LogLevel %ld", (long int) mrafsParm->OptLogLevel);
+ sprintf(pbuffer, " -LogLevel %ld", afs_cast_int32(mrafsParm->OptLogLevel));
strcat(tbuffer, pbuffer);
}
if (mrafsParm->OptRxDebug)
strcat(tbuffer, " -rxdebug");
if (mrafsParm->OptResidencies) {
sprintf(pbuffer, " -Residencies %lu",
- (long unsigned int) mrafsParm->OptResidencies);
+ afs_cast_uint32(mrafsParm->OptResidencies));
strcat(tbuffer, pbuffer);
}
}
if (statusPtr->dbDumpId)
printf(": DumpID %u", statusPtr->dbDumpId);
if (statusPtr->nKBytes)
- printf(", %ld Kbytes", (long int) statusPtr->nKBytes);
+ printf(", %ld Kbytes", afs_cast_int32(statusPtr->nKBytes));
if (strlen(statusPtr->volumeName) != 0)
printf(", volume %s", statusPtr->volumeName);
sprintf(line,
"%-5d %02d/%02d/%04d %02d:%02d:%02d "
"%02d/%02d/%04d %02d:%02d:%02d " "%02d:%02d:%02d "
- "%s %d of %d volumes dumped (%ld KB)\n", taskId,
+ "%s %d of %d volumes dumped (%lu KB)\n", taskId,
tmstart.tm_mon + 1, tmstart.tm_mday, tmstart.tm_year + 1900,
tmstart.tm_hour, tmstart.tm_min, tmstart.tm_sec,
tmend.tm_mon + 1, tmend.tm_mday, tmend.tm_year + 1900,
statusSize *= BufferSize;
if (statusSize < 0)
statusSize = 0x7fffffff; /*max size */
- printf("Status every %ld Bytes\n", statusSize);
+ printf("Status every %ld Bytes\n", afs_cast_int32(statusSize));
}
error_exit:
#define AFS_INT64_FMT "lld"
#endif
+/* Functions to safely cast afs_int32 and afs_uint32 so they can be used in
+ * printf statemements with %ld and %lu
+ */
+
+static_inline long int afs_cast_int32(afs_int32 d) { return (long int) d; }
+static_inline unsigned long int afs_cast_uint32(afs_uint32 d) { return (unsigned long int) d; }
+
#endif /* OPENAFS_CONFIG_AFS_STDS_H */
#include <afsconfig.h>
#include <afs/param.h>
+#include <afs/stds.h>
RCSID
("$Header$");
printf("Hash table utilization = %f%%\n",
(double)dynamics.hashTableUtilization / 100.0);
ka_timestr(dynamics.start_time, bob, KA_TIMESTR_LEN);
- printf("From host %lx started at %s:\n", dynamics.host, bob);
+ printf("From host %lx started at %s:\n",
+ afs_cast_uint32(dynamics.host), bob);
#define print_stat(name) if (dynamics.name.requests) printf (" of %d requests for %s, %d were aborted.\n", dynamics.name.requests, # name, dynamics.name.aborts)
print_stat(Authenticate);
timeOffset, now - start);
}
ka_timestr(info.startTime, bob, KA_TIMESTR_LEN);
- printf("From host %lx started %sat %s:\n", info.host,
+ printf("From host %lx started %sat %s:\n",
+ afs_cast_uint32(info.host),
(info.noAuth ? "w/o authorization " : ""), bob);
ka_timestr(info.lastTrans, bob, KA_TIMESTR_LEN);
printf("Last trans was %s at %s\n", info.lastOperation, bob);
printf("Next autoCPW at %s or in %d updates.\n", bob,
info.updatesRemaining);
if (info.cheader_lock || info.keycache_lock)
- printf("locks: cheader %08lx, keycache %08lx\n", info.cheader_lock,
- info.keycache_lock);
+ printf("locks: cheader %08lx, keycache %08lx\n",
+ afs_cast_uint32(info.cheader_lock),
+ afs_cast_uint32(info.keycache_lock));
printf("Last authentication for %s, last admin user was %s\n",
info.lastAuth, info.lastAdmin);
printf("Last TGS op was a %s ticket was for %s\n", info.lastTGSServer,
if (header->headerSize != sizeof(struct kaheader)) {
code++;
fprintf(stderr,
- "HEADER SIZE WRONG: file indicates %d, should be %d\n",
+ "HEADER SIZE WRONG: file indicates %d, should be %lu\n",
header->headerSize, sizeof(struct kaheader));
}
if (header->hashsize != HASHSIZE) {
if ((info.st_size - UBIK_HEADERSIZE) % UBIK_BUFFERSIZE)
fprintf(stderr,
"DATABASE SIZE INCONSISTENT: was %d, should be (n*%d + %d), for integral n\n",
- info.st_size, UBIK_BUFFERSIZE, UBIK_HEADERSIZE);
+ (int) info.st_size, UBIK_BUFFERSIZE, UBIK_HEADERSIZE);
readUbikHeader();
i = NameHash(&entry);
if (i != j) {
fprintf(stderr,
- "Entry %d, %s, found in hash chain %d (should be %d)\n",
+ "Entry %lu, %s, found in hash chain %d (should be %d)\n",
((index -
sizeof(struct kaheader)) / sizeof(struct kaentry)),
EntryName(&entry), j, i);
/* now read the info */
r = read(fd, &uheader, sizeof(uheader));
if (r != sizeof(uheader)) {
- printf("error: read of %d bytes failed: %d %d\n", sizeof(uheader), r,
+ printf("error: read of %lu bytes failed: %d %d\n", sizeof(uheader), r,
errno);
return (-1);
}
rxMaxMTU = atoi(argv[++a]);
if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
- printf("rxMaxMTU %d invalid; must be between %d-%d\n",
+ printf("rxMaxMTU %d invalid; must be between %d-%lu\n",
rxMaxMTU, RX_MIN_PACKET_SIZE,
RX_MAX_PACKET_DATA_SIZE);
PT_EXIT(1);
#include "ubik.h"
#include "ubik_int.h"
+static_inline int afs_cast_time_t(time_t d) { return (int) d; }
+
static short
PortNumber(register char *aport)
{
times = ctime(&now);
times[24] = 0;
diff = now - udebug.now;
- printf("Local time is %s (time differential %d secs)\n", times, (int)diff);
+ printf("Local time is %s (time differential %d secs)\n", times, afs_cast_time_t(diff));
if (abs((int)diff) >= MAXSKEW)
printf("****clock may be bad\n");
} else {
diff = udebug.now - udebug.lastYesTime;
printf("Last yes vote for %s was %d secs ago (%ssync site); \n",
- afs_inet_ntoa(udebug.lastYesHost), (int)diff,
+ afs_inet_ntoa(udebug.lastYesHost),
+ afs_cast_time_t(diff),
((udebug.lastYesState) ? "" : "not "));
diff = udebug.now - udebug.lastYesClaim;
newtime = now - diff;
times = ctime(&newtime);
times[24] = 0;
- printf("Last vote started %d secs ago (at %s)\n", (int)diff, times);
+ printf("Last vote started %d secs ago (at %s)\n",
+ afs_cast_time_t(diff), times);
}
printf("Local db version is %d.%d\n", udebug.localVersion.epoch,
times[24] = 0;
printf
("I am sync site until %d secs from now (at %s) (%d server%s)\n",
- (int)diff, times, udebug.nServers,
+ afs_cast_time_t(diff), times, udebug.nServers,
((udebug.nServers > 1) ? "s" : ""));
}
printf("Recovery state %x\n", udebug.recoveryState);
diff = udebug.now - udebug.lowestTime;
printf("Lowest host %s was set %d secs ago\n",
afs_inet_ntoa(htonl(udebug.lowestHost)),
- (int)diff);
+ afs_cast_time_t(diff));
diff = udebug.now - udebug.syncTime;
printf("Sync host %s was set %d secs ago\n",
afs_inet_ntoa(htonl(udebug.syncHost)),
- (int)diff);
+ afs_cast_time_t(diff));
}
printf("Sync site's db version is %d.%d\n", udebug.syncVersion.epoch,
times[24] = 0;
printf
("Last time a new db version was labelled was:\n\t %d secs ago (at %s)\n",
- (int)diff, times);
+ afs_cast_time_t(diff), times);
}
if (int32p || udebug.amSyncSite) {
newtime = now - diff;
times = ctime(&newtime);
times[24] = 0;
- printf(" last vote rcvd %d secs ago (at %s),\n", (int)diff,
+ printf(" last vote rcvd %d secs ago (at %s),\n",
+ afs_cast_time_t(diff),
times);
}
times[24] = 0;
printf
(" last beacon sent %d secs ago (at %s), last vote was %s\n",
- (int)diff, times, ((usdebug.lastVote) ? "yes" : "no"));
+ afs_cast_time_t(diff), times, ((usdebug.lastVote) ? "yes" : "no"));
}
printf(" dbcurrent=%d, up=%d beaconSince=%d\n",
#include <afsconfig.h>
#include <afs/param.h>
+#include <afs/stds.h>
RCSID
("$Header$");
temp = 0;
code = ubik_SAMPLE_Inc(cstruct, 0);
if (code != 0) {
- printf("SAMPLE_Inc #1 failed with code %ld\n", code);
+ printf("SAMPLE_Inc #1 failed with code %ld\n",
+ afs_cast_int32(code));
} else {
printf("SAMPLE_Inc #1 succeeded, incremented integer\n");
}
temp = 0;
code = ubik_SAMPLE_Inc(cstruct, 0);
if (code != 0)
- printf("SAMPLE_Inc #2 failed with code %ld\n", code);
+ printf("SAMPLE_Inc #2 failed with code %ld\n",
+ afs_cast_int32(code));
else
printf("SAMPLE_Inc #2 succeeded, incremented integer\n");
tp = uss_common_FieldCp(path_field, a_access, ' ', sizeof(path_field),
&overflow);
if (overflow) {
- fprintf(stderr, "%s: * Pathname field too long (max is %d chars)\n",
+ fprintf(stderr, "%s: * Pathname field too long (max is %lu chars)\n",
uss_whoami, sizeof(path_field));
return (-1);
}
now = ReadDump(*argv);
if (stats || noptions == 0) {
time_t uxtfirst = UXtime(tfirst);
- printf("The time of the dump was %u %s", now, ctime(&now));
- printf("The last time cleanup ran was %u %s", uxtfirst,
+ printf("The time of the dump was %u %s", (unsigned int) now, ctime(&now));
+ printf("The last time cleanup ran was %u %s", (unsigned int) uxtfirst,
ctime(&uxtfirst));
PrintCallBackStats();
}
if (fe == NULL)
return;
- printf("vol=%u vn=%u cbs=%d hi=%d st=%d fest=%d, exp in %d secs at %s",
+ printf("vol=%u vn=%u cbs=%d hi=%d st=%d fest=%d, exp in %lu secs at %s",
fe->volid, fe->vnode, fe->ncbs, cb->hhead, cb->status, fe->status,
expires - now, ctime(&expires));
}
if (vl3p->flags == VLFREE)
return;
- printf("%s\tPos=%d NextIdHash=[%d:%d:%d] NextNameHash=%d\n",
+ printf("%s\tPos=%lu NextIdHash=[%d:%d:%d] NextNameHash=%d\n",
vl3p->name, (oldpos - sizeof(struct vlentry_3)),
vl3p->nextIdHash[0], vl3p->nextIdHash[1], vl3p->nextIdHash[2],
vl3p->nextNameHash);
/* now read the info */
r = read(fd, &uheader, sizeof(uheader));
if (r != sizeof(uheader)) {
- log_error(VLDB_CHECK_FATAL,"error: read of %d bytes failed: %d %d\n", sizeof(uheader), r,
+ log_error(VLDB_CHECK_FATAL,"error: read of %lu bytes failed: %d %d\n", sizeof(uheader), r,
errno);
return (VLDB_CHECK_FATAL);
}
quiet_println("vldb header\n");
quiet_println(" vldbversion = %u\n",
headerp->vital_header.vldbversion);
- quiet_println(" headersize = %u [actual=%u]\n",
+ quiet_println(" headersize = %u [actual=%lu]\n",
headerp->vital_header.headersize, sizeof(*headerp));
quiet_println(" freePtr = 0x%x\n", headerp->vital_header.freePtr);
quiet_println(" eofPtr = %u\n", headerp->vital_header.eofPtr);
/* Check the header size */
if (headerp->vital_header.headersize != sizeof(*headerp))
- log_error(VLDB_CHECK_WARNING,"Header reports its size as %d (should be %d)\n",
+ log_error(VLDB_CHECK_WARNING,"Header reports its size as %d (should be %lu)\n",
headerp->vital_header.headersize, sizeof(*headerp));
return;
}
if (record[rindex].addr != addr && record[rindex].addr) {
log_error
- (VLDB_CHECK_ERROR,"INTERNAL VLDB_CHECK_ERROR: addresses %u and %u use same record slot %d\n",
+ (VLDB_CHECK_ERROR,"INTERNAL VLDB_CHECK_ERROR: addresses %ld and %u use same record slot %d\n",
record[rindex].addr, addr, rindex);
}
if (record[rindex].type & NH) {
rindex = addr / sizeof(vlentry);
if (record[rindex].addr != addr && record[rindex].addr) {
log_error
- (VLDB_CHECK_ERROR,"INTERNAL VLDB_CHECK_ERROR: addresses %u and %u use same record slot %d\n",
+ (VLDB_CHECK_ERROR,"INTERNAL VLDB_CHECK_ERROR: addresses %ld and %u use same record slot %d\n",
record[rindex].addr, addr, rindex);
}
if (record[rindex].type & hash) {
rindex = addr / sizeof(vlentry);
if (record[rindex].addr != addr && record[rindex].addr) {
log_error
- (VLDB_CHECK_ERROR,"INTERNAL VLDB_CHECK_ERROR: addresses %u and %u use same record slot %d\n",
+ (VLDB_CHECK_ERROR,"INTERNAL VLDB_CHECK_ERROR: addresses %u and %ld use same record slot %d\n",
record[rindex].addr, addr, rindex);
}
if (record[rindex].type & FRC) {
}
if (record[rindex].type & FRC) {
log_error
- (VLDB_CHECK_ERROR,"MH Blocks Chain %d: Bad entry at %u: Already a MH block\n",
+ (VLDB_CHECK_ERROR,"MH Blocks Chain %d: Bad entry at %ld: Already a MH block\n",
i, record[rindex].addr);
break;
}
FixBad(afs_uint32 idx, afs_uint32 addr, afs_uint32 type, afs_uint32 tmp,
struct nvlentry *vlentry, afs_uint32 hash) {
SetHashEnd(addr, type, tmp);
- quiet_println("linked unlinked chain %u (index %d) to end of chain %d for %s hash\n",
+ quiet_println("linked unlinked chain %u (index %lu) to end of chain %d for %s hash\n",
tmp, ADDR(tmp), hash, type==NH?"Name":(type==RWH?"RW":(type==ROH?"RO":"BK")));
}
readentry(record[i].addr, &vlentry, &type);
if (InvalidVolname(vlentry.name))
- log_error(VLDB_CHECK_ERROR,"Volume '%s' at addr %u has an invalid name\n",
+ log_error(VLDB_CHECK_ERROR,"Volume '%s' at addr %ld has an invalid name\n",
vlentry.name, record[i].addr);
if (!(record[i].type & NH)) {
/* A free entry */
} else if (record[i].type & FR) {
if (!(record[i].type & FRC))
- log_error(VLDB_CHECK_ERROR,"Free vlentry at %u not on free chain\n",
+ log_error(VLDB_CHECK_ERROR,"Free vlentry at %ld not on free chain\n",
record[i].addr);
if (record[i].type & 0xfffffdf0)
log_error
- (VLDB_CHECK_ERROR,"Free vlentry at %u also found on other chains (0x%x)\n",
+ (VLDB_CHECK_ERROR,"Free vlentry at %ld also found on other chains (0x%x)\n",
record[i].addr, record[i].type);
/* A multihomed entry */
} else if (record[i].type & MH) {
if (!(record[i].type & MHC))
- log_error(VLDB_CHECK_ERROR,"Multihomed block at %u is orphaned\n",
+ log_error(VLDB_CHECK_ERROR,"Multihomed block at %ld is orphaned\n",
record[i].addr);
if (record[i].type & 0xfffffef0)
log_error
- (VLDB_CHECK_ERROR,"Multihomed block at %u also found on other chains (0x%x)\n",
+ (VLDB_CHECK_ERROR,"Multihomed block at %ld also found on other chains (0x%x)\n",
record[i].addr, record[i].type);
} else {
if (record[i].type & VL) {
readentry(record[i].addr, &vlentry, &type);
if (!(record[i].type & REFN)) {
- log_error(VLDB_CHECK_ERROR,"%d: Record %u (type 0x%x) not in a name chain\n", i,
+ log_error(VLDB_CHECK_ERROR,"%d: Record %ld (type 0x%x) not in a name chain\n", i,
record[i].addr, record[i].type);
if (strlen(vlentry.name)>0) {
if (fix) {
}
}
if (vlentry.volumeId[0] && !(record[i].type & REFRW)) {
- log_error(VLDB_CHECK_ERROR,"%d: Record %u (type 0x%x) not in a RW chain\n", i,
+ log_error(VLDB_CHECK_ERROR,"%d: Record %ld (type 0x%x) not in a RW chain\n", i,
record[i].addr, record[i].type);
if (fix) {
if (header.VolidHash[0][IdHash(vlentry.volumeId[0])] == 0)
}
}
if (vlentry.volumeId[1] && !(record[i].type & REFRO)) {
- log_error(VLDB_CHECK_ERROR,"%d: Record %u (type 0x%x) not in a RO chain\n", i,
+ log_error(VLDB_CHECK_ERROR,"%d: Record %ld (type 0x%x) not in a RO chain\n", i,
record[i].addr, record[i].type);
if (fix) {
if (header.VolidHash[1][IdHash(vlentry.volumeId[1])] == 0)
}
}
if (vlentry.volumeId[2] && !(record[i].type & REFBK)) {
- log_error(VLDB_CHECK_ERROR,"%d: Record %u (type 0x%x) not in a BK chain\n", i,
+ log_error(VLDB_CHECK_ERROR,"%d: Record %ld (type 0x%x) not in a BK chain\n", i,
record[i].addr, record[i].type);
if (fix) {
if (header.VolidHash[2][IdHash(vlentry.volumeId[2])] == 0)
rxMaxMTU = atoi(argv[++index]);
if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
- printf("rxMaxMTU %d invalid; must be between %d-%d\n",
+ printf("rxMaxMTU %d invalid; must be between %d-%lu\n",
rxMaxMTU, RX_MIN_PACKET_SIZE,
RX_MAX_PACKET_DATA_SIZE);
return -1;
rxMaxMTU = atoi(argv[++code]);
if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
- printf("rxMaxMTU %d% invalid; must be between %d-%d\n",
+ printf("rxMaxMTU %d invalid; must be between %d-%lu\n",
rxMaxMTU, RX_MIN_PACKET_SIZE,
RX_MAX_PACKET_DATA_SIZE);
exit(1);
}
fprintf(STDOUT, "name\t\t%s\n", a_xInfoP->name);
- fprintf(STDOUT, "id\t\t%lu\n", a_xInfoP->volid);
+ fprintf(STDOUT, "id\t\t%lu\n", afs_cast_uint32(a_xInfoP->volid));
fprintf(STDOUT, "serv\t\t%s\t%s\n", address, hostname);
fprintf(STDOUT, "part\t\t%s\n", pname);
switch (a_xInfoP->status) {
fprintf(STDOUT, "status\t\tUNATTACHABLE\n");
return;
}
- fprintf(STDOUT, "backupID\t%lu\n", a_xInfoP->backupID);
- fprintf(STDOUT, "parentID\t%lu\n", a_xInfoP->parentID);
- fprintf(STDOUT, "cloneID\t\t%lu\n", a_xInfoP->cloneID);
+ fprintf(STDOUT, "backupID\t%lu\n",
+ afs_cast_uint32(a_xInfoP->backupID));
+ fprintf(STDOUT, "parentID\t%lu\n",
+ afs_cast_uint32(a_xInfoP->parentID));
+ fprintf(STDOUT, "cloneID\t\t%lu\n",
+ afs_cast_uint32(a_xInfoP->cloneID));
fprintf(STDOUT, "inUse\t\t%s\n", a_xInfoP->inUse ? "Y" : "N");
switch (a_xInfoP->type) {
case 0:
fprintf(STDOUT, "type\t\t?\n");
break;
}
- fprintf(STDOUT, "creationDate\t%-9lu\t%s", a_xInfoP->creationDate,
+ fprintf(STDOUT, "creationDate\t%-9lu\t%s",
+ afs_cast_uint32(a_xInfoP->creationDate),
vos_ctime(&a_xInfoP->creationDate));
- fprintf(STDOUT, "accessDate\t%-9lu\t%s", a_xInfoP->accessDate,
+ fprintf(STDOUT, "accessDate\t%-9lu\t%s",
+ afs_cast_uint32(a_xInfoP->accessDate),
vos_ctime(&a_xInfoP->accessDate));
- fprintf(STDOUT, "updateDate\t%-9lu\t%s", a_xInfoP->updateDate,
+ fprintf(STDOUT, "updateDate\t%-9lu\t%s",
+ afs_cast_uint32(a_xInfoP->updateDate),
vos_ctime(&a_xInfoP->updateDate));
- fprintf(STDOUT, "backupDate\t%-9lu\t%s", a_xInfoP->backupDate,
+ fprintf(STDOUT, "backupDate\t%-9lu\t%s",
+ afs_cast_uint32(a_xInfoP->backupDate),
vos_ctime(&a_xInfoP->backupDate));
- fprintf(STDOUT, "copyDate\t%-9lu\t%s", a_xInfoP->copyDate,
+ fprintf(STDOUT, "copyDate\t%-9lu\t%s",
+ afs_cast_uint32(a_xInfoP->copyDate),
vos_ctime(&a_xInfoP->copyDate));
fprintf(STDOUT, "diskused\t%u\n", a_xInfoP->size);
partition_cache = partition;
}
fprintf(STDOUT, "name\t\t%s\n", pntr->name);
- fprintf(STDOUT, "id\t\t%lu\n", pntr->volid);
+ fprintf(STDOUT, "id\t\t%lu\n",
+ afs_cast_uint32(pntr->volid));
fprintf(STDOUT, "serv\t\t%s\t%s\n", address, hostname);
fprintf(STDOUT, "part\t\t%s\n", pname);
switch (pntr->status) {
fprintf(STDOUT, "status\t\tUNATTACHABLE\n");
return;
}
- fprintf(STDOUT, "backupID\t%lu\n", pntr->backupID);
- fprintf(STDOUT, "parentID\t%lu\n", pntr->parentID);
- fprintf(STDOUT, "cloneID\t\t%lu\n", pntr->cloneID);
+ fprintf(STDOUT, "backupID\t%lu\n",
+ afs_cast_uint32(pntr->backupID));
+ fprintf(STDOUT, "parentID\t%lu\n",
+ afs_cast_uint32(pntr->parentID));
+ fprintf(STDOUT, "cloneID\t\t%lu\n",
+ afs_cast_uint32(pntr->cloneID));
fprintf(STDOUT, "inUse\t\t%s\n", pntr->inUse ? "Y" : "N");
fprintf(STDOUT, "needsSalvaged\t%s\n", pntr->needsSalvaged ? "Y" : "N");
/* 0xD3 is from afs/volume.h since I had trouble including the file */
fprintf(STDOUT, "type\t\t?\n");
break;
}
- fprintf(STDOUT, "creationDate\t%-9lu\t%s", pntr->creationDate,
+ fprintf(STDOUT, "creationDate\t%-9lu\t%s",
+ afs_cast_uint32(pntr->creationDate),
vos_ctime(&pntr->creationDate));
- fprintf(STDOUT, "accessDate\t%-9lu\t%s", pntr->accessDate,
+ fprintf(STDOUT, "accessDate\t%-9lu\t%s",
+ afs_cast_uint32(pntr->accessDate),
vos_ctime(&pntr->accessDate));
- fprintf(STDOUT, "updateDate\t%-9lu\t%s", pntr->updateDate,
+ fprintf(STDOUT, "updateDate\t%-9lu\t%s",
+ afs_cast_uint32(pntr->updateDate),
vos_ctime(&pntr->updateDate));
- fprintf(STDOUT, "backupDate\t%-9lu\t%s", pntr->backupDate,
+ fprintf(STDOUT, "backupDate\t%-9lu\t%s",
+ afs_cast_uint32(pntr->backupDate),
vos_ctime(&pntr->backupDate));
- fprintf(STDOUT, "copyDate\t%-9lu\t%s", pntr->copyDate,
+ fprintf(STDOUT, "copyDate\t%-9lu\t%s",
+ afs_cast_uint32(pntr->copyDate),
vos_ctime(&pntr->copyDate));
- fprintf(STDOUT, "flags\t\t%#lx\t(Optional)\n", pntr->flags);
+ fprintf(STDOUT, "flags\t\t%#lx\t(Optional)\n",
+ afs_cast_uint32(pntr->flags));
fprintf(STDOUT, "diskused\t%u\n", pntr->size);
fprintf(STDOUT, "maxquota\t%u\n", pntr->maxquota);
- fprintf(STDOUT, "minquota\t%lu\t(Optional)\n", pntr->spare0);
+ fprintf(STDOUT, "minquota\t%lu\t(Optional)\n",
+ afs_cast_uint32(pntr->spare0));
fprintf(STDOUT, "filecount\t%u\n", pntr->filecount);
fprintf(STDOUT, "dayUse\t\t%u\n", pntr->dayUse);
- fprintf(STDOUT, "weekUse\t\t%lu\t(Optional)\n", pntr->spare1);
- fprintf(STDOUT, "spare2\t\t%lu\t(Optional)\n", pntr->spare2);
- fprintf(STDOUT, "spare3\t\t%lu\t(Optional)\n", pntr->spare3);
+ fprintf(STDOUT, "weekUse\t\t%lu\t(Optional)\n",
+ afs_cast_uint32(pntr->spare1));
+ fprintf(STDOUT, "spare2\t\t%lu\t(Optional)\n",
+ afs_cast_uint32(pntr->spare2));
+ fprintf(STDOUT, "spare3\t\t%lu\t(Optional)\n",
+ afs_cast_uint32(pntr->spare3));
return;
}