From baef823cd550449bfbcc36625b9571389d8ad1af Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 13 Sep 2017 09:22:19 +0200 Subject: 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. --- cpukit/libcsupport/src/fpathconf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpukit/libcsupport/src/fpathconf.c') 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; } -- cgit v1.2.3