summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-08-26 21:42:21 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-08-26 21:42:21 +0000
commite6a92f85ede0b55c278a62f20626ed164e428fda (patch)
tree3f8b116851ac24267a9f2070c94444711baa7b40 /cpukit
parent2010-08-26 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-e6a92f85ede0b55c278a62f20626ed164e428fda.tar.bz2
2010-08-26 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/sync.c: Add comment explaining why the return value from fsync() and fdatasync() is not checked.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog5
-rw-r--r--cpukit/libcsupport/src/sync.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 43e0c9c5c7..e2d7aedd41 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,10 @@
2010-08-26 Joel Sherrill <joel.sherrill@oarcorp.com>
+ * libcsupport/src/sync.c: Add comment explaining why the return value
+ from fsync() and fdatasync() is not checked.
+
+2010-08-26 Joel Sherrill <joel.sherrill@oarcorp.com>
+
* libmisc/monitor/mon-symbols.c: Fix length of buffer passed to
strncpy() so there is room for a NULL terminator.
diff --git a/cpukit/libcsupport/src/sync.c b/cpukit/libcsupport/src/sync.c
index 8db3f62161..e1deefc293 100644
--- a/cpukit/libcsupport/src/sync.c
+++ b/cpukit/libcsupport/src/sync.c
@@ -47,6 +47,11 @@ static void sync_wrapper(FILE *f)
{
int fn = fileno(f);
+ /*
+ * We are explicitly NOT checking the return values as it does not
+ * matter if they succeed. We are just making a best faith attempt
+ * at both and trusting that we were passed a good FILE pointer.
+ */
fsync(fn);
fdatasync(fn);
}