#include <oskit/diskpart/diskpart.h>int diskpart_blkio_get_partition(oskit_blkio_t *block_io, struct diskpart *array, int array_size);
This function initializes an array of struct diskpart entries. The caller must provide a pointer to a struct diskpart array.This function is a version of diskpart_get_partition using an OSKit ``Block I/O'' interface in place of an explicit callback function.
- block_io
- An oskit_blkio_t that represents the disk whose partitions we are interested in.
- array
- Array of struct diskpart.
- array_size
- integer containing the number of allocated entries in the array.
Returns an integer count of the number of partition entries that were filled by the library. If there were more partitions found than space available, this will be array_size. Empty partitions (unused entries in a BSD disklabel, for example) occupy an entry the same as `used' entries.For example, a PC-DOS partition with a single filled entry would still report 4 partitions, as that is the size of the DOS partition table.
The OSKit Block I/O Interface (section 5.3).