Skip to content

Linux: add name_to_handle_at and open_by_handle_at#4988

Merged
tgross35 merged 1 commit intorust-lang:mainfrom
samu698:main
Mar 4, 2026
Merged

Linux: add name_to_handle_at and open_by_handle_at#4988
tgross35 merged 1 commit intorust-lang:mainfrom
samu698:main

Conversation

@samu698
Copy link
Contributor

@samu698 samu698 commented Feb 21, 2026

Description

Add file handle operations for Linux.

In particular I added:

  • name_to_handle_at()
  • open_by_handle_at()
  • file_handle
  • MAX_HANDLE_SZ
  • AT_HANDLE_MNT_ID_UNIQUE
  • AT_HANDLE_FID
  • AT_HANDLE_CONNECTABLE

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot label +stable-nominated

@rustbot rustbot added S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Feb 21, 2026
@samu698 samu698 marked this pull request as draft February 21, 2026 14:01
@samu698 samu698 force-pushed the main branch 3 times, most recently from 2699446 to c343e34 Compare February 21, 2026 18:26
@samu698 samu698 marked this pull request as ready for review February 22, 2026 00:55
Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit then LGTM

View changes since this review

@rustbot
Copy link
Collaborator

rustbot commented Mar 2, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@samu698
Copy link
Contributor Author

samu698 commented Mar 2, 2026

Ok, thanks for the suggestion, now I am skipping only the file_handle.f_handle field for musl targets where it is a flexible array member.

@rustbot ready

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tgross35 tgross35 added this pull request to the merge queue Mar 4, 2026
Merged via the queue into rust-lang:main with commit 8f74b4b Mar 4, 2026
51 checks passed
JohnTitor pushed a commit to JohnTitor/libc that referenced this pull request Mar 8, 2026
@JohnTitor JohnTitor mentioned this pull request Mar 8, 2026
github-merge-queue bot pushed a commit that referenced this pull request Mar 8, 2026
(backport <#4988>)
(cherry picked from commit 8f74b4b)
@JohnTitor JohnTitor added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stable-applied This PR has been cherry-picked to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants