summaryrefslogtreecommitdiffstats
path: root/perl-install/modparm.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-08-05 15:50:33 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-08-05 15:50:33 +0000
commitc31f5e1ac1fa888a570b570f73c633165d44c53b (patch)
tree8f58e828e050b822470636bd5ceb6c10c0359777 /perl-install/modparm.pm
parent86e1fe2e37be9997d1643cedf884b212c8147b4c (diff)
downloaddrakx-backup-do-not-use-c31f5e1ac1fa888a570b570f73c633165d44c53b.tar
drakx-backup-do-not-use-c31f5e1ac1fa888a570b570f73c633165d44c53b.tar.gz
drakx-backup-do-not-use-c31f5e1ac1fa888a570b570f73c633165d44c53b.tar.bz2
drakx-backup-do-not-use-c31f5e1ac1fa888a570b570f73c633165d44c53b.tar.xz
drakx-backup-do-not-use-c31f5e1ac1fa888a570b570f73c633165d44c53b.zip
- export %modules::conf
- kill modparm::raw_parameters and modparm::parameter_type which get merged back in modparm::parameters - add more parameters to modparm::parameters for harddrake harddrake/ui.pm | 19 ++++++++++--------- modparm.pm | 33 +++++++++------------------------ 2 files changed, 19 insertions(+), 33 deletions(-)
Diffstat (limited to 'perl-install/modparm.pm')
-rw-r--r--perl-install/modparm.pm33
1 files changed, 9 insertions, 24 deletions
diff --git a/perl-install/modparm.pm b/perl-install/modparm.pm
index 2defe4221..1e9524572 100644
--- a/perl-install/modparm.pm
+++ b/perl-install/modparm.pm
@@ -9,19 +9,8 @@ use strict;
use common;
use modules;
-sub parameter_type {
- my ($min, $max, $is_a_number) = @_;
- $min == 1 && $max == 1 ?
- ($is_a_number ? _("a number") : '') :
- $min == $max ?
- ($is_a_number ? _("%d comma separated numbers", $min) : _("%d comma separated strings", $min)) :
- $min == 1 ?
- ($is_a_number ? _("comma separated numbers") : _("comma separated strings")) :
- ''; #- to weird and buggy, do not display it
-}
-
-sub raw_parameters {
+sub parameters {
my ($module) = @_;
my $modinfo = '/sbin/modinfo';
@@ -57,18 +46,14 @@ sub raw_parameters {
}
#- print "STILL HAVE ($_)\n" if $_;
- push @parameters, [ $name, $description, $min, $max, $is_a_number ];
- }
- @parameters;
-}
-
-sub parameters {
- my ($module) = @_;
- my @parameters ;
- foreach (raw_parameters($module)) {
- my ($name, $description, $min, $max, $is_a_number) = @$_;
- my $format = parameter_type($min, $max, $is_a_number);
- push @parameters, [ $format ? "$name ($format)" : $name, $description ];
+ my $format = $min == 1 && $max == 1 ?
+ ($is_a_number ? _("a number") : '') :
+ $min == $max ?
+ ($is_a_number ? _("%d comma separated numbers", $min) : _("%d comma separated strings", $min)) :
+ $min == 1 ?
+ ($is_a_number ? _("comma separated numbers") : _("comma separated strings")) :
+ ''; #- to weird and buggy, do not display it
+ push @parameters, [ $format ? "$name ($format)" : $name, $description, $min, $max, $is_a_number ];
}
@parameters;
}