[rtems commit] libio: rtems_libio_check_permissions_with_error()
Sebastian Huber
sebh at rtems.org
Fri Sep 15 08:59:25 UTC 2017
Module: rtems
Branch: master
Commit: ec10d266ba8bca9e0142cff75cb016038967f0d8
Changeset: http://git.rtems.org/rtems/commit/?id=ec10d266ba8bca9e0142cff75cb016038967f0d8
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Sep 13 09:07:14 2017 +0200
libio: rtems_libio_check_permissions_with_error()
Rename rtems_libio_check_permissions_with_error() in
rtems_libio_check_permissions().
Update #3132.
---
cpukit/libcsupport/include/rtems/libio_.h | 6 +++---
cpukit/libcsupport/src/fdatasync.c | 2 +-
cpukit/libcsupport/src/ftruncate.c | 2 +-
cpukit/libcsupport/src/read.c | 2 +-
cpukit/libcsupport/src/write.c | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/cpukit/libcsupport/include/rtems/libio_.h b/cpukit/libcsupport/include/rtems/libio_.h
index 0a80c91..ba6866e 100644
--- a/cpukit/libcsupport/include/rtems/libio_.h
+++ b/cpukit/libcsupport/include/rtems/libio_.h
@@ -171,13 +171,13 @@ static inline rtems_libio_t *rtems_libio_iop( int fd )
} while (0)
/*
- * rtems_libio_check_permissions_with_error
+ * rtems_libio_check_permissions
*
* Macro to check if a file descriptor is open for this operation.
* On failure, return the user specified error.
*/
-#define rtems_libio_check_permissions_with_error(_iop, _flag, _errno) \
+#define rtems_libio_check_permissions(_iop, _flag, _errno) \
do { \
if (((_iop)->flags & (_flag)) == 0) { \
rtems_set_errno_and_return_minus_one( _errno ); \
@@ -896,7 +896,7 @@ static inline ssize_t rtems_libio_iovec_eval(
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
- rtems_libio_check_permissions_with_error( iop, flags, EBADF );
+ rtems_libio_check_permissions( iop, flags, EBADF );
*iopp = iop;
diff --git a/cpukit/libcsupport/src/fdatasync.c b/cpukit/libcsupport/src/fdatasync.c
index 3223523..a5191c3 100644
--- a/cpukit/libcsupport/src/fdatasync.c
+++ b/cpukit/libcsupport/src/fdatasync.c
@@ -32,7 +32,7 @@ int fdatasync(
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
- rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
+ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE, EBADF );
/*
* Now process the fdatasync().
diff --git a/cpukit/libcsupport/src/ftruncate.c b/cpukit/libcsupport/src/ftruncate.c
index 4a19406..64c2dc0 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_with_error( iop, LIBIO_FLAGS_WRITE, EINVAL );
+ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE, EINVAL );
rv = (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
} else {
diff --git a/cpukit/libcsupport/src/read.c b/cpukit/libcsupport/src/read.c
index dd3f0c7..60c50eb 100644
--- a/cpukit/libcsupport/src/read.c
+++ b/cpukit/libcsupport/src/read.c
@@ -38,7 +38,7 @@ ssize_t read(
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
- rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
+ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ, EBADF );
/*
* Now process the read().
diff --git a/cpukit/libcsupport/src/write.c b/cpukit/libcsupport/src/write.c
index 8beea64..e98fb18 100644
--- a/cpukit/libcsupport/src/write.c
+++ b/cpukit/libcsupport/src/write.c
@@ -41,7 +41,7 @@ ssize_t write(
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
- rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
+ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE, EBADF );
/*
* Now process the write() request.
More information about the vc
mailing list