ioctl: print ioctl code in accordance with xlat verbosity
* ioctl.c (ioctl_print_code): Format in accrordance with xlat verbosity setting.
This commit is contained in:
11
ioctl.c
11
ioctl.c
@ -71,10 +71,21 @@ ioctl_next_match(const struct_ioctlent *iop)
|
||||
static void
|
||||
ioctl_print_code(const unsigned int code)
|
||||
{
|
||||
if (xlat_verbose(xlat_verbosity) != XLAT_STYLE_ABBREV)
|
||||
tprintf("%#x", code);
|
||||
if (xlat_verbose(xlat_verbosity) == XLAT_STYLE_RAW)
|
||||
return;
|
||||
|
||||
if (xlat_verbose(xlat_verbosity) == XLAT_STYLE_VERBOSE)
|
||||
tprints(" /* ");
|
||||
|
||||
tprints("_IOC(");
|
||||
printflags(ioctl_dirs, _IOC_DIR(code), "_IOC_???");
|
||||
tprintf(", %#x, %#x, %#x)",
|
||||
_IOC_TYPE(code), _IOC_NR(code), _IOC_SIZE(code));
|
||||
|
||||
if (xlat_verbose(xlat_verbosity) == XLAT_STYLE_VERBOSE)
|
||||
tprints(" */");
|
||||
}
|
||||
|
||||
static int
|
||||
|
Reference in New Issue
Block a user