summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table/dos.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-05 07:47:36 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-05 07:47:36 +0000
commit0a23f36bd52f14f68cc394c37ef7a9af0c406caa (patch)
tree96cf9a72f416f0c2175055e43e1fbe2e3918ef1b /perl-install/partition_table/dos.pm
parent51fd51c2f560620d0e5c73a824d7677661f9c385 (diff)
downloaddrakx-0a23f36bd52f14f68cc394c37ef7a9af0c406caa.tar
drakx-0a23f36bd52f14f68cc394c37ef7a9af0c406caa.tar.gz
drakx-0a23f36bd52f14f68cc394c37ef7a9af0c406caa.tar.bz2
drakx-0a23f36bd52f14f68cc394c37ef7a9af0c406caa.tar.xz
drakx-0a23f36bd52f14f68cc394c37ef7a9af0c406caa.zip
big renaming of field {type} to {pt_type},
this will allow defining {fs_type} which will always be a string whereas {pt_type} will always be a number
Diffstat (limited to 'perl-install/partition_table/dos.pm')
-rw-r--r--perl-install/partition_table/dos.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/partition_table/dos.pm b/perl-install/partition_table/dos.pm
index 86f2c0256..38cdf60ed 100644
--- a/perl-install/partition_table/dos.pm
+++ b/perl-install/partition_table/dos.pm
@@ -11,7 +11,7 @@ use partition_table::raw;
use partition_table;
use c;
-my @fields = qw(active start_head start_sec start_cyl type end_head end_sec end_cyl start size);
+my @fields = qw(active start_head start_sec start_cyl pt_type end_head end_sec end_cyl start size);
my $format = "C8 V2";
my $magic = "\x55\xAA";
my $nb_primary = 4;
@@ -52,7 +52,7 @@ sub compute_CHS {
sub CHS_from_part_rawCHS {
my ($part) = @_;
- $part->{start} || $part->{type} or return;
+ $part->{start} || $part->{pt_type} or return;
my ($raw_chs_start, $raw_chs_end) = get_rawCHS($part);
rawCHS2CHS($raw_chs_start), rawCHS2CHS($raw_chs_end);
@@ -61,7 +61,7 @@ sub CHS_from_part_rawCHS {
sub CHS_from_part_linear {
my ($geom, $part) = @_;
- $part->{start} || $part->{type} or return;
+ $part->{start} || $part->{pt_type} or return;
sector2CHS($geom, $part->{start}), sector2CHS($geom, $part->{start} + $part->{size} - 1);
}
@@ -197,7 +197,7 @@ sub read {
}
# write the partition table (and extended ones)
-# for each entry, it uses fields: start, size, type, active
+# for each entry, it uses fields: start, size, pt_type, active
sub write($$$;$) {
my ($hd, $sector, $pt) = @_;
@@ -215,7 +215,7 @@ sub write($$$;$) {
foreach (@$pt) {
compute_CHS($hd, $_);
local $_->{start} = $_->{local_start} || 0;
- $_->{active} ||= 0; $_->{type} ||= 0; $_->{size} ||= 0; #- for no warning
+ $_->{active} ||= 0; $_->{pt_type} ||= 0; $_->{size} ||= 0; #- for no warning
syswrite $F, pack($format, @$_{@fields}), psizeof($format) or return 0;
}
syswrite $F, $magic, length $magic or return 0;