[rtems commit] libio: Remove rtems_libio_check_permissions()
Sebastian Huber
sebh at rtems.org
Fri Sep 15 08:59:13 UTC 2017
Module: rtems
Branch: master
Commit: 48dbb6cf16aad7db732b0f929b2e1803dccd6b4a
Changeset: http://git.rtems.org/rtems/commit/?id=48dbb6cf16aad7db732b0f929b2e1803dccd6b4a
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Sep 13 09:08:34 2017 +0200
libio: Remove rtems_libio_check_permissions()
Remove rtems_libio_check_permissions() and convert single user to
rtems_libio_check_permissions_with_error().
Update #3132.
---
cpukit/libcsupport/include/rtems/libio_.h | 10 ----------
cpukit/libcsupport/src/ftruncate.c | 2 +-
2 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/cpukit/libcsupport/include/rtems/libio_.h b/cpukit/libcsupport/include/rtems/libio_.h
index 9bd8a89..0a80c91 100644
--- a/cpukit/libcsupport/include/rtems/libio_.h
+++ b/cpukit/libcsupport/include/rtems/libio_.h
@@ -185,16 +185,6 @@ static inline rtems_libio_t *rtems_libio_iop( int fd )
} \
} while (0)
-/*
- * rtems_libio_check_permissions
- *
- * Macro to check if a file descriptor is open for this operation.
- * On failure, return EINVAL
- */
-
-#define rtems_libio_check_permissions(_iop, _flag) \
- rtems_libio_check_permissions_with_error(_iop, _flag, EINVAL )
-
/**
* @brief Clones a node.
*
diff --git a/cpukit/libcsupport/src/ftruncate.c b/cpukit/libcsupport/src/ftruncate.c
index 3f4e933..4a19406 100644
--- a/cpukit/libcsupport/src/ftruncate.c
+++ b/cpukit/libcsupport/src/ftruncate.c
@@ -32,7 +32,7 @@ int ftruncate( int fd, off_t length )
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
- rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
+ rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EINVAL );
rv = (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
} else {
More information about the vc
mailing list