Skip to content

Commit

Permalink
Add _PC_MIN_HOLE_SIZE for use with pathconf
Browse files Browse the repository at this point in the history
  • Loading branch information
asomers committed Apr 1, 2024
1 parent 4ab23c3 commit 31c3698
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ This project adheres to [Semantic Versioning](https://semver.org/).

# Change Log

## [Unreleased] - ReleaseDate

### Added

- Added `_PC_MIN_HOLE_SIZE` for `pathconf` and `fpathconf`.
([#2349](https://github.com/nix-rust/nix/pull/2349))

## [0.28.0] - 2024-02-24


Expand Down
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 31c3698

Please sign in to comment.