From f09ee6700bf31fe5edc9d1070474346f8e4f3720 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 12 Aug 2004 08:24:48 +0000 Subject: enhance based on perl_checker suggestion, but not using it :) --- perl-install/fs.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'perl-install/fs.pm') diff --git a/perl-install/fs.pm b/perl-install/fs.pm index c93334429..f73182941 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -288,9 +288,8 @@ sub prepare_write_fstab { # handle bloody supermount special case if ($options =~ /supermount/) { my @l = grep { $_ ne 'supermount' } split(',', $options); - my @l1 = grep { member($_, 'ro', 'exec') } @l; - my @l2 = difference2(\@l, \@l1); - $options = join(",", "dev=$dev", "fs=$fs_type", @l1, if_(@l2, '--', @l2)); + my ($l1, $l2) = partition { member($_, 'ro', 'exec') } @l; + $options = join(",", "dev=$dev", "fs=$fs_type", @$l1, if_(@$l2, '--', @$l2)); ($dev, $fs_type) = ('none', 'supermount'); } else { #- if we were using supermount, the type could be something like ext2:vfat -- cgit v1.2.1