2000-10-18 Joel Sherrill <joel@OARcorp.com>

* libc/fcntl.c: Do not require every filesystem to have an fcntl()
	handler.  Most fcntl() operations can be performed with no
	filesystem support.
	* ChangeLog: Corrected comment.
This commit is contained in:
Joel Sherrill
2000-10-18 13:08:22 +00:00
parent 3a410c5691
commit e6babd7e08
3 changed files with 18 additions and 12 deletions

View File

@@ -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;
}

View File

@@ -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;
}