Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove READ_BUFFER. #133

Merged
merged 1 commit into from
May 17, 2024
Merged

Remove READ_BUFFER. #133

merged 1 commit into from
May 17, 2024

Conversation

sunfishcode
Copy link
Owner

READ_BUFFER was originally added for read, but read no longer needs it now that we can use rustix::io::read_uninit. So the only thing left using READ_BUFFER is the xattr functions. It wasn't really correct for the xattr functions to use a PIPE_BUF-sized buffer anyway, so remove READ_BUFFER entirely and just use Vecs for their buffers.

This also fixes compile errors with u8/i8 mismatches when linux-raw-sys/std is enabled.

Fixes #132.

`READ_BUFFER` was originally added for `read`, but `read` no longer
needs it now that we can use `rustix::io::read_uninit`. So the only
thing left using `READ_BUFFER` is the xattr functions. It wasn't really
correct for the xattr functions to use a `PIPE_BUF`-sized buffer anyway,
so remove `READ_BUFFER` entirely and just use `Vec`s for their buffers.

This also fixes compile errors with u8/i8 mismatches when `linux-raw-sys/std`
is enabled.

Fixes #132.
@sunfishcode sunfishcode merged commit 593322f into main May 17, 2024
5 checks passed
@sunfishcode sunfishcode deleted the sunfishcode/read-buffer branch May 17, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

c-scape: Incompatible type in listxattr
1 participant