summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c/src/exec/libcsupport/src/fcntl.c10
-rw-r--r--c/src/lib/libc/fcntl.c10
-rw-r--r--cpukit/libcsupport/src/fcntl.c10
3 files changed, 18 insertions, 12 deletions
diff --git a/c/src/exec/libcsupport/src/fcntl.c b/c/src/exec/libcsupport/src/fcntl.c
index 819b2f7778..72a03fa1c5 100644
--- a/c/src/exec/libcsupport/src/fcntl.c
+++ b/c/src/exec/libcsupport/src/fcntl.c
@@ -131,6 +131,12 @@ int fcntl(
ret = -1;
break;
}
+
+ /*
+ * If we got this far successfully, then we give the optional
+ * filesystem specific handler a chance to process this.
+ */
+
if (ret >= 0) {
if (iop->handlers->fcntl_h) {
int err = (*iop->handlers->fcntl_h)( cmd, iop );
@@ -139,10 +145,6 @@ int fcntl(
ret = -1;
}
}
- else {
- errno = ENOTSUP;
- ret = -1;
- }
}
return ret;
}
diff --git a/c/src/lib/libc/fcntl.c b/c/src/lib/libc/fcntl.c
index 819b2f7778..72a03fa1c5 100644
--- a/c/src/lib/libc/fcntl.c
+++ b/c/src/lib/libc/fcntl.c
@@ -131,6 +131,12 @@ int fcntl(
ret = -1;
break;
}
+
+ /*
+ * If we got this far successfully, then we give the optional
+ * filesystem specific handler a chance to process this.
+ */
+
if (ret >= 0) {
if (iop->handlers->fcntl_h) {
int err = (*iop->handlers->fcntl_h)( cmd, iop );
@@ -139,10 +145,6 @@ int fcntl(
ret = -1;
}
}
- else {
- errno = ENOTSUP;
- ret = -1;
- }
}
return ret;
}
diff --git a/cpukit/libcsupport/src/fcntl.c b/cpukit/libcsupport/src/fcntl.c
index 819b2f7778..72a03fa1c5 100644
--- a/cpukit/libcsupport/src/fcntl.c
+++ b/cpukit/libcsupport/src/fcntl.c
@@ -131,6 +131,12 @@ int fcntl(
ret = -1;
break;
}
+
+ /*
+ * If we got this far successfully, then we give the optional
+ * filesystem specific handler a chance to process this.
+ */
+
if (ret >= 0) {
if (iop->handlers->fcntl_h) {
int err = (*iop->handlers->fcntl_h)( cmd, iop );
@@ -139,10 +145,6 @@ int fcntl(
ret = -1;
}
}
- else {
- errno = ENOTSUP;
- ret = -1;
- }
}
return ret;
}