[tracker] libtracker-common: Check error on posix_fadvise() call
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-common: Check error on posix_fadvise() call
- Date: Wed, 14 Dec 2016 19:44:48 +0000 (UTC)
commit 758ff060fdaed4d0bf0e17e15f0dde715b0e2a2b
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Dec 14 20:37:26 2016 +0100
libtracker-common: Check error on posix_fadvise() call
src/libtracker-common/tracker-file-utils.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-common/tracker-file-utils.c b/src/libtracker-common/tracker-file-utils.c
index 64a004d..94b1113 100644
--- a/src/libtracker-common/tracker-file-utils.c
+++ b/src/libtracker-common/tracker-file-utils.c
@@ -94,7 +94,8 @@ tracker_file_close (FILE *file,
#ifdef HAVE_POSIX_FADVISE
if (!need_again_soon) {
- posix_fadvise (fileno (file), 0, 0, POSIX_FADV_DONTNEED);
+ if (posix_fadvise (fileno (file), 0, 0, POSIX_FADV_DONTNEED) != 0)
+ g_warning ("posix_fadvise() call failed: %m");
}
#endif /* HAVE_POSIX_FADVISE */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]