summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table/dos.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2018-11-22 15:58:13 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2018-11-22 16:04:19 +0100
commit280850cbe303d140ae7733f73bcb17c5903b60ed (patch)
tree0f1f8f1994e3f72b83930d22405387ea4cac8d00 /perl-install/partition_table/dos.pm
parent9f3b9ebfdcebcfc9d202a9e2aa155278c83776f0 (diff)
downloaddrakx-280850cbe303d140ae7733f73bcb17c5903b60ed.tar
drakx-280850cbe303d140ae7733f73bcb17c5903b60ed.tar.gz
drakx-280850cbe303d140ae7733f73bcb17c5903b60ed.tar.bz2
drakx-280850cbe303d140ae7733f73bcb17c5903b60ed.tar.xz
drakx-280850cbe303d140ae7733f73bcb17c5903b60ed.zip
enhance partition_table doc
Diffstat (limited to 'perl-install/partition_table/dos.pm')
-rw-r--r--perl-install/partition_table/dos.pm33
1 files changed, 29 insertions, 4 deletions
diff --git a/perl-install/partition_table/dos.pm b/perl-install/partition_table/dos.pm
index 92b28beee..51c82e108 100644
--- a/perl-install/partition_table/dos.pm
+++ b/perl-install/partition_table/dos.pm
@@ -14,6 +14,16 @@ use fs::proc_partitions;
use fs::type;
use c;
+=head1 SYNOPSYS
+
+Read/write MBR partition tables
+
+=head1 Functions
+
+=over
+
+=cut
+
my @fields = qw(active start_head start_sec start_cyl pt_type end_head end_sec end_cyl start size);
my $format = "C8 V2";
my $magic = "\x55\xAA";
@@ -95,7 +105,12 @@ sub CHS2rawCHS {
[ $c & 0xff, $h, ($s + 1) | (($c >> 2) & 0xc0) ];
}
-# returns (cylinder, head, sector)
+=item sector2CHS($geom, $start)
+
+returns (cylinder, head, sector)
+
+=cut
+
sub sector2CHS {
my ($geom, $start) = @_;
my ($s, $h);
@@ -239,7 +254,12 @@ sub read_one {
[ @pt ];
}
-# prepare to write the partition table (and extended ones)
+=item start_write($hd)
+
+Prepare to write the partition table (and extended ones)
+
+=cut
+
sub start_write {
my ($hd) = @_;
@@ -256,8 +276,13 @@ sub start_write {
$F;
}
-# write the partition table (and extended ones)
-# for each entry, it uses fields: start, size, pt_type, active
+=item start_write($hd, $F, $sector, $pt)
+
+Write the partition table (and extended ones).
+For each entry, it uses fields: start, size, pt_type, active
+
+=cut
+
sub write {
my ($hd, $F, $sector, $pt) = @_;