There is a general convention of names and return values of the functions
specific for each partition table. Suppose we have a partition table
type XYZ
, then in general there can be up to four functions specific
for this partition table type. They are:
read_XYZ_partitions(int filehandle, struct disk_info *diskinfo, ERR_PARAM);
tries to read in the partition table of type XYZ
. If successful it returns a non-negative value, if the partition table is not present it returns the value of RP_NOERR
.
commit_XYZ_partitions(int filehandle, struct disk_info *diskinfo, int checkonly, ERR_PARAM);
analyzes the designed changes in the partition structures, checks that partition table can be created for the proposed changes and if not invoked in `check-only' mode modifies the partition table.
clear_XYZ_magic(int filehandle, ERR_PARAM);
clears the partition table specific magics from the device if they are present.
int cmp_XYZ_entry(struct part_entry_XYZ entry1, struct part_entry_XYZ entry2);
checks whether two partition table entries of type XYZ
are same. If they are same the function returns zero, otherwise one.