Linux: add name_to_handle_at and open_by_handle_at#4988
Open
samu698 wants to merge 1 commit intorust-lang:mainfrom
Open
Linux: add name_to_handle_at and open_by_handle_at#4988samu698 wants to merge 1 commit intorust-lang:mainfrom
name_to_handle_at and open_by_handle_at#4988samu698 wants to merge 1 commit intorust-lang:mainfrom
Conversation
2699446 to
c343e34
Compare
samu698
commented
Feb 22, 2026
Comment on lines
+4494
to
+4498
| // FIXME(linux): Requires >= 6.13 kernel headers. | ||
| "AT_HANDLE_CONNECTABLE" => true, | ||
|
|
||
| // FIXME(linux): Requires >= 6.12 kernel headers. | ||
| "AT_HANDLE_MNT_ID_UNIQUE" => true, |
Author
There was a problem hiding this comment.
These flags are a recent addition to Linux and they are present only in the more recent versions of glibc
samu698
commented
Feb 22, 2026
Comment on lines
+4500
to
+4502
| // FIXME(musl): This value is not yet in musl. | ||
| // eabihf targets are tested using an older version of glibc | ||
| "AT_HANDLE_FID" if musl || eabihf => true, |
Author
There was a problem hiding this comment.
eabihf targets use an older version of glibc in CI, where this flag wasn't added
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add file handle operations for Linux.
In particular I added:
name_to_handle_at()open_by_handle_at()file_handleMAX_HANDLE_SZAT_HANDLE_MNT_ID_UNIQUEAT_HANDLE_FIDAT_HANDLE_CONNECTABLESources
file_handlestruct (glibc)Checklist
libc-test/semverhave been updated*LASTor*MAXareincluded (see #3131)
cd libc-test && cargo test --target mytarget);especially relevant for platforms that may not be checked in CI
@rustbot label +stable-nominated