Changeset 4116fce6 in rtems


Ignore:
Timestamp:
Feb 24, 2012, 4:39:27 PM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
2563410
Parents:
bea7043
git-author:
Sebastian Huber <sebastian.huber@…> (02/24/12 16:39:27)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/13/12 11:23:45)
Message:

Filesystem: New defaults fsync_h and fdatasync_h

New defaults rtems_filesystem_default_fsync_or_fdatasync() and
rtems_filesystem_default_fsync_or_fdatasync_success() for fsync_h and
fdatasync_h. The rtems_filesystem_default_fsync_or_fdatasync() sets now
errno to EINVAL according to POSIX.

Files:
1 added
2 deleted
20 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/umon/tfsDriver.c

    rbea7043 r4116fce6  
    676676  .fstat_h = rtems_filesystem_default_fstat,
    677677  .ftruncate_h = rtems_tfs_ftruncate,
    678   .fsync_h = rtems_filesystem_default_fsync,
    679   .fdatasync_h = rtems_filesystem_default_fdatasync,
     678  .fsync_h = rtems_filesystem_default_fsync_or_fdatasync,
     679  .fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
    680680  .fcntl_h = rtems_filesystem_default_fcntl
    681681};
  • cpukit/libcsupport/include/rtems/libio.h

    rbea7043 r4116fce6  
    901901 * @retval -1 An error occured.  The errno is set to indicate the error.
    902902 *
    903  * @see rtems_filesystem_default_fsync().
     903 * @see rtems_filesystem_default_fsync_or_fdatasync() and
     904 * rtems_filesystem_default_fsync_or_fdatasync_success().
    904905 */
    905906typedef int (*rtems_filesystem_fsync_t)(
     
    915916 * @retval -1 An error occured.  The errno is set to indicate the error.
    916917 *
    917  * @see rtems_filesystem_default_fdatasync().
     918 * @see rtems_filesystem_default_fsync_or_fdatasync() and
     919 * rtems_filesystem_default_fsync_or_fdatasync_success().
    918920 */
    919921typedef int (*rtems_filesystem_fdatasync_t)(
     
    10691071
    10701072/**
    1071  * @retval -1 Always.  The errno is set to ENOTSUP.
    1072  *
    1073  * @see rtems_filesystem_fsync_t.
    1074  */
    1075 int rtems_filesystem_default_fsync(
     1073 * @retval -1 Always.  The errno is set to EINVAL.
     1074 *
     1075 * @see rtems_filesystem_fsync_t and rtems_filesystem_fdatasync_t.
     1076 */
     1077int rtems_filesystem_default_fsync_or_fdatasync(
    10761078  rtems_libio_t *iop
    10771079);
    10781080
    10791081/**
    1080  * @retval -1 Always.  The errno is set to ENOTSUP.
    1081  *
    1082  * @see rtems_filesystem_fdatasync_t.
    1083  */
    1084 int rtems_filesystem_default_fdatasync(
     1082 * @retval 0 Always.
     1083 *
     1084 * @see rtems_filesystem_fsync_t and rtems_filesystem_fdatasync_t.
     1085 */
     1086int rtems_filesystem_default_fsync_or_fdatasync_success(
    10851087  rtems_libio_t *iop
    10861088);
  • cpukit/libcsupport/src/__usrenv.c

    rbea7043 r4116fce6  
    4848  .fstat_h = null_handler_fstat,
    4949  .ftruncate_h = rtems_filesystem_default_ftruncate,
    50   .fsync_h = rtems_filesystem_default_fsync,
    51   .fdatasync_h = rtems_filesystem_default_fdatasync,
     50  .fsync_h = rtems_filesystem_default_fsync_or_fdatasync,
     51  .fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
    5252  .fcntl_h = rtems_filesystem_default_fcntl
    5353};
  • cpukit/libfs/Makefile.am

    rbea7043 r4116fce6  
    1717    src/defaults/default_eval_path.c \
    1818    src/defaults/default_fchmod.c src/defaults/default_freenode.c \
    19     src/defaults/default_fsync.c src/defaults/default_link.c \
     19    src/defaults/default_fsync.c \
     20    src/defaults/default_fsync_success.c \
     21    src/defaults/default_link.c \
    2022    src/defaults/default_read.c src/defaults/default_rmnod.c \
    2123    src/defaults/default_chown.c \
     
    2527    src/defaults/default_readlink.c src/defaults/default_statvfs.c \
    2628    src/defaults/default_utime.c \
    27     src/defaults/default_fdatasync.c  src/defaults/default_fstat.c \
     29    src/defaults/default_fstat.c \
    2830    src/defaults/default_ioctl.c src/defaults/default_mount.c \
    2931    src/defaults/default_rename.c src/defaults/default_symlink.c \
     
    4345    src/imfs/imfs_creat.c src/imfs/imfs_debug.c src/imfs/imfs_directory.c \
    4446    src/imfs/imfs_eval.c src/imfs/imfs_fchmod.c \
    45     src/imfs/imfs_fdatasync.c src/imfs/imfs_fifo.c \
     47    src/imfs/imfs_fifo.c \
    4648    src/imfs/imfs_fsunmount.c \
    4749    src/imfs/imfs_handlers_device.c \
  • cpukit/libfs/src/defaults/default_fsync.c

    rbea7043 r4116fce6  
    1010 */
    1111
    12 #include <rtems/libio.h>
     12#if HAVE_CONFIG_H
     13  #include "config.h"
     14#endif
     15
    1316#include <rtems/libio_.h>
    14 #include <rtems/seterr.h>
    1517
    16 int rtems_filesystem_default_fsync(
     18int rtems_filesystem_default_fsync_or_fdatasync(
    1719  rtems_libio_t *iop
    1820)
    1921{
    20   rtems_set_errno_and_return_minus_one( ENOTSUP );
     22  rtems_set_errno_and_return_minus_one( EINVAL );
    2123}
  • cpukit/libfs/src/defaults/default_handlers.c

    rbea7043 r4116fce6  
    3131  .fstat_h = rtems_filesystem_default_fstat,
    3232  .ftruncate_h = rtems_filesystem_default_ftruncate,
    33   .fsync_h = rtems_filesystem_default_fsync,
    34   .fdatasync_h = rtems_filesystem_default_fdatasync,
     33  .fsync_h = rtems_filesystem_default_fsync_or_fdatasync,
     34  .fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
    3535  .fcntl_h = rtems_filesystem_default_fcntl
    3636};
  • cpukit/libfs/src/devfs/devfs_init.c

    rbea7043 r4116fce6  
    4646  .fstat_h = devFS_stat,
    4747  .ftruncate_h = rtems_filesystem_default_ftruncate,
    48   .fsync_h = rtems_filesystem_default_fsync,
    49   .fdatasync_h = rtems_filesystem_default_fdatasync,
     48  .fsync_h = rtems_filesystem_default_fsync_or_fdatasync,
     49  .fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
    5050  .fcntl_h = rtems_filesystem_default_fcntl
    5151};
  • cpukit/libfs/src/imfs/imfs.h

    rbea7043 r4116fce6  
    477477);
    478478
    479 extern int IMFS_fdatasync(
    480   rtems_libio_t *iop
    481 );
    482 
    483479extern void IMFS_create_orphan(
    484480  IMFS_jnode_t *jnode
  • cpukit/libfs/src/imfs/imfs_fifo.c

    rbea7043 r4116fce6  
    136136  IMFS_stat,
    137137  rtems_filesystem_default_ftruncate,
    138   rtems_filesystem_default_fsync,
    139   rtems_filesystem_default_fdatasync,
     138  rtems_filesystem_default_fsync_or_fdatasync,
     139  rtems_filesystem_default_fsync_or_fdatasync,
    140140  rtems_filesystem_default_fcntl
    141141};
  • cpukit/libfs/src/imfs/imfs_handlers_device.c

    rbea7043 r4116fce6  
    3131  IMFS_stat,
    3232  device_ftruncate,
    33   rtems_filesystem_default_fsync,
    34   rtems_filesystem_default_fdatasync,
     33  rtems_filesystem_default_fsync_or_fdatasync,
     34  rtems_filesystem_default_fsync_or_fdatasync,
    3535  rtems_filesystem_default_fcntl
    3636};
  • cpukit/libfs/src/imfs/imfs_handlers_directory.c

    rbea7043 r4116fce6  
    3131  IMFS_stat,
    3232  rtems_filesystem_default_ftruncate_directory,
    33   rtems_filesystem_default_fsync,
    34   IMFS_fdatasync,
     33  rtems_filesystem_default_fsync_or_fdatasync_success,
     34  rtems_filesystem_default_fsync_or_fdatasync_success,
    3535  rtems_filesystem_default_fcntl
    3636};
  • cpukit/libfs/src/imfs/imfs_handlers_link.c

    rbea7043 r4116fce6  
    3131  IMFS_stat,  /* stat */
    3232  rtems_filesystem_default_ftruncate,
    33   rtems_filesystem_default_fsync,
    34   rtems_filesystem_default_fdatasync,
     33  rtems_filesystem_default_fsync_or_fdatasync,
     34  rtems_filesystem_default_fsync_or_fdatasync,
    3535  rtems_filesystem_default_fcntl
    3636};
  • cpukit/libfs/src/imfs/imfs_handlers_memfile.c

    rbea7043 r4116fce6  
    3131  IMFS_stat,
    3232  memfile_ftruncate,
    33   IMFS_fdatasync,      /* fsync */
    34   IMFS_fdatasync,
     33  rtems_filesystem_default_fsync_or_fdatasync_success,
     34  rtems_filesystem_default_fsync_or_fdatasync_success,
    3535  rtems_filesystem_default_fcntl
    3636};
  • cpukit/libfs/src/nfsclient/src/nfs.c

    rbea7043 r4116fce6  
    26352635        .fstat_h     = nfs_fstat,
    26362636        .ftruncate_h = nfs_file_ftruncate,
    2637         .fsync_h     = rtems_filesystem_default_fsync,
    2638         .fdatasync_h = rtems_filesystem_default_fdatasync,
     2637        .fsync_h     = rtems_filesystem_default_fsync_or_fdatasync,
     2638        .fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
    26392639        .fcntl_h     = rtems_filesystem_default_fcntl
    26402640};
     
    26512651        .fstat_h     = nfs_fstat,
    26522652        .ftruncate_h = rtems_filesystem_default_ftruncate_directory,
    2653         .fsync_h     = rtems_filesystem_default_fsync,
    2654         .fdatasync_h = rtems_filesystem_default_fdatasync,
     2653        .fsync_h     = rtems_filesystem_default_fsync_or_fdatasync,
     2654        .fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
    26552655        .fcntl_h     = rtems_filesystem_default_fcntl
    26562656};
     
    26672667        .fstat_h     = nfs_fstat,
    26682668        .ftruncate_h = rtems_filesystem_default_ftruncate,
    2669         .fsync_h     = rtems_filesystem_default_fsync,
    2670         .fdatasync_h = rtems_filesystem_default_fdatasync,
     2669        .fsync_h     = rtems_filesystem_default_fsync_or_fdatasync,
     2670        .fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
    26712671        .fcntl_h     = rtems_filesystem_default_fcntl
    26722672};
  • cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c

    rbea7043 r4116fce6  
    259259  .fstat_h     = rtems_rfs_rtems_fstat,
    260260  .ftruncate_h = rtems_rfs_rtems_device_ftruncate,
    261   .fsync_h     = rtems_filesystem_default_fsync,
    262   .fdatasync_h = rtems_filesystem_default_fdatasync,
     261  .fsync_h     = rtems_filesystem_default_fsync_or_fdatasync,
     262  .fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
    263263  .fcntl_h     = rtems_filesystem_default_fcntl
    264264};
  • cpukit/libfs/src/rfs/rtems-rfs-rtems-dir.c

    rbea7043 r4116fce6  
    201201  .fstat_h     = rtems_rfs_rtems_fstat,
    202202  .ftruncate_h = rtems_filesystem_default_ftruncate_directory,
    203   .fsync_h     = rtems_filesystem_default_fsync,
     203  .fsync_h     = rtems_filesystem_default_fsync_or_fdatasync,
    204204  .fdatasync_h = rtems_rfs_rtems_fdatasync,
    205205  .fcntl_h     = rtems_filesystem_default_fcntl
  • cpukit/libfs/src/rfs/rtems-rfs-rtems.c

    rbea7043 r4116fce6  
    804804  .fstat_h     = rtems_rfs_rtems_fstat,
    805805  .ftruncate_h = rtems_filesystem_default_ftruncate,
    806   .fsync_h     = rtems_filesystem_default_fsync,
    807   .fdatasync_h = rtems_filesystem_default_fdatasync,
     806  .fsync_h     = rtems_filesystem_default_fsync_or_fdatasync,
     807  .fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
    808808  .fcntl_h     = rtems_filesystem_default_fcntl
    809809};
  • cpukit/libnetworking/lib/ftpfs.c

    rbea7043 r4116fce6  
    13041304  .fstat_h = rtems_ftpfs_fstat,
    13051305  .ftruncate_h = rtems_ftpfs_ftruncate,
    1306   .fsync_h = rtems_filesystem_default_fsync,
    1307   .fdatasync_h = rtems_filesystem_default_fdatasync,
     1306  .fsync_h = rtems_filesystem_default_fsync_or_fdatasync,
     1307  .fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
    13081308  .fcntl_h = rtems_filesystem_default_fcntl
    13091309};
     
    13181318  .fstat_h = rtems_filesystem_default_fstat,
    13191319  .ftruncate_h = rtems_filesystem_default_ftruncate,
    1320   .fsync_h = rtems_filesystem_default_fsync,
    1321   .fdatasync_h = rtems_filesystem_default_fdatasync,
     1320  .fsync_h = rtems_filesystem_default_fsync_or_fdatasync,
     1321  .fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
    13221322  .fcntl_h = rtems_filesystem_default_fcntl
    13231323};
  • cpukit/libnetworking/lib/tftpDriver.c

    rbea7043 r4116fce6  
    10521052   .fstat_h = rtems_filesystem_default_fstat,
    10531053   .ftruncate_h = rtems_tftp_ftruncate,
    1054    .fsync_h = rtems_filesystem_default_fsync,
    1055    .fdatasync_h = rtems_filesystem_default_fdatasync,
     1054   .fsync_h = rtems_filesystem_default_fsync_or_fdatasync,
     1055   .fdatasync_h = rtems_filesystem_default_fsync_or_fdatasync,
    10561056   .fcntl_h = rtems_filesystem_default_fcntl
    10571057};
  • cpukit/libnetworking/rtems/rtems_syscall.c

    rbea7043 r4116fce6  
    771771        rtems_bsdnet_fstat,                     /* fstat */
    772772        rtems_filesystem_default_ftruncate,     /* ftruncate */
    773         rtems_filesystem_default_fsync,         /* fsync */
    774         rtems_filesystem_default_fdatasync,     /* fdatasync */
     773        rtems_filesystem_default_fsync_or_fdatasync,    /* fsync */
     774        rtems_filesystem_default_fsync_or_fdatasync,    /* fdatasync */
    775775        rtems_bsdnet_fcntl                      /* fcntl */
    776776};
Note: See TracChangeset for help on using the changeset viewer.