mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-01 04:17:02 -05: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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue