Skip to content

OpenBSD: add kinfo_file and KERN_FILE_*, KI_, and DTYPE_ constants#4991

Merged
JohnTitor merged 1 commit intorust-lang:mainfrom
antoncxx:openbsd-ext
Feb 25, 2026
Merged

OpenBSD: add kinfo_file and KERN_FILE_*, KI_, and DTYPE_ constants#4991
JohnTitor merged 1 commit intorust-lang:mainfrom
antoncxx:openbsd-ext

Conversation

@antoncxx
Copy link
Contributor

@antoncxx antoncxx commented Feb 23, 2026

Also added descriptor types constants

Description

1 kinfo_file structure
Contants

  • KERN_FILE_BYFILE
  • KERN_FILE_BYPID
  • KERN_FILE_BYUID
  • KERN_FILESLOP
  • KERN_FILE_TEXT
  • KERN_FILE_CDIR
  • KERN_FILE_RDIR
  • KERN_FILE_TRACE
  • KI_MNAMELEN
  • KI_UNPPATHLEN

2 File descriptor types

  • DTYPE_VNODE
  • DTYPE_SOCKET
  • DTYPE_PIPE
  • DTYPE_KQUEUE
  • DTYPE_DMABUF
  • DTYPE_SYNC

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
Copy link
Collaborator

rustbot commented Feb 23, 2026

Some changes occurred in a NetBSD-like module

cc @semarie

Some changes occurred in an OpenBSD module

cc @semarie

@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 23, 2026
Copy link
Contributor

@semarie semarie left a comment

Choose a reason for hiding this comment

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

LGTM thanks

@JohnTitor
Copy link
Member

@antoncxx Could you squash commits into one?

Also added descriptor types constants
@antoncxx
Copy link
Contributor Author

@JohnTitor done.

Also, can you please re-start the aarch64-linux-android CI job. It seem to have stalled and got canceled, thank you!

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

@JohnTitor JohnTitor enabled auto-merge February 25, 2026 12:51
@JohnTitor JohnTitor added this pull request to the merge queue Feb 25, 2026
Merged via the queue into rust-lang:main with commit 8c14958 Feb 25, 2026
143 of 147 checks passed
@antoncxx antoncxx deleted the openbsd-ext branch February 25, 2026 16:00
@tgross35 tgross35 changed the title Extended OpenBSD API OpenBSD: add kinfo_file and KERN_FILE_*, KI_, and DTYPE_ constants Mar 2, 2026
JohnTitor pushed a commit to JohnTitor/libc that referenced this pull request Mar 8, 2026
Also added descriptor types constants

(backport <rust-lang#4991>)
(cherry picked from commit 8c14958)
@JohnTitor JohnTitor mentioned this pull request Mar 8, 2026
github-merge-queue bot pushed a commit that referenced this pull request Mar 8, 2026
Also added descriptor types constants

(backport <#4991>)
(cherry picked from commit 8c14958)
@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