[PATCH] linux/ioctlent.sh: handle multiple defines per-ioctl

Denys Vlasenko dvlasenk at redhat.com
Fri Feb 20 17:40:30 UTC 2009


On Fri, 2009-02-20 at 12:38 -0500, Mike Frysinger wrote:
> > > > The current sed statement works fine if the ioctl definition only
> > > > utilizes one define in it.  If it uses two, things fall apart.  Such is
> > > > the case with linux/dm-ioctl.h:
> > > > _IOC(_IOC_NONE,DM_IOCTL,DM_LIST_DEVICES_CMD,....)
> > > > Only the last define (DM_LIST_DEVICES_CMD) gets extracted.  This tweaks
> > > > the sed to handle the two-define case.
> > > >
> > > > I also fixed uniq/sort as doing `... | uniq | sort` wont work, you need
> > > > to reverse the steps for uniq to actually work.
> > >
> > > any chance of getting this merged ?
> >
> > Which kernel has that? (linux-2.6.28.6 doesn't)
> 
> the verbatim form i mentioned isnt, but every kernel version with dm-ioctl.h 
> has this issue.
> 
> if you run the current ioctlent.sh script:
> linux_git=/usr/local/src/linux/linux-2.6x
> sh ./linux/ioctlent.sh $linux_git/include $linux_git/arch/x86/include/asm
> 
> we end up with ioctls.h with lines like:
> {
> 	"linux/dm-ioctl.h",
> 	"DM_VERSION",
> 	_IOC(_IOC_NONE,DM_IOCTL,DM_VERSION_CMD,0)
> },
> 
> which results in the errors:
> ./ioctls.h:489: error: ‘DM_IOCTL’ undeclared here (not in a function)
> ./ioctls.h:489: error: ‘DM_VERSION_CMD’ undeclared here (not in a function)
> ... bunch more ...
> 
> it looks like since i posted this patch, ive accumulated more fixes in the 
> Blackfin tree, so i'll start a small patch series

Committed, please try current cvs.
--
vda





More information about the Strace-devel mailing list