From 234fe664b1444dc8ba5309bd6bbfdf83862467b3 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Sat, 27 Jan 2024 02:29:31 +0100 Subject: [PATCH] fix(libbcachefs/ioctl): `dirfd` should be a signed 32 bits integer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit `AT_FDCWD` is defined as a macro constant: -100, it works in C… because C. But in Rust, this will be exposed as a u32 instead of a i32, which is the correct variable type for it. --- libbcachefs/bcachefs_ioctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libbcachefs/bcachefs_ioctl.h b/libbcachefs/bcachefs_ioctl.h index 4b8fba7..cbad7a9 100644 --- a/libbcachefs/bcachefs_ioctl.h +++ b/libbcachefs/bcachefs_ioctl.h @@ -379,7 +379,7 @@ struct bch_ioctl_disk_resize_journal { struct bch_ioctl_subvolume { __u32 flags; - __u32 dirfd; + __s32 dirfd; __u16 mode; __u16 pad[3]; __u64 dst_ptr; -- 2.39.2