[PATCH 3/4] Add GPIO uAPI v2 ioctl decoding
Dmitry V. Levin
ldv at altlinux.org
Wed Dec 30 02:17:58 UTC 2020
On Wed, Dec 23, 2020 at 06:07:47AM +0800, Kent Gibson wrote:
> Add decoding of GPIO uAPI v2 ioctls added in Linux v5.10.
[...]
> +#include "xlat/gpio_v2_line_attr_ids.h"
> +
> +static void
> +print_gpio_v2_line_attribute(struct tcb *const tcp,
> + struct gpio_v2_line_attribute *attr)
> +{
> + switch (attr->id) {
Please also print attr->id using gpio_v2_line_attr_ids.
> + case GPIO_V2_LINE_ATTR_ID_FLAGS:
> + PRINT_FIELD_FLAGS("", *attr, flags, gpio_v2_line_flags,
> + "GPIO_V2_LINE_FLAG_???");
> + break;
> + case GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES:
> + PRINT_FIELD_X("", *attr, values);
> + break;
> + case GPIO_V2_LINE_ATTR_ID_DEBOUNCE:
> + PRINT_FIELD_U("", *attr, debounce_period_us);
> + break;
> + default:
> + tprintf("(id=%u)=%#" PRI__x64, attr->id, attr->values);
I suppose GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES case could be used to handle
this case, too.
--
ldv
More information about the Strace-devel
mailing list