Changeset 25e5f61 in rtems


Ignore:
Timestamp:
Dec 12, 2014, 10:03:42 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
3507f3f9
Parents:
26e04e2f
git-author:
Sebastian Huber <sebastian.huber@…> (12/12/14 10:03:42)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/12/14 12:16:29)
Message:

libcsupport: Do not use _Assert() for sync()

Use a best-effort approach.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/src/sync.c

    r26e04e2f r25e5f61  
    3030
    3131#include <rtems.h>
    32 #include <rtems/score/assert.h>
    3332
    3433/* XXX check standards -- Linux version appears to be void */
     
    3938{
    4039  int fn = fileno(f);
    41   int rc;
    4240
    4341  /*
    44    *  We are explicitly NOT checking the return values in non-debug builds
    45    *  as it does not matter if they succeed.  We are just making a best
    46    *  faith attempt at both and trusting that we were passed a good
    47    *  FILE pointer.
     42   * There is no way to report errors here.  So this is a best-effort approach.
    4843   */
    49   rc = fsync(fn);
    50   _Assert( rc == 0 );
    51 
    52   rc = fdatasync(fn);
    53   _Assert( rc == 0 );
     44  (void) fsync(fn);
     45  (void) fdatasync(fn);
    5446}
    5547
Note: See TracChangeset for help on using the changeset viewer.