Skip to content

Commit

Permalink
Add _PC_MIN_HOLE_SIZE for use with pathconf (#2349)
Browse files Browse the repository at this point in the history
  • Loading branch information
asomers committed Apr 2, 2024
1 parent 5d47e15 commit 1ed24e6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog/2349.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added `_PC_MIN_HOLE_SIZE` for `pathconf` and `fpathconf`.
12 changes: 12 additions & 0 deletions src/unistd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2031,6 +2031,18 @@ pub enum PathconfVar {
/// queue; therefore, the maximum number of bytes a conforming application
/// may require to be typed as input before reading them.
MAX_INPUT = libc::_PC_MAX_INPUT,
#[cfg(any(
solarish,
freebsdlike,
target_os = "netbsd",
))]
/// If a file system supports the reporting of holes (see lseek(2)),
/// pathconf() and fpathconf() return a positive number that represents the
/// minimum hole size returned in bytes. The offsets of holes returned will
/// be aligned to this same value. A special value of 1 is returned if the
/// file system does not specify the minimum hole size but still reports
/// holes.
MIN_HOLE_SIZE = libc::_PC_MIN_HOLE_SIZE,
/// Maximum number of bytes in a filename (not including the terminating
/// null of a filename string).
NAME_MAX = libc::_PC_NAME_MAX,
Expand Down

0 comments on commit 1ed24e6

Please sign in to comment.