[PATCH] Decode /dev/loop ioctls

Dmitry V. Levin ldv at altlinux.org
Wed Apr 18 00:23:49 UTC 2012


On Tue, Apr 17, 2012 at 04:36:12PM -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.

Thanks.

[...]
> +		if (!abbrev(tcp)) {
> +			tprintf("device=%" PRIi64 ", inode=%" PRIi64 ", "
> +				"rdevice=%" PRIi64 ", offset=%#" PRIx64 ", "
> +				"sizelimit=%" PRIi64 ", number=%" PRIi32,
> +				(uint64_t) info64.lo_device,
> +				(uint64_t) info64.lo_inode,
> +				(uint64_t) info64.lo_rdevice,
> +				(uint64_t) info64.lo_offset,
> +				(uint64_t) info64.lo_sizelimit,
> +				(uint32_t) info64.lo_number);
> +		} else {

We can have more consistency here, e.g. natural printing format specifiers
for uint64_t are PRIu64 and PRIx64, while PRIi64 is more appropriate for
the signed type.


-- 
ldv
-------------- 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/20120418/cf302021/attachment.bin>


More information about the Strace-devel mailing list