]> granicus.if.org Git - strace/commit
ioctl: do not print explicit 0x prefix and do not specify minimum width
authorEugene Syromyatnikov <evgsyr@gmail.com>
Sun, 1 Jan 2017 18:53:48 +0000 (21:53 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 4 Jan 2017 13:22:19 +0000 (13:22 +0000)
commitb00f54e88104a6d16f8c59b4b42ef04af39ef2dc
tree8554cb8301861053cae13da8f2832dc94499d796
parent7ba63db908e5aef711e6b4261e00d1cef5a912e3
ioctl: do not print explicit 0x prefix and do not specify minimum width

Specifying output width for size argument is rather misleading - it can
be up to 14 bits in size.  The use of explicit "0x" prefix is
discouraged because 0x0 looks ugly.  Usage of width specification along
with alternate form flag leads to inconsistent output for 0.
Let's use just plain %#x qualifiers instead.

* ioctl.c (ioctl_print_code): Change printf qualifiers for ioctl command
type, number and size to "%#x".
* tests/ioctl.c (main): Update expected test output.
* tests/ioctl_dm.c (main): Likewise.
* tests/ioctl_evdev.c (main): Likewise.
ioctl.c
tests/ioctl.c
tests/ioctl_dm.c
tests/ioctl_evdev.c