qPut(&busyHead, pntr->volid);
if (disp)
fprintf(STDOUT, "**** Volume %lu is busy ****\n",
- (unsigned long)pntr->volid);
+ afs_cast_uint32(pntr->volid));
} else {
*totalNotOK += 1;
qPut(¬okHead, pntr->volid);
if (disp)
fprintf(STDOUT, "**** Could not attach volume %lu ****\n",
- (unsigned long)pntr->volid);
+ afs_cast_uint32(pntr->volid));
}
fprintf(STDOUT, "\n");
} else { /* default listing */
qPut(&busyHead, pntr->volid);
if (disp)
fprintf(STDOUT, "**** Volume %lu is busy ****\n",
- (unsigned long)pntr->volid);
+ afs_cast_uint32(pntr->volid));
} else {
*totalNotOK += 1;
qPut(¬okHead, pntr->volid);
if (disp)
fprintf(STDOUT, "**** Could not attach volume %lu ****\n",
- (unsigned long)pntr->volid);
+ afs_cast_uint32(pntr->volid));
}
}
}
qPut(&busyHead, a_xInfoP->volid);
if (a_showProblems)
fprintf(STDOUT, "**** Volume %lu is busy ****\n",
- (unsigned long)a_xInfoP->volid);
+ afs_cast_uint32(a_xInfoP->volid));
} /*Busy volume */
else {
(*a_totalNotOKP)++;
qPut(¬okHead, a_xInfoP->volid);
if (a_showProblems)
fprintf(STDOUT, "**** Could not attach volume %lu ****\n",
- (unsigned long)a_xInfoP->volid);
+ afs_cast_uint32(a_xInfoP->volid));
} /*Screwed volume */
fprintf(STDOUT, "\n");
} /*Long listing */
qPut(&busyHead, a_xInfoP->volid);
if (a_showProblems)
fprintf(STDOUT, "**** Volume %lu is busy ****\n",
- (unsigned long)a_xInfoP->volid);
+ afs_cast_uint32(a_xInfoP->volid));
} /*Busy volume */
else {
(*a_totalNotOKP)++;
qPut(¬okHead, a_xInfoP->volid);
if (a_showProblems)
fprintf(STDOUT, "**** Could not attach volume %lu ****\n",
- (unsigned long)a_xInfoP->volid);
+ afs_cast_uint32(a_xInfoP->volid));
} /*Screwed volume */
} /*Default listing */
} /*XDisplayFormat */
qPut(&busyHead, a_xInfoP->volid);
if (a_showProblems)
fprintf(STDOUT, "BUSY_VOL\t%lu\n",
- (unsigned long)a_xInfoP->volid);
+ afs_cast_uint32(a_xInfoP->volid));
} /*Busy volume */
else {
(*a_totalNotOKP)++;
qPut(¬okHead, a_xInfoP->volid);
if (a_showProblems)
fprintf(STDOUT, "COULD_NOT_ATTACH\t%lu\n",
- (unsigned long)a_xInfoP->volid);
+ afs_cast_uint32(a_xInfoP->volid));
} /*Screwed volume */
} /*Long listing */
else {
qPut(&busyHead, a_xInfoP->volid);
if (a_showProblems)
fprintf(STDOUT, "VOLUME_BUSY\t%lu\n",
- (unsigned long)a_xInfoP->volid);
+ afs_cast_uint32(a_xInfoP->volid));
} /*Busy volume */
else {
(*a_totalNotOKP)++;
qPut(¬okHead, a_xInfoP->volid);
if (a_showProblems)
fprintf(STDOUT, "COULD_NOT_ATTACH_VOLUME\t%lu\n",
- (unsigned long)a_xInfoP->volid);
+ afs_cast_uint32(a_xInfoP->volid));
} /*Screwed volume */
} /*Default listing */
} /*XDisplayFormat */
while (busyHead.count) {
qGet(&busyHead, &volid);
fprintf(STDOUT, "**** Volume %lu is busy ****\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
}
}
if (totalNotOK) {
while (notokHead.count) {
qGet(¬okHead, &volid);
fprintf(STDOUT, "**** Could not attach volume %lu ****\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
}
}
if (!quiet) {
while (busyHead.count) {
qGet(&busyHead, &volid);
fprintf(STDOUT, "**** Volume %lu is busy ****\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
}
}
if (totalNotOK) {
while (notokHead.count) {
qGet(¬okHead, &volid);
fprintf(STDOUT, "**** Could not attach volume %lu ****\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
}
}
while (busyHead.count) {
qGet(&busyHead, &volid);
fprintf(STDOUT, "BUSY_VOL\t%lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
}
}
if (totalNotOK) {
while (notokHead.count) {
qGet(¬okHead, &volid);
fprintf(STDOUT, "COULD_NOT_ATTACH\t%lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
}
}
if (verbose) {
fprintf(STDOUT, "Fetching VLDB entry for %lu .. ",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
fflush(STDOUT);
}
vcode = VLDB_GetEntryByID(volid, -1, &entry);
if (vcode) {
fprintf(STDERR,
"Could not fetch the entry for volume number %lu from VLDB \n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
return (vcode);
}
if (verbose)
if (code) {
fprintf(STDERR,
"Could not fetch the entry for volume number %lu from VLDB \n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
return (code);
}
MapHostToNetwork(&entry);
if (code)
fprintf(STDERR,
"Could not update volume info fields for volume number %lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
return (code);
}
}
MapPartIdIntoName(pnum, part);
fprintf(STDOUT, "Volume %lu created on partition %s of %s\n",
- (unsigned long)volid, part, as->parms[0].items->data);
+ afs_cast_uint32(volid), part, as->parms[0].items->data);
return 0;
}
if (code) {
fprintf(STDERR,
"Could not fetch the entry for volume %lu from VLDB\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
PrintError("", code);
return (code);
}
MapPartIdIntoName(partition, pname);
fprintf(STDOUT, "Volume %lu on partition %s server %s deleted\n",
- (unsigned long)volid, pname, hostutil_GetNameByINet(server));
+ afs_cast_uint32(volid), pname, hostutil_GetNameByINet(server));
return 0;
}
code = UV_ListOneVolume(fromserver, frompart, volid, &p);
if (code) {
fprintf(STDERR, "vos:cannot access volume %lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
exit(1);
}
if (TESTM)
- fprintf(STDOUT, "volume %lu size %d\n", (unsigned long)volid,
+ fprintf(STDOUT, "volume %lu size %d\n", afs_cast_uint32(volid),
p->size);
if (partition.free <= p->size) {
fprintf(STDERR,
"vos: no space on target partition %s to move volume %lu\n",
- toPartName, (unsigned long)volid);
+ toPartName, afs_cast_uint32(volid));
free(p);
exit(1);
}
MapPartIdIntoName(topart, toPartName);
MapPartIdIntoName(frompart, fromPartName);
fprintf(STDOUT, "Volume %lu moved from %s %s to %s %s \n",
- (unsigned long)volid, as->parms[1].items->data, fromPartName,
+ afs_cast_uint32(volid), as->parms[1].items->data, fromPartName,
as->parms[3].items->data, toPartName);
return 0;
code = UV_ListOneVolume(fromserver, frompart, volid, &p);
if (code) {
fprintf(STDERR, "vos:cannot access volume %lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
exit(1);
}
if (partition.free <= p->size) {
fprintf(STDERR,
"vos: no space on target partition %s to copy volume %lu\n",
- toPartName, (unsigned long)volid);
+ toPartName, afs_cast_uint32(volid));
free(p);
exit(1);
}
MapPartIdIntoName(topart, toPartName);
MapPartIdIntoName(frompart, fromPartName);
fprintf(STDOUT, "Volume %lu copied from %s %s to %s on %s %s \n",
- (unsigned long)volid, as->parms[1].items->data, fromPartName,
+ afs_cast_uint32(volid), as->parms[1].items->data, fromPartName,
tovolume, as->parms[4].items->data, toPartName);
return 0;
code = UV_ListOneVolume(fromserver, frompart, volid, &p);
if (code) {
fprintf(STDERR, "vos:cannot access volume %lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
exit(1);
}
strcpy(toVolName, p->name);
code = UV_ListOneVolume(fromserver, frompart, volid, &p);
if (code) {
fprintf(STDERR, "vos:cannot access volume %lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
exit(1);
}
}
if (partition.free <= p->size) {
fprintf(STDERR,
"vos: no space on target partition %s to copy volume %lu\n",
- toPartName, (unsigned long)volid);
+ toPartName, afs_cast_uint32(volid));
free(p);
if (q) free(q);
exit(1);
MapPartIdIntoName(topart, toPartName);
MapPartIdIntoName(frompart, fromPartName);
fprintf(STDOUT, "Volume %lu shadowed from %s %s to %s %s \n",
- (unsigned long)volid, as->parms[1].items->data, fromPartName,
+ afs_cast_uint32(volid), as->parms[1].items->data, fromPartName,
as->parms[3].items->data, toPartName);
return 0;
if (!code) {
fprintf(STDERR,
"FATAL ERROR: backup volume %lu exists on server %lu\n",
- (unsigned long)buvolid, (unsigned long)buserver);
+ afs_cast_uint32(buvolid), (unsigned long)buserver);
exit(1);
}
}
if (vol_elsewhere) {
fprintf(STDERR,
"%s volume %lu already exists on a different server/part; not allowed\n",
- readonly ? "RO" : "RW", (unsigned long)avolid);
+ readonly ? "RO" : "RW", afs_cast_uint32(avolid));
exit(1);
}
}
backupid = entry.volumeId[BACKVOL];
fprintf(STDERR,
"Warning: Entry for volume number %lu exists in VLDB (but we're zapping it anyway!)\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
}
if (zapbackupid) {
volintInfo *pntr = (volintInfo *) 0;
exit(1);
}
fprintf(STDOUT, "Backup Volume %lu deleted\n",
- (unsigned long)backupid);
+ afs_cast_uint32(backupid));
}
}
code = UV_VolumeZap(server, part, volid);
PrintDiagnostics("zap", code);
exit(1);
}
- fprintf(STDOUT, "Volume %lu deleted\n", (unsigned long)volid);
+ fprintf(STDOUT, "Volume %lu deleted\n", afs_cast_uint32(volid));
return 0;
}
if (vcode) {
fprintf(STDERR,
"Could not fetch the entry for volume %lu from VLDB \n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
PrintError("", vcode);
return (vcode);
}
if (index == -1) {
fprintf(STDERR,
"RO volume is not found in VLDB entry for volume %lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
return -1;
}
if (index == -1) {
fprintf(STDERR,
"RW Volume is not found in VLDB entry for volume %lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
return -1;
}
if (volid == rentry->volumeId[RWVOL]) {
}
fprintf(STDERR,
"unexpected volume type for volume %lu\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
return -1;
}
if (totalE)
fprintf(STDOUT,
"Could not lock %lu VLDB entries of %lu locked entries\n",
- (unsigned long)totalE, (unsigned long)nentries);
+ afs_cast_uint32(totalE), (unsigned long)nentries);
else {
if (as->parms[0].items) {
fprintf(STDOUT,
if (vcode) {
fprintf(STDERR,
"Could not fetch the entry for volume %lu from VLDB\n",
- (unsigned long)volid);
+ afs_cast_uint32(volid));
PrintError("convertROtoRW", code);
return vcode;
}
if (code) {
fprintf(STDERR,
"Converting RO volume %lu to RW volume failed with code %d\n",
- (unsigned long)volid, code);
+ afs_cast_uint32(volid), code);
PrintError("convertROtoRW ", code);
return -1;
}