Skip to content

Commit 1ed24e6

Browse files
authored
Add _PC_MIN_HOLE_SIZE for use with pathconf (#2349)
1 parent 5d47e15 commit 1ed24e6

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

changelog/2349.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added `_PC_MIN_HOLE_SIZE` for `pathconf` and `fpathconf`.

src/unistd.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,6 +2031,18 @@ pub enum PathconfVar {
20312031
/// queue; therefore, the maximum number of bytes a conforming application
20322032
/// may require to be typed as input before reading them.
20332033
MAX_INPUT = libc::_PC_MAX_INPUT,
2034+
#[cfg(any(
2035+
solarish,
2036+
freebsdlike,
2037+
target_os = "netbsd",
2038+
))]
2039+
/// If a file system supports the reporting of holes (see lseek(2)),
2040+
/// pathconf() and fpathconf() return a positive number that represents the
2041+
/// minimum hole size returned in bytes. The offsets of holes returned will
2042+
/// be aligned to this same value. A special value of 1 is returned if the
2043+
/// file system does not specify the minimum hole size but still reports
2044+
/// holes.
2045+
MIN_HOLE_SIZE = libc::_PC_MIN_HOLE_SIZE,
20342046
/// Maximum number of bytes in a filename (not including the terminating
20352047
/// null of a filename string).
20362048
NAME_MAX = libc::_PC_NAME_MAX,

0 commit comments

Comments
 (0)