diff options
author | Mystery Man <unknown@mandriva.org> | 2002-08-09 10:26:12 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2002-08-09 10:26:12 +0000 |
commit | fdd0c69b55f6192d1825eb8ddd95bf2806e626f8 (patch) | |
tree | 01303c8c4445a5828d744737e6c87cb973fafba6 /perl-install/modparm.pm | |
parent | 9c49e6bfb611d4a73815cfa1a6e6821cd48a9ae2 (diff) | |
download | drakx-fdd0c69b55f6192d1825eb8ddd95bf2806e626f8.tar drakx-fdd0c69b55f6192d1825eb8ddd95bf2806e626f8.tar.gz drakx-fdd0c69b55f6192d1825eb8ddd95bf2806e626f8.tar.bz2 drakx-fdd0c69b55f6192d1825eb8ddd95bf2806e626f8.tar.xz drakx-fdd0c69b55f6192d1825eb8ddd95bf2806e626f8.zip |
This commit was manufactured by cvs2svn to create tag 'V1_1_9_9mdk'.V1_1_9_9mdk
Diffstat (limited to 'perl-install/modparm.pm')
-rw-r--r-- | perl-install/modparm.pm | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/perl-install/modparm.pm b/perl-install/modparm.pm deleted file mode 100644 index 1e9524572..000000000 --- a/perl-install/modparm.pm +++ /dev/null @@ -1,61 +0,0 @@ -package modparm; # $Id$ - -use diagnostics; -use strict; - -#-###################################################################################### -#- misc imports -#-###################################################################################### -use common; -use modules; - - -sub parameters { - my ($module) = @_; - - my $modinfo = '/sbin/modinfo'; - -x $modinfo or $modinfo = '/usr/bin/modinfo'; - -x $modinfo or die _('modinfo is not available'); - - if (!$::isStandalone && !$::testing) { - modules::extract_modules('/tmp', $module); - $module = "/tmp/$module.o"; - } - - my @parameters; - foreach (common::join_lines(`$modinfo -p $module`)) { - chomp; - next if /^warning:/; - (my $name, $_) = /(\S+)\s+(.*)/s or warn "modparm::get_options_name($module): unknown line\n"; - - my $c_types = 'int|string|short|byte|char|long'; - my ($is_a_number, $description, $min, $max) = (0, '', 1, 1); - if (/^($c_types) array \(min = (\d+), max = (\d+)\),?\s*(.*)/s) { - $_ = $4; - #- seems like "char" are buggy entries - ($is_a_number, $min, $max) = ($1 ne 'string', $2, $3) if $1 ne 'char'; - } elsif (/^($c_types),?\s*(.*)/s) { - $_ = $2; - #- here "char" really are size-limited strings, modinfo doesn't display the size limit (but since we don't care about it, it doesn't matter :) - $is_a_number = $1 ne 'string' if $1 ne 'char'; - } else { - #- for things like "no format character" or "unknown format character" - } - if (/^description "(.*)",?\s*/s) { - ($description, $_) = ($1, $2); - } - #- print "STILL HAVE ($_)\n" if $_; - - 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; -} - -1; |