[PATCH v2] Decode /dev/loop ioctls

Dmitry V. Levin ldv at altlinux.org
Wed May 2 10:09:55 UTC 2012

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20120502/f7d6833b/attachment.bin>

More information about the Strace-devel mailing list