mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
With posix_fadivse the error is the return value and not errno.
This commit is contained in:
parent
07da751bb4
commit
c4263a4193
2 changed files with 4 additions and 4 deletions
4
handle.c
4
handle.c
|
|
@ -135,7 +135,7 @@ int handle_create(struct snapraid_handle* handle, struct snapraid_file* file)
|
|||
/* advise sequential access */
|
||||
ret = posix_fadvise(handle->f, 0, 0, POSIX_FADV_SEQUENTIAL);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "Error advising file '%s'. %s.\n", handle->path, strerror(errno));
|
||||
fprintf(stderr, "Error advising file '%s'. %s.\n", handle->path, strerror(ret));
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -190,7 +190,7 @@ int handle_open(struct snapraid_handle* handle, struct snapraid_file* file)
|
|||
/* advise sequential access */
|
||||
ret = posix_fadvise(handle->f, 0, 0, POSIX_FADV_SEQUENTIAL);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "Error advising file '%s'. %s.\n", handle->path, strerror(errno));
|
||||
fprintf(stderr, "Error advising file '%s'. %s.\n", handle->path, strerror(ret));
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
4
parity.c
4
parity.c
|
|
@ -119,7 +119,7 @@ int parity_create(struct snapraid_parity* parity, const char* path, data_off_t s
|
|||
/* advise sequential access */
|
||||
ret = posix_fadvise(parity->f, 0, 0, POSIX_FADV_SEQUENTIAL);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "Error advising parity file '%s'. %s.\n", parity->path, strerror(errno));
|
||||
fprintf(stderr, "Error advising parity file '%s'. %s.\n", parity->path, strerror(ret));
|
||||
goto bail;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -160,7 +160,7 @@ int parity_open(struct snapraid_parity* parity, const char* path)
|
|||
/* advise sequential access */
|
||||
ret = posix_fadvise(parity->f, 0, 0, POSIX_FADV_SEQUENTIAL);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "Error advising parity file '%s'. %s.\n", parity->path, strerror(errno));
|
||||
fprintf(stderr, "Error advising parity file '%s'. %s.\n", parity->path, strerror(ret));
|
||||
goto bail;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue