diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2002-07-31 20:11:23 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2002-07-31 20:11:23 +0000 |
commit | f366a8b59c428eb5a5100bc69ab7f2e1b67af7e3 (patch) | |
tree | b174dd840799c3d04dcd697204f7758a6dc07a53 /perl-install | |
parent | 0b240c866a651e814175a55cbca925e2a9347875 (diff) | |
download | drakx-f366a8b59c428eb5a5100bc69ab7f2e1b67af7e3.tar drakx-f366a8b59c428eb5a5100bc69ab7f2e1b67af7e3.tar.gz drakx-f366a8b59c428eb5a5100bc69ab7f2e1b67af7e3.tar.bz2 drakx-f366a8b59c428eb5a5100bc69ab7f2e1b67af7e3.tar.xz drakx-f366a8b59c428eb5a5100bc69ab7f2e1b67af7e3.zip |
split parameters in raw_parameters and parameters. raw_parameters is
used by harddrake to list module options in order to offer a module
configuration window.
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/modparm.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/perl-install/modparm.pm b/perl-install/modparm.pm index ee5fd46ab..baeab41f8 100644 --- a/perl-install/modparm.pm +++ b/perl-install/modparm.pm @@ -10,7 +10,7 @@ use common; use modules; -sub parameters { +sub raw_parameters { my ($module) = @_; my $modinfo = '/sbin/modinfo'; @@ -46,6 +46,16 @@ sub parameters { } #- print "STILL HAVE ($_)\n" if $_; + push @parameters, [ $name, $1, $description, $min, $max, $is_a_number ]; + } + @parameters; +} + +sub parameters { + my ($module) = @_; + my @parameters ; + foreach (raw_parameters($module)) { + my ($name, $format_, $description, $min, $max, $is_a_number) = @$_; my $format = $min == 1 && $max == 1 ? ($is_a_number ? _("a number") : '') : |