summaryrefslogtreecommitdiffstats
path: root/perl-install/fsedit.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-09-15 06:00:24 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-09-15 06:00:24 +0000
commited55d161e748a30fc10d27eea71323c43e8c5ff9 (patch)
tree331d4d42f326ef6a18b5cdae0c4fbe3598ab5023 /perl-install/fsedit.pm
parent2a3f2f5b5b59d72261bb75c76694a84994a3b4e8 (diff)
downloaddrakx-ed55d161e748a30fc10d27eea71323c43e8c5ff9.tar
drakx-ed55d161e748a30fc10d27eea71323c43e8c5ff9.tar.gz
drakx-ed55d161e748a30fc10d27eea71323c43e8c5ff9.tar.bz2
drakx-ed55d161e748a30fc10d27eea71323c43e8c5ff9.tar.xz
drakx-ed55d161e748a30fc10d27eea71323c43e8c5ff9.zip
explicit scalar false value (otherwise it gives () in list context)
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r--perl-install/fsedit.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 89dc2a090..ddc6a47fd 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -281,14 +281,14 @@ sub is_same_hd {
sub are_same_partitions {
my ($part1, $part2) = @_;
foreach ('start', 'size', 'pt_type', 'fs_type', 'rootDevice') {
- $part1->{$_} eq $part2->{$_} or return;
+ $part1->{$_} eq $part2->{$_} or return 0;
}
1;
}
sub is_one_big_fat_or_NT {
my ($hds) = @_;
- @$hds == 1 or return;
+ @$hds == 1 or return 0;
my @l = fs::get::hds_fstab(@$hds);
@l == 1 && isFat_or_NTFS($l[0]) && fs::get::hds_free_space(@$hds) < 10 << 11;
@@ -357,7 +357,7 @@ sub suggest_part {
grep { !$part->{fs_type} || $part->{fs_type} eq $_->{fs_type} || isTrueFS($part) && isTrueFS($_) }
@local_suggestions;
- defined $best or return; #- sorry no suggestion :(
+ defined $best or return 0; #- sorry no suggestion :(
$part->{mntpoint} = $best->{mntpoint};
fs::type::set_type_subpart($part, $best) if !isTrueFS($best) || !isTrueFS($part);
@@ -379,7 +379,7 @@ sub suggestions_mntpoint {
sub check_mntpoint {
my ($mntpoint, $hd, $part, $all_hds) = @_;
- $mntpoint eq '' || isSwap($part) || isNonMountable($part) and return;
+ $mntpoint eq '' || isSwap($part) || isNonMountable($part) and return 0;
$mntpoint =~ m|^/| or die N("Mount points must begin with a leading /");
$mntpoint =~ m|[\x7f-\xff]| and cdie N("Mount points should contain only alphanumerical characters");
fs::get::mntpoint2part($mntpoint, [ grep { $_ ne $part } fs::get::really_all_fstab($all_hds) ]) and die N("There is already a partition with mount point %s\n", $mntpoint);
@@ -496,9 +496,9 @@ sub auto_allocate_raids {
sub auto_allocate_vgs {
my ($all_hds, $suggestions) = @_;
- my @pvs = grep { isRawLVM($_) } fs::get::fstab($all_hds) or return;
+ my @pvs = grep { isRawLVM($_) } fs::get::fstab($all_hds) or return 0;
- my @vgs = grep { $_->{VG_name} } @$suggestions or return;
+ my @vgs = grep { $_->{VG_name} } @$suggestions or return 0;
partition_table::write(@{$all_hds->{hds}});