Errors with insmod, modprobe, modinfo

Bug #776561 reported by Peter Wu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bash-completion (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: bash-completion

insmod, modprobe and modinfo are handled by one function: _insmod. There is a problem with this approach: the programs are completely different.

insmod does not accept options like -x and --xxx, only modules or paths to modules.

modprobe accepts several -x and --xxx options, these can not always be combined.

modinfo acepts paths to modules or module names, the kernel version can be specified

The following cases generate errors / unexpected behavior:
$ insmod x x<tab>
ERROR: modinfo: could not find module x
$ modinfo x x<tab>
ERROR: modinfo: could not find module x
$ modprobe x x<tab>
ERROR: modinfo: could not find module x
$ modinfo -k 2.6.35-28-generic x<tab>
/sbin/modinfo: option requires an argument -- 'k'
Usage: /sbin/modinfo [-0][-F field][-k kernelversion][-b basedir] module...
 Prints out the information about one or more module(s).
 If a fieldname is given, just print out that field (or nothing if not found).
 Otherwise, print all information out in a readable form
 If -0 is given, separate with nul, not newline.
 If -b is given, use an image of the module tree.

The proposed patch fixes these issues (partially):
- insmod: completely fixed
- modprobe: arguments are incomplete (todo)
- modinfo: completely fixed

The patch can be added to the debian/patches/ directory directly after a review.

Tags: patch
Revision history for this message
Peter Wu (lekensteyn) wrote :
Revision history for this message
Daniel Black (daniel-black) wrote :
Revision history for this message
Daniel Black (daniel-black) wrote :
Changed in bash-completion (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.