Skip to contentSkip to conversation

Mark SIOCSIFNAME as compatible ioctl

PATCH In review Andi Kleen 3 participants 4 messages Jan 8, 2004 – Jan 13, 2004

Subsystems (2)
lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

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
diff -X ../KDIFX -burpN linux-vanilla-2.6.1rc2/include/linux/compat_ioctl.h linux-2.6.1rc2-amd64/include/linux/compat_ioctl.h
@@ -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)
#1 lore raw
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?

#2 lore raw
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() in fs/compat_ioctl.c does 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.

#3 lore raw
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() in fs/compat_ioctl.c does for SIOCGIFNAME doesn't it?

It takes two strings. This should be compatible:

You're absolutely right Andi, thanks.

Patch applied.