next up previous contents index
Next: 21.5.8 diskpart_blkio_lookup_bsd_string: search for Up: 21.5 API reference Previous: 21.5.6 diskpart_lookup_bsd_compat: search for

21.5.7 diskpart_lookup_bsd_string: search for a partition entry

 

SYNOPSIS

#include <oskit/diskpart/diskpart.h>

struct diskpart *diskpart_lookup_bsd_string(struct diskpart *array, char *name);

DESCRIPTION

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.

PARAMETERS

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

Returns a pointer to the corresponding partition entry, or zero if it is invalid.



University of Utah Flux Research Group