From 280850cbe303d140ae7733f73bcb17c5903b60ed Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 22 Nov 2018 15:58:13 +0100 Subject: enhance partition_table doc --- perl-install/partition_table.pm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'perl-install/partition_table.pm') diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index 791e8254b..da53822d1 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -289,6 +289,12 @@ sub initialize { will_tell_kernel($hd, 'init'); } +=item read_primary($hd) + +Identify the partition table type of $hd and return a blessed $pt of type partition_table::TYPE. + +=cut + sub read_primary { my ($hd) = @_; @@ -351,6 +357,14 @@ sub read { 1; } +=item read_extended($hd, $extended, $need_removing_empty_extended) + +Actually load the partition list from the blessed $pt of type partition_table::TYPE. + +It uses partition_table::TYPE::read_one() + +=cut + sub read_extended { my ($hd, $extended, $need_removing_empty_extended) = @_; @@ -391,6 +405,12 @@ sub read_extended { } } +=item will_tell_kernel($hd, $action, $o_part, $o_delay) + +Rembmer the actions to perform on the partition table that the kernel will later be made aware of. + +=cut + sub will_tell_kernel { my ($hd, $action, $o_part, $o_delay) = @_; @@ -430,6 +450,18 @@ sub will_tell_kernel_delayed { } } +=item tell_kernel($hd, $tell_kernel) + +Tell the kernel that the partition layout has changed. + +Take a list of [$action, $part_number, $o_start, $o_size]. +Action can be either 'add' or 'del'. +Size is not needed when deleting a partition. + +eg: ['add', '3', '5000', '1000'] + +=cut + sub tell_kernel { my ($hd, $tell_kernel) = @_; -- cgit v1.2.1