This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master
in repository gfs2-utils.
commit a5e3d567df85040a3f1145c810b8e1cf394e9ede
Author: Andrew Price <anprice(a)redhat.com>
Date: Thu Aug 3 16:34:03 2017 +0100
fsck.gfs2: Fix unchecked return value warning
initialize.c:1703:4: warning: ignoring return value of ‘write’,
declared with attribute warn_unused_result [-Wunused-result]
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/fsck/initialize.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/gfs2/fsck/initialize.c b/gfs2/fsck/initialize.c
index 75f050b..5862fc3 100644
--- a/gfs2/fsck/initialize.c
+++ b/gfs2/fsck/initialize.c
@@ -1700,10 +1700,12 @@ void destroy(struct gfs2_sbd *sdp)
if (was_mounted_ro && errors_corrected) {
sdp->device_fd = open("/proc/sys/vm/drop_caches", O_WRONLY);
if (sdp->device_fd >= 0) {
- write(sdp->device_fd, "2", 1);
+ if (write(sdp->device_fd, "2", 1) == 2) {
+ close(sdp->device_fd);
+ return;
+ }
close(sdp->device_fd);
- } else
- log_err( _("fsck.gfs2: Non-fatal error dropping "
- "caches.\n"));
+ }
+ log_warn(_("fsck.gfs2: Could not flush caches (non-fatal).\n"));
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Show replies by date