Re: dev_t / udev_t confusion ?
From: Bruce Evans (bde_at_zeta.org.au)
Date: 06/10/04
- Previous message: Bruce Evans: "Re: dev_t / udev_t confusion ?"
- In reply to: Peter Wemm: "Re: dev_t / udev_t confusion ?"
- Next in thread: Peter Wemm: "Re: dev_t / udev_t confusion ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 10 Jun 2004 16:32:37 +1000 (EST) To: Peter Wemm <peter@wemm.org>
On Wed, 9 Jun 2004, Peter Wemm wrote:
> On Wednesday 09 June 2004 08:55 am, Poul-Henning Kamp wrote:
> > In message <53993.1086779790@critter.freebsd.dk>, Poul-Henning Kamp
> writes:
> > >The change proposed is more or less to do:
> > > s/dev_t/struct cdev */
> > > s/udev_t/dev_t/
> > >over all the kernel sources (366 files or so).
> >
> > Looks like a "yea" so far, so I have a couple of follow-up questions:
>
> I had a slight preference for 'kdev_t *' in the kernel, but 'struct cdev
> *' works for me as well so I've changed my mind. No objection from me
> then.
This would be a large style bug (more of a design error, but not doing it
is documented in style(9)):
%%%
STYLE(9) FreeBSD Kernel Developer's Manual STYLE(9)
NAME
style -- kernel source file style guide
...
Avoid using typedefs for structure types. Typedefs are problematic
because they do not properly hide their underlying type; for example you
need to know if the typedef is the structure itself or a pointer to the
structure. In addition they must be declared exactly once, whereas an
incomplete structure type can be mentioned as many times as necessary.
Typedefs are difficult to use in stand-alone header files: the header
that defines the typedef must be included before the header that uses it,
or by the header that uses it (which causes namespace pollution), or
there must be a back-door mechanism for obtaining the typedef.
%%%
Bruce
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Bruce Evans: "Re: dev_t / udev_t confusion ?"
- In reply to: Peter Wemm: "Re: dev_t / udev_t confusion ?"
- Next in thread: Peter Wemm: "Re: dev_t / udev_t confusion ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|