Age | Commit message (Collapse) | Author |
|
display() function returns the length of the value we are displaying + 1.
As a consequence, if we have field=value\0field=value\0field=value in the
binary, then the second occurence will be skipped as ptr will miss the first
character of the following field.
Example trying to list aliases from ixgbe.ko on a 3.2 kernel.
- In the module we have:
alias=pci:v00008086d00001560sv*sd*bc*sc*i*\0
alias=pci:v00008086d0000154Asv*sd*bc*sc*i*\0
alias=pci:v00008086d00001557sv*sd*bc*sc*i*\0
alias=pci:v00008086d0000154Fsv*sd*bc*sc*i*\0
alias=pci:v00008086d0000154Dsv*sd*bc*sc*i*\0
...
- Using modinfo -F alias ixgbe returns:
alias: pci:v00008086d00001560sv*sd*bc*sc*i*
alias: pci:v00008086d00001557sv*sd*bc*sc*i*
alias: pci:v00008086d0000154Dsv*sd*bc*sc*i*
...
This problem appeared with kernel commit "modules: no need to align .modinfo
strings" b6472776816af1ed52848c93d26e3edb3b17adab in 2.6.37.
Fix this by not trusting display() return value but increment ptr by strlen(ptr)
(the same way as depmod.c does).
Signed-off-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Previously, -F version could match the srcversion= string.
before :
~ # modinfo -F version tiwlan_drv
version: 6.1.2012.05.29
version: 533BB7E5866E52F63B9ACCB
version: 0x%x, oui=0x%x, 0x%x, 0x%x
version: 0x%x
~ # modinfo tiwlan_drv
filename: tiwlan_drv.ko
author: Texas Instruments Inc - Retouched by CyanogenDefy
license: GPL
vermagic: 2.6.32.9 preempt mod_unload ARMv7
parm: g_sdio_debug_level:debug level
depends:
now :
~ # modinfo -F version tiwlan_drv
version: 6.1.2012.05.29
~ # modinfo tiwlan_drv
filename: tiwlan_drv.ko
license: GPL
author: Texas Instruments Inc - Retouched by CyanogenDefy
version: 6.1.2012.05.29
srcversion: 533BB7E5866E52F63B9ACCB
depends:
uts_release: 2.6.32.9-g306944c
vermagic: 2.6.32.9 preempt mod_unload ARMv7
parm: g_sdio_debug_level:debug level
This patch also add support for the old "-n" and some other helpers
Change-Id: Icb4e9ca513cbce46b075a6f038799a7a19fb7e22
Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
packed_usage 28706 28623 -83
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
modinfo 272 329 +57
modinfo_main 325 344 +19
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
modinfo_main - 307 +307
modinfo - 280 +280
packed_usage 27037 27131 +94
display - 74 +74
static.shortcuts - 24 +24
applet_names 2254 2262 +8
applet_main 1324 1328 +4
applet_nameofs 662 664 +2
------------------------------------------------------------------------------
(add/remove: 5/0 grow/shrink: 4/0 up/down: 793/0) Total: 793 bytes
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|