summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table_raw.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-19 17:31:42 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-19 17:31:42 +0000
commit25f65beed0677fa247c513705dbf538225f979c4 (patch)
treee0ec937937cba2d6279e97b3b7036fe0856d5bb2 /perl-install/partition_table_raw.pm
parenta0b5f74447cc699c43c354cb6397ed554605729b (diff)
downloaddrakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.tar
drakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.tar.gz
drakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.tar.bz2
drakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.tar.xz
drakx-backup-do-not-use-25f65beed0677fa247c513705dbf538225f979c4.zip
no_comment
Diffstat (limited to 'perl-install/partition_table_raw.pm')
-rw-r--r--perl-install/partition_table_raw.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/perl-install/partition_table_raw.pm b/perl-install/partition_table_raw.pm
index 8ccba3557..2cc83259f 100644
--- a/perl-install/partition_table_raw.pm
+++ b/perl-install/partition_table_raw.pm
@@ -15,8 +15,8 @@ my $nb_primary = 4;
my $offset = $common::SECTORSIZE - length($magic) - $nb_primary * common::psizeof($format);
my @MBR_signatures = (
- [ 'LILO', 0x6, 'LILO' ],
- [ 'DOS', 0xa0, '\x25\x03\x4E\x02\x\xCD\x13' ],
+ [ 'LILO', 0x6, "LILO" ],
+ [ 'DOS', 0xa0, "\x25\x03\x4E\x02\xCD\x13" ],
);
sub compute_CHS($$) {
@@ -45,7 +45,7 @@ sub sector2CHS($$) {
sub get_geometry($) {
my ($dev) = @_;
my $g = "";
-
+
local *F; sysopen F, $dev, 0 or return;
ioctl(F, c::HDIO_GETGEO(), $g) or return;
@@ -56,7 +56,7 @@ sub get_geometry($) {
sub openit($$;$) { sysopen $_[1], $_[0]{file}, $_[2] || 0; }
-# cause kernel to re-read partition table
+# cause kernel to re-read partition table
sub kernel_read($) {
my ($hd) = @_;
local *F; openit($hd, \*F) or return 0;
@@ -119,7 +119,8 @@ sub typeOfMBR($) {
foreach (@MBR_signatures) {
my ($name, $offset, $signature) = @$_;
sysseek(F, $offset, 0) or next;
- sysread(F, $tmp, length $signature) && $tmp eq $signature and return $name;
+ sysread(F, $tmp, length $signature);
+ $tmp eq $signature and return $name;
}
undef;
}