Re: [PATCH 5/5] CUSE: implement CUSE - Character device inUserspace

From: Nick Bowler
Date: Fri Aug 29 2008 - 12:00:23 EST


On 04:09 Fri 29 Aug , Tejun Heo wrote:
> Hello, Andrew.
>
> Andrew Morton wrote:
> >> +struct cuse_conn {
> >> + struct fuse_conn fc;
> >> + struct cdev cdev;
> >> + struct vfsmount *mnt;
> >> + struct device *dev;
> >> + bool cdev_added:1;
> >> + bool disconnected:1; /* channel disconnected */
> >
> > I didn't know you could do that with bools.
>
> Hmm... I thought it was like any other integral types, no?
>

Boolean bit-fields are indeed valid. Usual semantics for objects of type
_Bool apply.

C99 6.7.2.1 Structure and union specifiers

4 A bit-field shall have a type that is a qualified or unqualified
version of _Bool, signed int, unsigned int, or some other
implementation-defined type.

--
Nick Bowler, Elliptic Semiconductor (http://www.ellipticsemi.com/)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/