summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table_raw.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-10-08 11:42:45 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-10-08 11:42:45 +0000
commit0f48e147d39575f98db29f7e21d5347e6e309d04 (patch)
treefba03e3d6c57d3b202f973fc11907372dd26f64e /perl-install/partition_table_raw.pm
parentc5a4cbe6c55d38bcc411bd94f088f36b85681899 (diff)
downloaddrakx-0f48e147d39575f98db29f7e21d5347e6e309d04.tar
drakx-0f48e147d39575f98db29f7e21d5347e6e309d04.tar.gz
drakx-0f48e147d39575f98db29f7e21d5347e6e309d04.tar.bz2
drakx-0f48e147d39575f98db29f7e21d5347e6e309d04.tar.xz
drakx-0f48e147d39575f98db29f7e21d5347e6e309d04.zip
no_comment
Diffstat (limited to 'perl-install/partition_table_raw.pm')
-rw-r--r--perl-install/partition_table_raw.pm17
1 files changed, 3 insertions, 14 deletions
diff --git a/perl-install/partition_table_raw.pm b/perl-install/partition_table_raw.pm
index d10d66fc3..7cb61a371 100644
--- a/perl-install/partition_table_raw.pm
+++ b/perl-install/partition_table_raw.pm
@@ -3,7 +3,7 @@ package partition_table_raw;
use diagnostics;
use strict;
-use common qw(:common :system);
+use common qw(:common :system :file);
use devices;
use c;
@@ -20,6 +20,8 @@ my @MBR_signatures = (
[ 'dos', 0xa0, "\x25\x03\x4E\x02\xCD\x13" ],
);
+sub typeOfMBR($) { typeFromMagic(devices::make($_[0]), @MBR_signatures) }
+
sub compute_CHS($$) {
my ($hd, $e) = @_;
my @l = qw(cyl head sec);
@@ -112,19 +114,6 @@ sub zero_MBR($) {
delete $hd->{extended};
}
-sub typeOfMBR($) {
- my $dev = devices::make($_[0]);
- local *F; sysopen F, $dev, 0 or return;
-
- my $tmp;
- foreach (@MBR_signatures) {
- my ($name, $offset, $signature) = @$_;
- sysseek(F, $offset, 0) or next;
- sysread(F, $tmp, length $signature);
- $tmp eq $signature and return $name;
- }
- undef;
-}
sub isFatFormatted($) {
my $dev = devices::make($_[0]);