Re: [PATCH] fuse: uapi: use UAPI types

From: Arnd Bergmann

Date: Mon Dec 22 2025 - 03:54:29 EST


On Mon, Dec 22, 2025, at 09:06, Thomas Weißschuh wrote:
> Using libc types and headers from the UAPI headers is problematic as it
> introduces a dependency on a full C toolchain.
>
> Use the fixed-width integer types provided by the UAPI headers instead.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>

Acked-by: Arnd Bergmann <arnd@xxxxxxxx>

Please check the whitespace though:

> @@ -307,53 +303,53 @@ struct fuse_attr {
> * Linux.
> */
> struct fuse_sx_time {
> - int64_t tv_sec;
> - uint32_t tv_nsec;
> - int32_t __reserved;
> + __s64 tv_sec;
> + __u32 tv_nsec;
> + __s32 __reserved;
> };

This looks misaligned now, same for any other struct that
mixes signed and unsigned types, like fuse_open_out.

> @@ -1298,14 +1294,14 @@ enum fuse_uring_cmd {
> * In the 80B command area of the SQE.
> */
> struct fuse_uring_cmd_req {
> - uint64_t flags;
> + __u64 flags;
>
> /* entry identifier for commits */
> - uint64_t commit_id;
> + __u64 commit_id;
>
> /* queue the command is for (queue index) */
> - uint16_t qid;
> - uint8_t padding[6];
> + __u16 qid;
> + __u8 padding[6];
> };

Maybe also change this to use tab for alignment like all
the other structures.

Arnd