Changeset 3cffd66d in rtems


Ignore:
Timestamp:
Sep 13, 2017, 8:36:11 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
d4c5441
Parents:
a937a5a
git-author:
Sebastian Huber <sebastian.huber@…> (09/13/17 08:36:11)
git-committer:
Sebastian Huber <sebastian.huber@…> (09/15/17 08:27:12)
Message:

libio: Add rtems_libio_iop_is_writeable()

Update #3132.

Location:
cpukit
Files:
3 edited

Legend:

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

    ra937a5a r3cffd66d  
    14011401
    14021402/**
     1403 * @brief Returns true if this is a writeable iop, otherwise returns false.
     1404 *
     1405 * @param[in] iop The iop.
     1406 */
     1407static inline bool rtems_libio_iop_is_writeable( const rtems_libio_t *iop )
     1408{
     1409  return ( rtems_libio_iop_flags( iop ) & LIBIO_FLAGS_WRITE ) != 0;
     1410}
     1411
     1412/**
    14031413 * @name External I/O Handlers
    14041414 */
  • cpukit/libfs/src/imfs/imfs_linfile.c

    ra937a5a r3cffd66d  
    5757   * Perform 'copy on write' for linear files
    5858   */
    59   if ((iop->flags & LIBIO_FLAGS_WRITE) != 0) {
     59  if (rtems_libio_iop_is_writeable(iop)) {
    6060    uint32_t count = file->File.size;
    6161    const unsigned char *buffer = file->Linearfile.direct;
  • cpukit/libnetworking/lib/ftpfs.c

    ra937a5a r3cffd66d  
    10331033  const struct timeval *timeout = &me->timeout;
    10341034
    1035   e->write = (iop->flags & LIBIO_FLAGS_WRITE) != 0;
     1035  e->write = rtems_libio_iop_is_writeable(iop);
    10361036
    10371037  /* Check for either read-only or write-only flags */
    10381038  if (
    1039     (iop->flags & LIBIO_FLAGS_WRITE) != 0
     1039    rtems_libio_iop_is_writeable(iop)
    10401040      && rtems_libio_iop_is_readable(iop)
    10411041  ) {
Note: See TracChangeset for help on using the changeset viewer.