DIR *dirp;
VolumeId volid;
int found = 0;
- int code;
volint_info_handle_t handle;
volumeInfo->volEntries_val = calloc(1, sizeof(volintInfo));
handle.volinfo_type = VOLINT_INFO_TYPE_BASE;
handle.volinfo_ptr.base = volumeInfo->volEntries_val;
- code = GetVolInfo(partid,
- volid,
- pname,
- volname,
- &handle,
- VOL_INFO_LIST_SINGLE);
+ /* The return code from GetVolInfo is ignored; there is no error from
+ * it that results in the whole call being aborted. Any volume
+ * attachment failures are reported in 'status' field in the
+ * volumeInfo payload. */
+ GetVolInfo(partid,
+ volid,
+ pname,
+ volname,
+ &handle,
+ VOL_INFO_LIST_SINGLE);
}
closedir(dirp);
- if (found)
- return code ? ENODEV: 0;
- else
- return ENODEV;
+ return (found) ? 0 : ENODEV;
}
/*------------------------------------------------------------------------
}
if (found) {
+ int error;
#ifndef AFS_PTHREAD_ENV
IOMGR_Poll();
#endif
handle.volinfo_type = VOLINT_INFO_TYPE_EXT;
handle.volinfo_ptr.ext = a_volumeXInfoP->volXEntries_val;
- code = GetVolInfo(a_partID,
- a_volID,
- pname,
- volname,
- &handle,
- VOL_INFO_LIST_SINGLE);
-
+ error = GetVolInfo(a_partID,
+ a_volID,
+ pname,
+ volname,
+ &handle,
+ VOL_INFO_LIST_SINGLE);
+ if (!error) {
+ code = 0;
+ }
}
/*
* return the proper value.
*/
closedir(dirp);
- if (found)
- return code ? ENODEV: 0;
- else
- return ENODEV;
+ return code;
} /*SAFSVolXListOneVolume */
/*returns all the volumes on partition partid. If flags = 1 then all the