From owner-freebsd-current Thu Nov 2 12:37:55 2000 Delivered-To: freebsd-current@freebsd.org Received: from pike.osd.bsdi.com (pike.osd.bsdi.com [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id B49B937B479; Thu, 2 Nov 2000 12:37:52 -0800 (PST) Received: from laptop.baldwin.cx (john@dhcp241.osd.bsdi.com [204.216.28.241]) by pike.osd.bsdi.com (8.11.0/8.9.3) with ESMTP id eA2KbnI99076; Thu, 2 Nov 2000 12:37:49 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Thu, 02 Nov 2000 12:38:10 -0800 (PST) From: John Baldwin To: John Baldwin Subject: Re: WARNING: driver bpf should register devices with make_dev() Cc: andrea@webcom.it, freebsd-current@FreeBSD.org, Marcel Moolenaar Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 02-Nov-00 John Baldwin wrote: > > On 02-Nov-00 Marcel Moolenaar wrote: >> andrea@webcom.it wrote: >>> >>> > I get it as well. IIRC, it simply means that the bpf pseudo device needs >>> > to be updated, but is otherwise harmless. I forgot the details, but it's >>> > all in the mailinglist archives. Somewhere... :-) >>> >>> Anybody handling this, or anybody can give pointers as to what needs to be >>> done? >> >> I'm not aware someone is working on it. It doesn't look like it needs >> much work, but I don't know the details as I said. For pointers: mail >> archives. > > Quick question: Is this a problem for people _without_ DEVFS? Poul > may have accidentally broke calling make_dev for the bpf device in the > non-DEVFS case. Try this hackish patch: > > Index: bpf.c > =================================================================== > RCS file: /usr/cvs/src/sys/net/bpf.c,v > retrieving revision 1.68 > diff -u -r1.68 bpf.c > --- bpf.c 2000/10/09 14:19:09 1.68 > +++ bpf.c 2000/11/02 20:26:09 > @@ -363,7 +363,7 @@ > */ > if (d) > return (EBUSY); > - if (!dev->si_flags & SI_NAMED) > + if (!devfs_present) > make_dev(&bpf_cdevsw, minor(dev), UID_ROOT, GID_WHEEL, 0600, > "bpf%d", dev2unit(dev)); > MALLOC(d, struct bpf_d *, sizeof(*d), M_BPF, M_WAITOK); > > Hmm. Or try doing changing it to this instead: > > if (dev->si_flags & SI_NAMED != 0) > > It could be an order of operations buglet. Argh, that should be "== 0" not "!= 0". -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message