Denys Vlasenko wrote:
On Tuesday 01 February 2011 19:48, Ralf Friedl wrote:
The commit
http://git.buildroot.org/busybox/commit/?id=1396221d5a741ef8e1e8abca88836b341a3cab84
breaks modprobe/insmod with spaces inside the parameters.
When calling
modprobe -v iptable_filter forward='1 2'
the old version did
init_module(0x499838, 5306, "\"forward=1 2\" ") = 0
while the new version does
init_module(0x491838, 5306, "forward=1 2 ") = -1 ENOENT (No such
file or directory)
And dmesg says
iptable_filter: Unknown parameter `2'
The kernel considers the '2' after the space to be the name of another
parameter and not part of the value of forward. From the comments, this
change seems intentional, but I don't see any advantage of this patch.
Actually it seems obvious that the kernel can't recognize parameters
with spaces after this patch.
If it's just about code size, using the quotes always should also be
possible.
Hmm. You are right. Reverting.
But even old behavior wasn't exactly correct. It was doing:
init_module(0x8c8e1b8, 4744, "\"forward=1 2\" ") = -1 ENOENT (No such file or
directory)
whereas module-init-tools version 3.11.1 does:
init_module(0xf6eab0, 4744, "forward=\"1 2\"") = -1 ENOENT (No such file or
directory)
See? qoutes should be around value only.
I see the difference, but I would consider it to be cosmetic, as the
Busybox version works. The Busybox program also has a space at the end,
I also consider that to be not so important. From my point of view it
would also be no problem to pass all parameters within quotes, whether
they contain spaces or not.
I also saw your proposed fix, but I would first verify that someone
really expects insmod to not quote the values, and I would consider to
just quote every "name=value" assignment, whether it contains spaces or not.
Ralf Friedl
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox