summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table_raw.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-08-06 00:38:57 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-08-06 00:38:57 +0000
commitc75193289b79d4c0687aa6a597b51436568f8360 (patch)
tree0dde0958b1d48a729e30be420f9f8c94004b7ef8 /perl-install/partition_table_raw.pm
parentc5d30320d3d120ccd291ccc7b7271400a4f20e4a (diff)
downloaddrakx-c75193289b79d4c0687aa6a597b51436568f8360.tar
drakx-c75193289b79d4c0687aa6a597b51436568f8360.tar.gz
drakx-c75193289b79d4c0687aa6a597b51436568f8360.tar.bz2
drakx-c75193289b79d4c0687aa6a597b51436568f8360.tar.xz
drakx-c75193289b79d4c0687aa6a597b51436568f8360.zip
no_comment
Diffstat (limited to 'perl-install/partition_table_raw.pm')
-rw-r--r--perl-install/partition_table_raw.pm15
1 files changed, 14 insertions, 1 deletions
diff --git a/perl-install/partition_table_raw.pm b/perl-install/partition_table_raw.pm
index 4fe3fe73b..70bb99fd4 100644
--- a/perl-install/partition_table_raw.pm
+++ b/perl-install/partition_table_raw.pm
@@ -9,9 +9,10 @@ use c;
my @MBR_signatures = (
[ 'empty', 0, "\0\0\0\0" ],
+ [ 'grub', 0, "\xEBG", 0x17d, "stage1 \0" ],
+ [ 'grub', 0, "\xEBH", 0x18a, "stage1 \0" ],
[ 'lilo', 0x2, "LILO" ],
[ 'lilo', 0x6, "LILO" ],
- [ 'grub', 0x17d, "stage1 \0" ],
[ 'osbs', 0x2, "OSBS" ], #- http://www.prz.tu-berlin.de/~wolf/os-bs.html
[ 'pqmagic', 0xef, "PQV" ],
[ 'BootStar', 0x130, "BootStar:" ],
@@ -88,6 +89,18 @@ sub get_geometry($) {
{ geom => \%geom, totalsectors => $geom{heads} * $geom{sectors} * $geom{cylinders} };
}
+#- works for both hard drives and partitions ;p
+sub description {
+ my ($hd) = @_;
+ my $win = $hd->{device_windobe};
+
+ sprintf "%s%s (%d%s%s)",
+ $hd->{device},
+ $win && " [$win:]",
+ ($hd->{totalsectors} || $hd->{size}) >> 11, _("MB"),
+ $hd->{info} && ", $hd->{info}";
+}
+
sub openit($$;$) { sysopen $_[1], $_[0]{file}, $_[2] || 0; }
# cause kernel to re-read partition table