Changeset d4c5441 in rtems


Ignore:
Timestamp:
Sep 13, 2017, 8:42:21 AM (22 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
9012db8
Parents:
3cffd66d
git-author:
Sebastian Huber <sebastian.huber@…> (09/13/17 08:42:21)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/15/17 08:27:12)
Message:

libio: Add rtems_libio_iop_is_append()

Update #3132.

Location:
cpukit
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/include/rtems/libio.h

    r3cffd66d rd4c5441  
    14111411
    14121412/**
     1413 * @brief Returns true if this is an append iop, otherwise returns false.
     1414 *
     1415 * @param[in] iop The iop.
     1416 */
     1417static inline bool rtems_libio_iop_is_append( const rtems_libio_t *iop )
     1418{
     1419  return ( rtems_libio_iop_flags( iop ) & LIBIO_FLAGS_APPEND ) != 0;
     1420}
     1421
     1422/**
    14131423 * @name External I/O Handlers
    14141424 */
  • cpukit/libfs/src/dosfs/msdos_file.c

    r3cffd66d rd4c5441  
    9292        rtems_set_errno_and_return_minus_one(EIO);
    9393
    94     if ((iop->flags & LIBIO_FLAGS_APPEND) != 0)
     94    if (rtems_libio_iop_is_append(iop))
    9595        iop->offset = fat_fd->fat_file_size;
    9696
  • cpukit/libfs/src/imfs/imfs_memfile.c

    r3cffd66d rd4c5441  
    8888  ssize_t         status;
    8989
    90   if ((iop->flags & LIBIO_FLAGS_APPEND) != 0)
     90  if (rtems_libio_iop_is_append(iop))
    9191    iop->offset = memfile->File.size;
    9292
  • cpukit/libfs/src/jffs2/src/fs-rtems.c

    r3cffd66d rd4c5441  
    673673        rtems_jffs2_do_lock(inode->i_sb);
    674674
    675         if ((iop->flags & LIBIO_FLAGS_APPEND) == 0) {
     675        if (rtems_libio_iop_is_append(iop)) {
     676                pos = inode->i_size;
     677        } else {
    676678                pos = iop->offset;
    677         } else {
    678                 pos = inode->i_size;
    679679        }
    680680
  • cpukit/libfs/src/nfsclient/src/nfs.c

    r3cffd66d rd4c5441  
    25672567
    25682568        SERP_ARGS(node).writearg.beginoffset = UINT32_C(0xdeadbeef);
    2569         if ( LIBIO_FLAGS_APPEND & iop->flags ) {
     2569        if (rtems_libio_iop_is_append(iop)) {
    25702570                if ( updateAttr(node, 0) ) {
    25712571                        return -1;
  • cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c

    r3cffd66d rd4c5441  
    209209    rtems_rfs_file_set_bpos (file, pos);
    210210  }
    211   else if (pos < file_size && (iop->flags & LIBIO_FLAGS_APPEND) != 0)
     211  else if (pos < file_size && rtems_libio_iop_is_append(iop))
    212212  {
    213213    pos = file_size;
Note: See TracChangeset for help on using the changeset viewer.