FAT | RFS | XFS | ZFS
viter_next()
PROTOTYPE
#include <posix.h>
int viter_next(char *vol_name, size_t len);
DESCRIPTION
viter_next() is a non-standard routine that gets the name and type of the current entry in the file system’s internal volume list. Every installed volume (by XfsAddVol(), FatAddVol(), etc.) is on this list. If not NULL, vol_name points to a buffer of len bytes that the volume name is copied to.
Before returning, viter_next() advances the list’s current position to the next volume.
viter_next() returns the volume type (FAT_VOL, RFS_VOL, XFS_VOL, or ZFS_VOL) or 0 if the end of the list has been reached.
EXAMPLE
/*-----------------------------------------------------------------*/
/* Loop to perform binary search on each volume. */
/*-----------------------------------------------------------------*/
for (viter_reset();;)
{
/*---------------------------------------------------------------*/
/* Get next volume name and type. If no more volumes, break. */
/*---------------------------------------------------------------*/
vol_type = viter_next(vol_name, FILENAME_MAX);
if (vol_type == 0)
break;
/*---------------------------------------------------------------*/
/* Skip ZFS volumes. */
/*---------------------------------------------------------------*/
if (vol_type == ZFS_VOL)
continue;
/*---------------------------------------------------------------*/
/* Print banner and invoke binary search. */
/*---------------------------------------------------------------*/
printf("\n************** Test Pass %u **************\n", pass);
bsearch_app(vol_name, pass);
}