[PATCH v2] Decode /dev/loop ioctls
vapier at gentoo.org
Wed May 2 15:54:19 UTC 2012
On Wednesday 02 May 2012 06:38:44 Dmitry V. Levin wrote:
> On Wed, May 02, 2012 at 02:09:55PM +0400, Dmitry V. Levin wrote:
> > On Tue, Apr 17, 2012 at 10:19:31PM -0400, Mike Frysinger wrote:
> > > Needed to debug some losetup failures, and it's easier when you can see
> > > what the kernel is getting vs what you think you're sending, so add
> > > some decoders for those ioctls.
> > >
> > > * defs.h (loop_ioctl): New prototype.
> > > (string_quote): Likewise.
> > > * ioctl.c (ioctl_decode): Call loop_ioctl when code is 'L'.
> > > * Makefile.am (strace_SOURCES): Add loop.c.
> > > * loop.c: New file.
> > > * util.c (string_quote): Delete static keyword
> > On a system with quite old <linux/loop.h> file from some 2.6.18-derived
> > kernel headers I've got a build failure:
> > loop.c:36:4: error: 'LO_FLAGS_AUTOCLEAR' undeclared here (not in a
> > function) loop.c: In function 'loop_ioctl':
> > loop.c:167:7: error: 'LOOP_SET_CAPACITY' undeclared (first use in this
> > function) loop.c:167:7: note: each undeclared identifier is reported
> > only once for each function it appears in
> I've pushed a fix.
i'm not sure if the configure test is really needed. seems like overkill since
we're going to be using #ifdef in the source regardless.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: This is a digitally signed message part.
More information about the Strace-devel