mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Uses O_SEQUENTIAL in Windows.
This commit is contained in:
parent
48473537bf
commit
eb26b6aa1f
4 changed files with 13 additions and 6 deletions
6
parity.c
6
parity.c
|
|
@ -55,7 +55,8 @@ int parity_create(const char* path, data_off_t size)
|
|||
int ret;
|
||||
int f;
|
||||
|
||||
f = open(path, O_RDWR | O_CREAT | O_BINARY, 0600);
|
||||
/* opening in sequential mode in Windows */
|
||||
f = open(path, O_RDWR | O_CREAT | O_BINARY | O_SEQUENTIAL, 0600);
|
||||
if (f == -1) {
|
||||
fprintf(stderr, "Error opening parity file '%s'. %s.\n", path, strerror(errno));
|
||||
return -1;
|
||||
|
|
@ -114,7 +115,8 @@ int parity_open(const char* path)
|
|||
#endif
|
||||
int f;
|
||||
|
||||
f = open(path, O_RDONLY | O_BINARY);
|
||||
/* opening in sequential mode in Windows */
|
||||
f = open(path, O_RDONLY | O_BINARY | O_SEQUENTIAL);
|
||||
if (f == -1) {
|
||||
fprintf(stderr, "Error opening parity file '%s'. %s.\n", path, strerror(errno));
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue