summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2017-01-28 17:16:36 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2017-02-25 11:31:10 +0000
commit75445cb236238e0203eb3e162c0f7ebcddcceba2 (patch)
tree92a0be24e6ce8dcbd69c860b6712fcd5a6bc27e4 /perl-install/partition_table.pm
parent6f0880e11d1f83ca239c823cece00fc7d034dddb (diff)
downloaddrakx-75445cb236238e0203eb3e162c0f7ebcddcceba2.tar
drakx-75445cb236238e0203eb3e162c0f7ebcddcceba2.tar.gz
drakx-75445cb236238e0203eb3e162c0f7ebcddcceba2.tar.bz2
drakx-75445cb236238e0203eb3e162c0f7ebcddcceba2.tar.xz
drakx-75445cb236238e0203eb3e162c0f7ebcddcceba2.zip
Document new partition table object API used when writing partition tables.
v2 (tvignaud): enhance doc
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm27
1 files changed, 27 insertions, 0 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 76da83b81..955a71a3f 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -462,6 +462,33 @@ sub tell_kernel {
Write the partition table
+The partition_table_XXX object is expected to provide three functions to
+support writing the partition table:
+
+=over
+
+=item * start_write()
+
+start_write() is called once at the beginning to initiate the write operation,
+
+=item * write()
+
+write() is then called one or more times (depending on whether there are any
+extended partitions),
+
+=item * end_write().
+
+and end_write() is called once to complete the write operation.
+
+=back
+
+For partition table types that support extended partitions (e.g. DOS),
+start_write() is expected to return a file handle to the raw device which is
+then passed to write() and end_write(), allowing the entire table to be written
+before closing the raw device. For partition table types that don't support
+extended partitions, this is optional, and the entire write operation can be
+performed in the single call to write().
+
=cut
sub write {