Bug 208753 - Error when a module which is also a directory name is given to modinfo
Summary: Error when a module which is also a directory name is given to modinfo
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: module-init-tools
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jon Masters
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-10-01 17:04 UTC by Radek Bíba
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-08-20 06:33:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Radek Bíba 2006-10-01 17:04:09 UTC
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):
module-init-tools-3.2.2-0.FC5.3

How reproducible:
Always

Steps to Reproduce:
(For example: )
1. cd /lib/modules/`uname -r`/kernel/drivers/net
2. modinfo e1000
  
Actual results:
modinfo: could not open e1000: Is a directory

Expected results:
information about the given module, as it does when one runs the command in
another directory

Comment 1 Jon Masters 2006-11-10 11:12:41 UTC
Yup. Good catch. I'll get modinfo fixed.

Comment 2 Jon Masters 2007-01-25 22:51:33 UTC
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?

Jon.

Comment 3 Radek Bíba 2007-01-26 07:31:08 UTC
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).

Comment 4 Jon Masters 2007-08-20 06:33:52 UTC
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.

Jon.



Note You need to log in before you can comment on or make changes to this bug.