summaryrefslogtreecommitdiffstats
path: root/perl-install/swap.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-31 00:08:34 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-31 00:08:34 +0000
commit3274c8723d495a7974cb360720abc88ba5a78a67 (patch)
tree19d1c960f478857633705f21fb39cc1d06f32a2c /perl-install/swap.pm
parent26977564bb8eb4076b93e4cd25e95b44a67076ab (diff)
downloaddrakx-backup-do-not-use-3274c8723d495a7974cb360720abc88ba5a78a67.tar
drakx-backup-do-not-use-3274c8723d495a7974cb360720abc88ba5a78a67.tar.gz
drakx-backup-do-not-use-3274c8723d495a7974cb360720abc88ba5a78a67.tar.bz2
drakx-backup-do-not-use-3274c8723d495a7974cb360720abc88ba5a78a67.tar.xz
drakx-backup-do-not-use-3274c8723d495a7974cb360720abc88ba5a78a67.zip
make new perl_checker happy (and that's not easy!)
Diffstat (limited to 'perl-install/swap.pm')
-rw-r--r--perl-install/swap.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/swap.pm b/perl-install/swap.pm
index 7b7597c10..171c2ea1d 100644
--- a/perl-install/swap.pm
+++ b/perl-install/swap.pm
@@ -78,14 +78,14 @@ sub make($;$) {
$nbpages >= 10 or die "swap area needs to be at least " . (10 * $pagesize / 1024) . "kB";
-b $devicename or $checkBlocks = 0;
- my $rdev = (stat $devicename)[6];# or log::l("stat of $devicename failed: $!");
+ my $rdev = (stat $devicename)[6];
$rdev == 0x300 || $rdev == 0x340 and die "$devicename is not a good device for swap";
sysopen F, $devicename, 2 or die "opening $devicename for writing failed: $!";
- if ($version == 0) { $maxpages = $V0_MAX_PAGES; }
- elsif (kernel_greater_or_equal(2,2,1)) { $maxpages = $V1_MAX_PAGES; }
- else { $maxpages = min($V1_OLD_MAX_PAGES, $V1_MAX_PAGES); }
+ if ($version == 0) { $maxpages = $V0_MAX_PAGES }
+ elsif (kernel_greater_or_equal(2,2,1)) { $maxpages = $V1_MAX_PAGES }
+ else { $maxpages = min($V1_OLD_MAX_PAGES, $V1_MAX_PAGES) }
if ($nbpages > $maxpages) {
$nbpages = $maxpages;
@@ -95,7 +95,7 @@ sub make($;$) {
if ($checkBlocks) {
$badpages = check_blocks(*F, $version, $nbpages);
} elsif ($version == 0) {
- for (my $i = 0; $i < $nbpages; $i++) { vec($signature_page, $i, 1) = 1; }
+ for (my $i = 0; $i < $nbpages; $i++) { vec($signature_page, $i, 1) = 1 }
}
$version == 0 and !vec($signature_page, 0, 1) and die "bad block on first page";