gpllib: Add parse_partition_table() to iterate through all partitions on a disk
Impact: expand gpllib disk API
parse_partition_table() can be used to execute a callback on each partition.
The signature of the callback is:
void callback(struct driveinfo *drive_info,
struct part_entry *ptab,
struct part_entry *ptab_root,
int offset_root,
int local_partition_number,
int ebr_seen)
* drive_info represents the disk.
* ptab is the current partition entry processed.
* ptab_root is the partition entry linking to the current one processed (extended only).
* offset_root is the offset of the ebr when iterating through extended partitions
(0 otherwise).
* local_partition_number is the number of the partition processed (0->3).
* ebr_seen counts the total number of ebr processed.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>