kern/99068: [linux] Linux emulator crashed by java, when calling ioctl(fd,SIOCGIFINDEX,...)

Alexander Leidinger Alexander at Leidinger.net
Mon Sep 11 00:29:34 PDT 2006


Quoting Marcin Cieslak <saper at SYSTEM.PL> (from Sun, 10 Sep 2006  
22:18:13 +0200):

> --- linux_ioctl.c	Sun Sep 10 22:05:48 2006
> +++ linux_ioctl.c_new	Sun Sep 10 22:08:24 2006
> @@ -2239,6 +2239,17 @@
>  	return (copyout(&flags, &ifr->ifr_flags, sizeof(flags)));
>  }
>
> +static int
> +linux_ifindex(struct thread *td, struct ifnet *ifp, struct l_ifreq *ifr)
> +{
> +#if DEBUG
> +	printf("Interface index: %d\n", ifp->if_index);

Minor issues: we have a linux-debug-printf-something for such  
purposes. Please have a look at other places in the linux emulation  
code where DEBUG is used. And it would be nice if it also tells where  
this message comes from (function name).

Bye,
Alexander.

-- 
	Max told his friend that he'd just as soon not go hiking in the hills.
Said he, "I'm an anti-climb Max."

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137



More information about the freebsd-emulation mailing list