Date: Mon, 2 Oct 2000 21:38:40 -0700 (PDT) From: Tony Fleisher <takhus@takhus.mind.net> To: John Baldwin <jhb@FreeBSD.ORG> Cc: phk@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: bpf "fix" Message-ID: <Pine.BSF.4.21.0010022137191.29738-100000@takhus-home.ashlandfn.org> In-Reply-To: <XFMail.001002211927.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I submitted a PR on this a few weeks ago. See: http://www.FreeBSD.org/cgi/query-pr.cgi?pr=21391 for comments from phk. On Mon, 2 Oct 2000, John Baldwin wrote: > I stared at the bpf code some last week, and determined that the > extra make_dev() was in bpf's open() method in the non-devfs > case. As such, I have a rather simple patch. However, I don't > like a driver having to be aware of devfs. Does anyone have any > other (preferably cleaner) ways to fix this? > > http://www.FreeBSD.org/~jhb/patches/bpf.patch > > Index: net/bpf.c > =================================================================== > RCS file: /usr/cvs/src/sys/net/bpf.c,v > retrieving revision 1.67 > diff -u -r1.67 bpf.c > --- net/bpf.c 2000/09/19 10:28:41 1.67 > +++ net/bpf.c 2000/09/27 00:51:30 > @@ -363,8 +363,10 @@ > */ > if (d) > return (EBUSY); > - make_dev(&bpf_cdevsw, minor(dev), UID_ROOT, GID_WHEEL, 0600, > - "bpf%d", dev2unit(dev)); > + /* XXX - ugly, we shouldn't have to know about devfs here */ > + 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); > bzero(d, sizeof(*d)); > dev->si_drv1 = d; > > -- > > John Baldwin <jhb@FreeBSD.org> -- 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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0010022137191.29738-100000>