From owner-freebsd-bugs@FreeBSD.ORG Mon Sep 11 07:30:29 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D9C616A403 for ; Mon, 11 Sep 2006 07:30:29 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBC5843D49 for ; Mon, 11 Sep 2006 07:30:28 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k8B7USdD039044 for ; Mon, 11 Sep 2006 07:30:28 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k8B7USrP039042; Mon, 11 Sep 2006 07:30:28 GMT (envelope-from gnats) Date: Mon, 11 Sep 2006 07:30:28 GMT Message-Id: <200609110730.k8B7USrP039042@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Alexander Leidinger Cc: Subject: Re: kern/99068: [linux] Linux emulator crashed by java, when calling ioctl(fd,SIOCGIFINDEX,...) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexander Leidinger List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2006 07:30:29 -0000 The following reply was made to PR kern/99068; it has been noted by GNATS. From: Alexander Leidinger To: Marcin Cieslak Cc: bug-followup@FreeBSD.org, esepecesito@gmail.com, emulation@FreeBSD.org Subject: Re: kern/99068: [linux] Linux emulator crashed by java, when calling ioctl(fd,SIOCGIFINDEX,...) Date: Mon, 11 Sep 2006 09:29:16 +0200 Quoting Marcin Cieslak (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