2.6.2: "-" or "_", thats the question
Hi folks,
'cat /proc/modules' returns most (all?) of the module names with "_", e.g.
: ipt_conntrack ip_conntrack iptable_filter ip_tables uhci_hcd ohci_hcd ehci_hcd :
Very consistent. But the filenames of some kernel modules are still written with "-", e.g.
/lib/modules/2.6.2/kernel/drivers/usb/host/ehci-hcd.ko /lib/modules/2.6.2/kernel/drivers/usb/host/ohci-hcd.ko /lib/modules/2.6.2/kernel/drivers/usb/host/uhci-hcd.ko
What would be the correct way to get the filename of a loaded module? The basename would be sufficient.
Regards
Harri
Quoted 26 lines · Harald Dunkel
Hi folks,
'cat
/proc/modules' returns most (all?) of the module names with "_", e.g.: ipt_conntrack ip_conntrack iptable_filter ip_tables uhci_hcd ohci_hcd ehci_hcd :Very consistent. But the filenames of some kernel modules are still written with "-", e.g.
/lib/modules/2.6.2/kernel/drivers/usb/host/ehci-hcd.ko /lib/modules/2.6.2/kernel/drivers/usb/host/ohci-hcd.ko /lib/modules/2.6.2/kernel/drivers/usb/host/uhci-hcd.koWhat would be the correct way to get the filename of a loaded module? The basename would be sufficient.
Quoted 10 lines
Regards
Harri
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
The symbole names used in source code, like function names tend to use "_", while the file names use "-" IMHO.
Coywolf Qi Hunt
Quoted 9 lines · Coywolf Qi Hunt
Quoted 5 lines · Harald Dunkel
What would be the correct way to get the filename of a loaded module? The basename would be sufficient.
The symbole names used in source code, like function names tend to use "_", while the file names use "-" IMHO.
Naturally the symbols in the code use '_', cause for C '-' is not allowed within symbol names.
I am interested in the module file names. 'cat /proc/modules' should return the correct module names, but for some modules (like uhci_hcd vs uhci-hcd.ko) '_' and '-' are messed up.
Regards
Harri
Quoted 12 lines · On Sun, 15 Feb 2004 10:58:54 +0100 Harald Dunkel <[email protected]>…
Quoted 10 lines · Coywolf Qi Hunt
Quoted 5 lines · Harald Dunkel
What would be the correct way to get the filename of a loaded module? The basename would be sufficient.
The symbole names used in source code, like function names tend to use "_", while the file names use "-" IMHO.
Quoted 6 lines
Naturally the symbols in the code use '_', cause for C '-' is not allowed within symbol names.
I am interested in the module file names. 'cat
/proc/modules' should return the correct module names, but for some modules (likeuhci_hcdvs uhci-hcd.ko) '_' and '-' are messed up.
We canonicalize them at every point: you can use both.
Most users don't want to remember that it's ip_conntrack but uhci-hcd.
Hope that clarifies,
Rusty.
Signature · 2 lines
there are those who do and those who hang on and you don't see too many doers quoting their contemporaries. -- Larry McVoy
Quoted 1 line · Rusty Russell
Most users don't want to remember that it's
ip_conntrackbut uhci-hcd.
I'd like to chime in about this.
I'd prefer it be - all the way around (I know I can use either). Since I can ask for module uhci_hcd or uhci-hcd and get uhci-hcd.ko loaded, I've been using -. It's a bit easier to type since I don't have to hit shift for each _
Signature · 1 line
Lab tests show that use of micro$oft causes cancer in lab animals
Quoted 5 lines · Wakko Warner
Quoted 1 line · Rusty Russell
Most users don't want to remember that it's
ip_conntrackbut uhci-hcd.
Quoted 7 lines
I'd like to chime in about this.
I'd prefer it be - all the way around (I know I can use either). Since I can ask for module
uhci_hcdor uhci-hcd and get uhci-hcd.ko loaded, I've been using -. It's a bit easier to type since I don't have to hit shift for each _
It is really not important here whether anybody prefers '_' or '-'. IMHO everybody should be free to use both, even within one symbol filename.
What I do not like is that /proc/modules lies about the names of the loaded modules. I can understand that you are not affected by this problem, because all you see is module-init-tools, but others _are_ affected.
Regards
Harri
Quoted 10 lines
Quoted 9 lines
Quoted 1 line
Most users don't want to remember that it's
ip_conntrackbut uhci-hcd.I'd like to chime in about this.
I'd prefer it be - all the way around (I know I can use either). Since I can ask for module
uhci_hcdor uhci-hcd and get uhci-hcd.ko loaded, I've been using -. It's a bit easier to type since I don't have to hit shift for each _
Quoted 3 lines
It is really not important here whether anybody prefers '_' or '-'. IMHO everybody should be free to use both, even within one symbol filename.
That's good. This is pretty much all I want =)
Quoted 4 lines
What I do not like is that
/proc/moduleslies about the names of the loaded modules. I can understand that you are not affected by this problem, because all you see is module-init-tools, but others _are_ affected.
I did not realize that /proc/modules lied. From a user standpoint, it may not be /proc/modules lying, it may be module-init-tools lying to the kernel about the module it just loaded. I don't know, I have not looked at the code for module-init-tools. I checked one of my 2.6 machines and indeed all modules are with an _ instead of a -
When I first noticed that [eou]hci_hcd was loaded I figured all modules were using _ now. When I was playing with alsa it never clicked in about the - and _. I see now that it's _ in /proc/modules.
[OT] why is the usb drivers named with -hcd at the end anyway?
Signature · 1 line
Lab tests show that use of micro$oft causes cancer in lab animals
On Wed, 18 Feb 2004 12:25:23 -0500 Wakko Warner <[email protected]> wrote:
| When I first noticed that [eou]hci_hcd was loaded I figured all modules were | using _ now. When I was playing with alsa it never clicked in about the - | and _. I see now that it's _ in /proc/modules. | | [OT] why is the usb drivers named with -hcd at the end anyway?
Because some USB drivers are for USB devices (no -hcd at end) and some of them are USB host controller drivers (HCDs), not for USB devices per se. It's just a simple differeniation.
--
~Randy