summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table_raw.pm
diff options
context:
space:
mode:
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