From c75193289b79d4c0687aa6a597b51436568f8360 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sun, 6 Aug 2000 00:38:57 +0000 Subject: no_comment --- perl-install/partition_table_raw.pm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'perl-install/partition_table_raw.pm') 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 -- cgit v1.2.1