summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table/mac.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-11 13:40:09 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-11 13:40:09 +0000
commit2db19d156087ccce3037b2bd2da1042280e17904 (patch)
tree0acaff93899445e13d78facbd0aa0da28558a04f /perl-install/partition_table/mac.pm
parentc1e398be894ecce6394bd76c99b76c022979ac62 (diff)
downloaddrakx-backup-do-not-use-2db19d156087ccce3037b2bd2da1042280e17904.tar
drakx-backup-do-not-use-2db19d156087ccce3037b2bd2da1042280e17904.tar.gz
drakx-backup-do-not-use-2db19d156087ccce3037b2bd2da1042280e17904.tar.bz2
drakx-backup-do-not-use-2db19d156087ccce3037b2bd2da1042280e17904.tar.xz
drakx-backup-do-not-use-2db19d156087ccce3037b2bd2da1042280e17904.zip
- do not use "foreach $var (...) {...}" use "foreach my $var (...) {...}" instead
(only pb are functions called in {...} that could use $var, none found except in commands.pm) - various small syntax enhancements to please perl_checker
Diffstat (limited to 'perl-install/partition_table/mac.pm')
-rw-r--r--perl-install/partition_table/mac.pm8
1 files changed, 3 insertions, 5 deletions
diff --git a/perl-install/partition_table/mac.pm b/perl-install/partition_table/mac.pm
index 45c614139..33b63aa99 100644
--- a/perl-install/partition_table/mac.pm
+++ b/perl-install/partition_table/mac.pm
@@ -105,9 +105,8 @@ sub read($$) {
sysread F, $tmp, psizeof($bz_format) or die "error while reading bz \(Block Zero\) in sector $sector";
my %info; @info{@$bz_fields} = unpack $bz_format, $tmp;
- my $i;
- foreach $i (0 .. $info{bzDrvrCnt}-1) {
+ foreach my $i (0 .. $info{bzDrvrCnt}-1) {
sysread F, $tmp, psizeof($dd_format) or die "error while reading driver data in sector $sector";
my %dd; @dd{@$dd_fields} = unpack $dd_format, $tmp;
push @{$info{ddMap}}, \%dd;
@@ -129,7 +128,7 @@ sub read($$) {
c::lseek_sector(fileno(F), $sector, 512) or die "reading of partition in sector $sector failed";
my @pt;
- for ($i=0;$i<$partmapsize;$i++) {
+ for (my $i=0;$i<$partmapsize;$i++) {
my $part;
sysread F, $part, psizeof($p_format) or die "error while reading partition info in sector $sector";
@@ -240,8 +239,7 @@ sub write($$$;$) {
# Since we didn't create any new drivers, let's try and match up our driver records with out partitons and see if any are missing.
$info->{bzDrvrCnt} = 0;
my @ddstowrite;
- my $dd;
- foreach $dd (@{$info->{ddMap}}) {
+ foreach my $dd (@{$info->{ddMap}}) {
foreach (@partstowrite) {
if ($dd->{ddBlock} == $_->{pPBlockStart}) {
push @ddstowrite, $dd;