summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libc/fcntl.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-08-11 20:04:03 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-08-11 20:04:03 +0000
commit74835d78803e46ae3fcb4e096d2a59964557719b (patch)
treecb2b9cbcd3ed0d6bf5d447230cc4e7d1b7c3991d /c/src/lib/libc/fcntl.c
parentIEEE (diff)
downloadrtems-74835d78803e46ae3fcb4e096d2a59964557719b.tar.bz2
2000-08-11 Chris Johns <ccj@acm.org>
* libc/chmod.c: Return ENOTSUP if filesystem does not have handler. * libc/eval.c: Ditto. * libc/fcntl.c: Ditto. * libc/fsync.c: Ditto. * libc/ioctl.c: Ditto. * libc/ioman.c: Ditto. * libc/link.c: Ditto. * libc/memfile.c: Ditto. * libc/mknod.c: Ditto. * libc/symlink.c: Ditto. * libc/libio.h(rtems_filesystem_dev_major_t): New macro. * libc/libio.h(rtems_filesystem_dev_minor_t): New macro.
Diffstat (limited to 'c/src/lib/libc/fcntl.c')
-rw-r--r--c/src/lib/libc/fcntl.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/c/src/lib/libc/fcntl.c b/c/src/lib/libc/fcntl.c
index 05410eaff6..587726f885 100644
--- a/c/src/lib/libc/fcntl.c
+++ b/c/src/lib/libc/fcntl.c
@@ -131,10 +131,16 @@ int fcntl(
ret = -1;
break;
}
- if ((ret >= 0) && iop->handlers->fcntl) {
- int err = (*iop->handlers->fcntl)( cmd, iop );
- if (err) {
- errno = err;
+ if (ret >= 0) {
+ if (iop->handlers->fcntl) {
+ int err = (*iop->handlers->fcntl)( cmd, iop );
+ if (err) {
+ errno = err;
+ ret = -1;
+ }
+ }
+ else {
+ errno = ENOTSUP;
ret = -1;
}
}