]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
fix(libbcachefs/ioctl): `dirfd` should be a signed 32 bits integer
authorRaito Bezarius <masterancpp@gmail.com>
Sat, 27 Jan 2024 01:29:31 +0000 (02:29 +0100)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 27 Jan 2024 01:39:08 +0000 (20:39 -0500)
`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

index 4b8fba754b1c13f069bb6d1a199d94e591a62668..cbad7a9e455156c5dfc08197971b857114854658 100644 (file)
@@ -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;