diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-13 09:22:19 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-15 10:29:34 +0200 |
commit | baef823cd550449bfbcc36625b9571389d8ad1af (patch) | |
tree | 238c1952d23dc09d41ae99d186d0656f78ed857b /cpukit/libcsupport/src/fpathconf.c | |
parent | libio: Unify readv() and writev() (diff) | |
download | rtems-baef823cd550449bfbcc36625b9571389d8ad1af.tar.bz2 |
libio: Add hold/drop iop reference
Check iop reference count in close() and return -1 with errno set to
EBUSY in case the file descriptor is still in use.
Update #3132.
Diffstat (limited to 'cpukit/libcsupport/src/fpathconf.c')
-rw-r--r-- | cpukit/libcsupport/src/fpathconf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cpukit/libcsupport/src/fpathconf.c b/cpukit/libcsupport/src/fpathconf.c index db323136c7..d08ac9c776 100644 --- a/cpukit/libcsupport/src/fpathconf.c +++ b/cpukit/libcsupport/src/fpathconf.c @@ -82,9 +82,11 @@ long fpathconf( return_value = the_limits->posix_sync_io; break; default: - rtems_set_errno_and_return_minus_one( EINVAL ); + errno = EINVAL; + return_value = -1; break; } + rtems_libio_iop_drop( iop ); return return_value; } |