gpllib: Add parse_partition_table() to iterate through all partitions on a disk
authorPierre-Alexandre Meyer <pierre@mouraf.org>
Sun, 26 Apr 2009 21:09:18 +0000 (14:09 -0700)
committerPierre-Alexandre Meyer <pierre@mouraf.org>
Sun, 26 Apr 2009 21:09:18 +0000 (14:09 -0700)
commit262e71498984cd2518cde54961f92c12e2f5ad0a
treec34bdf48009a2c6eef926d1de8a8e60c6f6a6a3d
parent3ea01d1af4dd0c22b292ce887141a95c9d629f19
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>
com32/gplinclude/disk/msdos.h [new file with mode: 0644]
com32/gpllib/Makefile
com32/gpllib/disk/msdos.c [new file with mode: 0644]