summaryrefslogtreecommitdiffstats
path: root/perl-install
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-12 11:54:53 +0000
commit9f3a801d1c0904340249138ed4926e0ca6cee95a (patch)
treedc4207644442c6cdcb33004dcd005e9e04e44db7 /perl-install
parentd274ab5b4c48d0a91a535c976a9e7a9a78b56f05 (diff)
downloaddrakx-9f3a801d1c0904340249138ed4926e0ca6cee95a.tar
drakx-9f3a801d1c0904340249138ed4926e0ca6cee95a.tar.gz
drakx-9f3a801d1c0904340249138ed4926e0ca6cee95a.tar.bz2
drakx-9f3a801d1c0904340249138ed4926e0ca6cee95a.tar.xz
drakx-9f3a801d1c0904340249138ed4926e0ca6cee95a.zip
Document new partition table object API used when writing partition tables.
v2 (tvignaud): enhance doc
Diffstat (limited to 'perl-install')
-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 {