Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Nov 2000 15:41:11 -0500
From:      Marcel Moolenaar <marcel@cup.hp.com>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        freebsd-current@FreeBSD.org, andrea@webcom.it
Subject:   Re: WARNING: driver bpf should register devices with make_dev()
Message-ID:  <3A01D167.DB687DDB@cup.hp.com>
References:  <XFMail.001102123027.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote:
> 
> Quick question: Is this a problem for people _without_ DEVFS? 

That's a yes for me.

> 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.

Give me a couple of days to play with it...

-- 
Marcel Moolenaar
  mail: marcel@cup.hp.com / marcel@FreeBSD.org
  tel:  (408) 447-4222


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?3A01D167.DB687DDB>