Red Hat Bugzilla – Bug 208753
Error when a module which is also a directory name is given to modinfo
Last modified: 2007-11-30 17:11:44 EST
Description of problem:
If a user calls modinfo with a parameter that's also a name of a directory in
current working directory, modinfo complains that it's a directory. It's true
but it's not what is expected from modinfo.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
(For example: )
1. cd /lib/modules/`uname -r`/kernel/drivers/net
2. modinfo e1000
modinfo: could not open e1000: Is a directory
information about the given module, as it does when one runs the command in
Yup. Good catch. I'll get modinfo fixed.
Actually, not sure this is a bug since modinfo can also take a specific path as
an argument - yes, it might be nice to fallback in case it's a directory - but a
file is a directory at the end of the day...I'm not counting this as anything
but literally correct behavior at the moment.
Let me know what you think?
It may be a correct behavior from a programmer's point of view but it's not what
one would expect. I think modinfo should really accept a real (path to a) module
file or a module name, and not get into the described state if the given argument
happens to be a directory, especially when it's not a path (no slash in it).
Hmm. This is pre-existing behavior of m-i-t. I don't like it, but I don't
consider it a huge bug either. I will fix it upstream in due course.