diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2002-08-05 15:50:33 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2002-08-05 15:50:33 +0000 |
commit | c31f5e1ac1fa888a570b570f73c633165d44c53b (patch) | |
tree | 8f58e828e050b822470636bd5ceb6c10c0359777 /perl-install | |
parent | 86e1fe2e37be9997d1643cedf884b212c8147b4c (diff) | |
download | drakx-c31f5e1ac1fa888a570b570f73c633165d44c53b.tar drakx-c31f5e1ac1fa888a570b570f73c633165d44c53b.tar.gz drakx-c31f5e1ac1fa888a570b570f73c633165d44c53b.tar.bz2 drakx-c31f5e1ac1fa888a570b570f73c633165d44c53b.tar.xz drakx-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')
-rw-r--r-- | perl-install/harddrake/ui.pm | bin | 9851 -> 9916 bytes | |||
-rw-r--r-- | perl-install/modparm.pm | 33 | ||||
-rw-r--r-- | perl-install/modules.pm | 2 |
3 files changed, 10 insertions, 25 deletions
diff --git a/perl-install/harddrake/ui.pm b/perl-install/harddrake/ui.pm Binary files differindex 9e9a9104f..2ccc1b5e3 100644 --- a/perl-install/harddrake/ui.pm +++ b/perl-install/harddrake/ui.pm 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; } diff --git a/perl-install/modules.pm b/perl-install/modules.pm index 33672bb10..b72de2053 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -8,7 +8,7 @@ use run_program; use log; use list_modules; -my %conf; +our %conf; sub category2modules_and_description { my ($categories) = @_; |