Re: [dm-devel] Re: [RFC] device-mapper ioctl interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 09 June 2003 22:39, Greg KH wrote:
> On Mon, Jun 09, 2003 at 10:03:50PM +0200, Daniel Phillips wrote:
> > On Friday 06 June 2003 19:17, Greg KH wrote:
> > > On Thu, Jun 05, 2003 at 10:39:43AM +0100, Joe Thornber wrote:
> > > > Here's the header file for the the proposed new ioctl interface for
> > > > dm.  We've tried to change as little as possible to minimise code
> > > > changes in LVM2 and EVMS.
> > >
> > > Minor comment:
> > > 	- please do not use uint_32t types in kernel header files.  Use
> > > 	  the proper __u32 type which is guarenteed to be the proper
> > > 	  size across the user/kernel boundry.
> >
> > We even have a flavor without the __'s:
> >
> >    http://lxr.linux.no/source/include/asm-i386/types.h?v=2.5.56#L47
> >
> > A little easier on the eyes, imho.
>
> But they are not the same.
>  - "__" means this variable will be the same size across the
>    kernel/userspace boundry.
>  - without the "__" means this variable will only be this size within
>    the kernel.
>
> Use "__" for variables being seen by userspace.  Otherwise use the
> types without "__".

Indeed, and (to restate the obvious) ioctl interfaces will need the __ form.

On the other hand, a quick tour through the current tree shows the __ form 
being used in a lot more places than it's strictly needed.  Although there's 
no entry in the style guide for this, perhaps we should consider one.

Regards,

Daniel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux