* Note that ainfo->u.param[0] is always the volume ID, for any vice inode.
*/
static int
-NukeProc(struct ViceInodeInfo *ainfo, afs_int32 avolid, struct ilist *allInodes)
+NukeProc(struct ViceInodeInfo *ainfo, afs_int32 avolid, struct ilist **allInodes)
{
struct ilist *ti;
register afs_int32 i;
if (ainfo->u.param[0] != avolid)
return 0; /* don't want this one */
/* record the info */
- if (!allInodes || allInodes->freePtr >= MAXATONCE) {
+ if (!*allInodes || (*allInodes)->freePtr >= MAXATONCE) {
ti = (struct ilist *)malloc(sizeof(struct ilist));
memset(ti, 0, sizeof(*ti));
- ti->next = allInodes;
- allInodes = ti;
+ ti->next = *allInodes;
+ *allInodes = ti;
} else
- ti = allInodes; /* use the one with space */
+ ti = *allInodes; /* use the one with space */
i = ti->freePtr++; /* find our slot in this mess */
ti->inode[i] = ainfo->inodeNumber;
ti->count[i] = ainfo->linkCount;
#ifdef AFS_NAMEI_ENV
code =
ListViceInodes(lastDevComp, aname, NULL, NukeProc, avolid, &forceSal,
- 0, wpath, allInodes);
+ 0, wpath, &allInodes);
#else
code =
ListViceInodes(lastDevComp, aname, "/tmp/vNukeXX", NukeProc, avolid,
- &forceSal, 0, wpath, allInodes);
+ &forceSal, 0, wpath, &allInodes);
unlink("/tmp/vNukeXX"); /* clean it up now */
#endif
if (code == 0) {