ioprio: add print_ioprio function
That respects xlat style settings. * ioprio.c (print_ioprio): New function. * defs.h (print_ioprio): New declaration.
This commit is contained in:
1
defs.h
1
defs.h
@ -819,6 +819,7 @@ extern void print_numeric_umode_t(unsigned short);
|
||||
extern void print_numeric_long_umask(unsigned long);
|
||||
extern void print_dev_t(unsigned long long dev);
|
||||
extern void print_abnormal_hi(kernel_ulong_t);
|
||||
extern void print_ioprio(unsigned int ioprio);
|
||||
|
||||
extern bool print_int32_array_member(struct tcb *, void *elem_buf,
|
||||
size_t elem_size, void *data);
|
||||
|
15
ioprio.c
15
ioprio.c
@ -54,6 +54,21 @@ sprint_ioprio(unsigned int ioprio)
|
||||
return outstr;
|
||||
}
|
||||
|
||||
void
|
||||
print_ioprio(unsigned int ioprio)
|
||||
{
|
||||
if (xlat_verbose(xlat_verbosity) != XLAT_STYLE_ABBREV)
|
||||
tprintf("%#x", ioprio);
|
||||
|
||||
if (xlat_verbose(xlat_verbosity) == XLAT_STYLE_RAW)
|
||||
return;
|
||||
|
||||
const char *str = sprint_ioprio(ioprio);
|
||||
|
||||
(xlat_verbose(xlat_verbosity) == XLAT_STYLE_VERBOSE
|
||||
? tprints_comment : tprints)(str);
|
||||
}
|
||||
|
||||
SYS_FUNC(ioprio_get)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
|
Reference in New Issue
Block a user