btrfs: use printxval_u for error types printing
* btrfs.c (MPERS_PRINTER_DECL(btrfs_ioctl)) <case BTRFS_IOC_GET_DEV_STATS>: Use printxval_u for error type printing. * tests/btrfs.c (btrfs_test_get_dev_stats_ioctl): Update expected output.
This commit is contained in:
parent
b85a824a5e
commit
3dd9d5f34a
10
btrfs.c
10
btrfs.c
@ -813,13 +813,9 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
||||
break;
|
||||
}
|
||||
|
||||
const char *err_type =
|
||||
xlookup(btrfs_dev_stats_values, i);
|
||||
if (err_type)
|
||||
tprintf("[%s] = ", err_type);
|
||||
else
|
||||
tprintf("[%" PRIu64 "] = ", i);
|
||||
tprintf("%" PRI__u64, args.values[i]);
|
||||
tprints("[");
|
||||
printxval_u(btrfs_dev_stats_values, i, NULL);
|
||||
tprintf("] = %" PRI__u64, args.values[i]);
|
||||
}
|
||||
tprints("]}");
|
||||
break;
|
||||
|
@ -1724,10 +1724,14 @@ btrfs_test_get_dev_stats_ioctl(void)
|
||||
if (i)
|
||||
printf(", ");
|
||||
|
||||
if (name)
|
||||
printf("[%s] = ", name);
|
||||
else
|
||||
if (name) {
|
||||
if (verbose_xlat)
|
||||
printf("[%u /* %s */] = ", i, name);
|
||||
else
|
||||
printf("[%s] = ", name);
|
||||
} else {
|
||||
printf("[%u] = ", i);
|
||||
}
|
||||
|
||||
printf("%" PRI__u64, args.values[i]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user