Mark SIOCSIFNAME as compatible ioctl
Subsystems (2)
PATCH 1/1 Mark SIOCSIFNAME as compatible ioctl
Mark SIOCSIFNAME as an ioctl that doesn't need 32bit conversion.
Fixes nameif as 32bit executable.
-Andi
include/linux/compat_ioctl.h +1 -0
@@ -260,6 +260,7 @@ COMPATIBLE_IOCTL(SIOCATMARK) COMPATIBLE_IOCTL(SIOCSIFLINK) COMPATIBLE_IOCTL(SIOCSIFENCAP) COMPATIBLE_IOCTL(SIOCGIFENCAP) +COMPATIBLE_IOCTL(SIOCSIFNAME) COMPATIBLE_IOCTL(SIOCSIFBR) COMPATIBLE_IOCTL(SIOCGIFBR) COMPATIBLE_IOCTL(SIOCSARP)
Quoted 3 lines · On Thu, 8 Jan 2004 08:04:13 +0100 Andi Kleen <[email protected]> wrote:
Mark SIOCSIFNAME as an ioctl that doesn't need 32bit conversion.
Fixes nameif as 32bit executable.
How can we mark it compatible? It needs the stuff dev_ifname32() in fs/compat_ioctl.c does for SIOCGIFNAME doesn't it?
Quoted 9 lines · On Fri, 9 Jan 2004 02:04:56 -0800 "David S. Miller" <[email protected]> wrote:
Quoted 3 lines · On Thu, 8 Jan 2004 08:04:13 +0100 Andi Kleen <[email protected]> wrote:
Mark SIOCSIFNAME as an ioctl that doesn't need 32bit conversion.
Fixes nameif as 32bit executable.
How can we mark it compatible? It needs the stuff
dev_ifname32()infs/compat_ioctl.cdoes for SIOCGIFNAME doesn't it?
It takes two strings. This should be compatible:
struct ifreq
{
union
{
char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */
/
} ifr_ifrn;
union {
...
char ifru_newname[IFNAMSIZ];
...
} ifr_ifru;
}; -Andi
P.S.: Maybe it would be time update the "en0" comment in if.h too ;-) I bet that comes from VAX/BSD.
Quoted 7 lines · On Fri, 9 Jan 2004 16:56:27 +0100 Andi Kleen <[email protected]> wrote:
Quoted 2 lines · On Fri, 9 Jan 2004 02:04:56 -0800 "David S. Miller" <[email protected]> wrote:
How can we mark it compatible? It needs the stuff
dev_ifname32()infs/compat_ioctl.cdoes for SIOCGIFNAME doesn't it?It takes two strings. This should be compatible:
You're absolutely right Andi, thanks.
Patch applied.