This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1344 from mrkline/import-fallocate
Import fallocate in sys/linux/fcntl.d
- Loading branch information
Showing
5 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| module core.sys.linux.fcntl; | ||
|
|
||
| public import core.sys.posix.fcntl; | ||
|
|
||
| version (linux): | ||
| extern(C): | ||
| nothrow: | ||
|
|
||
| // From Linux's unistd.h, stdio.h, and linux/fs.h | ||
| enum { | ||
| SEEK_DATA = 3, | ||
| SEEK_HOLE = 4 | ||
| } | ||
|
|
||
| // From linux/falloc.h | ||
| enum { | ||
| FALLOC_FL_KEEP_SIZE = 0x01, | ||
| FALLOC_FL_PUNCH_HOLE = 0x02, | ||
| FALLOC_FL_NO_HIDE_STALE = 0x04 | ||
| } | ||
|
|
||
| // Linux-specific fallocate | ||
| // (http://man7.org/linux/man-pages/man2/fallocate.2.html) | ||
| int fallocate(int fd, int mode, off_t offset, off_t len); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters