mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-05 14:20:05 -05:00
Add fallocate in Windows and comment about its use
This commit is contained in:
parent
f564e9b91a
commit
2bebc5d953
3 changed files with 53 additions and 11 deletions
|
|
@ -904,6 +904,15 @@ int windows_ftruncate(int fd, off64_t off)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int windows_fallocate(int fd, int mode, off64_t off, off64_t len)
|
||||
{
|
||||
if (mode != 0)
|
||||
return -1;
|
||||
|
||||
/* no difference with ftruncate because Windows doesn't use sparse files */
|
||||
return windows_ftruncate(fd, off + len);
|
||||
}
|
||||
|
||||
int windows_fsync(int fd)
|
||||
{
|
||||
HANDLE h;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue