#include <oskit/diskpart/diskpart.h>struct diskpart *diskpart_lookup_bsd_string(struct diskpart *array, char *name);
This function is a sample lookup routine which finds a partition given a FreeBSD style slice string. If no slice number is given, it defaults to the first BSD partition, and then to the whole disk if no BSD partition is found.
- array
- This should be the pointer to the start of the array.
- name
- A case-insensitive, NULL-terminated, ASCII string containing an optional Slice specifier followed by an optional partition. [s<num>][<part>], where part is a valid partition in the BSD slice specified by num (or default).
Returns a pointer to the corresponding partition entry, or zero if it is invalid.