diff options
author | bde <bde@FreeBSD.org> | 1996-12-19 19:42:37 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-12-19 19:42:37 +0000 |
commit | d8370232258e75a57361cafc2243862df35d18f1 (patch) | |
tree | cc194e09ac16ca08b2ba8a58498a24e9e4347dfa /sys/compat | |
parent | 30805cd75c006c0be5fa92042de94702692aa910 (diff) | |
download | FreeBSD-src-d8370232258e75a57361cafc2243862df35d18f1.zip FreeBSD-src-d8370232258e75a57361cafc2243862df35d18f1.tar.gz |
Fixed lseek() on named pipes. It always succeeded but should always fail.
Broke locking on named pipes in the same way as locking on non-vnodes
(wrong errno). This will be fixed later.
The fix involves negative logic. Named pipes are now distinguished from
other types of files with vnodes, and there is additional code to handle
vnodes and named pipes in the same way only where that makes sense (not
for lseek, locking or TIOCSCTTY).
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linux/linux_stats.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 8d562e0..20e7880 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_stats.c,v 1.4 1996/01/30 12:23:17 peter Exp $ + * $Id: linux_stats.c,v 1.5 1996/03/02 19:38:00 peter Exp $ */ #include <sys/param.h> @@ -192,6 +192,7 @@ linux_newfstat(struct proc *p, struct linux_newfstat_args *args, int *retval) || (fp = fdp->fd_ofiles[args->fd]) == NULL) return EBADF; switch (fp->f_type) { + case DTYPE_FIFO: case DTYPE_VNODE: error = vn_stat((struct vnode *)fp->f_data, &buf, p); break; |