summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-04-17 11:34:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-04-17 11:34:32 +0000
commit4781e491c32fdfe0dbe3cf97a8aca90040a9406b (patch)
treeca4f166763cc8be7bc01e943dcbf5a058758060d /perl-install/partition_table.pm
parent5458ef92ec80fab427e4d69b5cdd22bb76b261d8 (diff)
downloaddrakx-backup-do-not-use-4781e491c32fdfe0dbe3cf97a8aca90040a9406b.tar
drakx-backup-do-not-use-4781e491c32fdfe0dbe3cf97a8aca90040a9406b.tar.gz
drakx-backup-do-not-use-4781e491c32fdfe0dbe3cf97a8aca90040a9406b.tar.bz2
drakx-backup-do-not-use-4781e491c32fdfe0dbe3cf97a8aca90040a9406b.tar.xz
drakx-backup-do-not-use-4781e491c32fdfe0dbe3cf97a8aca90040a9406b.zip
new perl_checker compliance
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm18
1 files changed, 9 insertions, 9 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 5279552f9..a421c603c 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -731,7 +731,7 @@ The only solution is to move your primary partitions to have the hole next to th
}
sub add {
- my ($hd, $part, $primaryOrExtended, $forceNoAdjust) = @_;
+ my ($hd, $part, $b_primaryOrExtended, $b_forceNoAdjust) = @_;
get_normal_parts($hd) >= ($hd->{device} =~ /^rd/ ? 7 : $hd->{device} =~ /^(sd|ida|cciss|ataraid)/ ? 15 : 63) and cdie "maximum number of partitions handled by linux reached";
@@ -739,18 +739,18 @@ sub add {
$part->{isFormatted} = 0;
$part->{rootDevice} = $hd->{device};
$part->{start} ||= 1 if arch() !~ /^sparc/; #- starting at sector 0 is not allowed
- adjustStartAndEnd($hd, $part) unless $forceNoAdjust;
+ adjustStartAndEnd($hd, $part) unless $b_forceNoAdjust;
my $nb_primaries = $hd->{device} =~ /^rd/ ? 3 : 1;
if (arch() =~ /^sparc|ppc/ ||
- $primaryOrExtended eq 'Primary' ||
- $primaryOrExtended !~ /Extended/ && @{$hd->{primary}{normal} || []} < $nb_primaries) {
+ $b_primaryOrExtended eq 'Primary' ||
+ $b_primaryOrExtended !~ /Extended/ && @{$hd->{primary}{normal} || []} < $nb_primaries) {
eval { add_primary($hd, $part) };
goto success if !$@;
}
if ($hd->hasExtended) {
- eval { add_extended($hd, $part, $primaryOrExtended) };
+ eval { add_extended($hd, $part, $b_primaryOrExtended) };
goto success if !$@;
}
{
@@ -779,7 +779,7 @@ sub next_start {
}
sub load {
- my ($hd, $file, $force) = @_;
+ my ($hd, $file, $b_force) = @_;
local *F;
open F, $file or die \N("Error reading file %s", $file);
@@ -795,12 +795,12 @@ sub load {
my %h; @h{@fields2save} = @$h;
- $h{totalsectors} == $hd->{totalsectors} or $force or cdie "bad totalsectors";
+ $h{totalsectors} == $hd->{totalsectors} or $b_force or cdie "bad totalsectors";
#- unsure we don't modify totalsectors
local $hd->{totalsectors};
- @{$hd}{@fields2save} = @$h;
+ @$hd{@fields2save} = @$h;
delete @$_{qw(isMounted isFormatted notFormatted toFormat toFormatUnsure)} foreach get_normal_parts($hd);
$hd->{isDirty} = $hd->{needKernelReread} = 1;
@@ -808,7 +808,7 @@ sub load {
sub save {
my ($hd, $file) = @_;
- my @h = @{$hd}{@fields2save};
+ my @h = @$hd{@fields2save};
require Data::Dumper;
eval { output($file, Data::Dumper->Dump([\@h], ['$h']), "\0") }
or die \N("Error writing to file %s", $file);