int libmem_foreach_sector(libmem_driver_handle_t *h,
                          libmem_foreach_sector_fn_t fn);

libmem_foreach_sector is a helper function for iterating through all sectors handled by a LIBMEM driver.

h — A pointer to the handle of the LIBMEM driver.

fn — The function to call for each sector.

libmem_foreach_sector returns — The LIBMEM status result.

This function iterates through all the sectors handled by a single LIBMEM driver and calls a libmem_foreach_sector_fn_t function for each. If any of the calls return a response other than LIBMEM_STATUS_SUCCESS this function will terminate and return the response.