From 64ab0e59c8e3758732e03cda0c1f2b909f973b54 Mon Sep 17 00:00:00 2001 From: Oliver Lehmann Date: Sun, 18 May 2008 19:35:50 +0000 Subject: [PATCH] TODO: 0000 T _read compatible 0006 T _write compatible 000c T _rdwr at least base assignment not correct. 01d6 T _open compatible 01fe T _creat compatible 0224 T _copen not compatible - further checking needed 041a T _close compatible 045e T _seek compatible 04ec T _link dirp assignment not correct. 05c2 T _mknod compatible 0660 T _saccess compatible --- WEGA/src/uts/sys/sys2.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/WEGA/src/uts/sys/sys2.c b/WEGA/src/uts/sys/sys2.c index 09c4754..38dc927 100644 --- a/WEGA/src/uts/sys/sys2.c +++ b/WEGA/src/uts/sys/sys2.c @@ -52,6 +52,7 @@ write() rdwr(mode) register mode; { + int foo,foo2; register struct file *fp; register struct inode *ip; register struct a { @@ -69,7 +70,7 @@ register mode; u.u_error = EBADF; return; } - u.u_base.l = (caddr_t)uap->cbuf; + u.u_base.left = (caddr_t)uap->cbuf; u.u_count = uap->count; u.u_segflg = 0; u.u_fmode = fp->f_flag; @@ -244,15 +245,6 @@ seek() uap->off += fp->f_offset; else if (uap->sbase == 2) uap->off += fp->f_inode->i_size; - else if (uap->sbase != 0) { - u.u_error = EINVAL; - psignal(u.u_procp, SIGSYS); - return; - } - if (uap->off < 0) { - u.u_error = EINVAL; - return; - } fp->f_offset = uap->off; u.u_r.r_off = uap->off; } @@ -272,10 +264,6 @@ link() ip = namei(uchar, 0); if (ip == NULL) return; - if (ip->i_nlink >= MAXLINK) { - u.u_error = EMLINK; - goto out; - } if ((ip->i_mode&IFMT)==IFDIR && !suser()) goto out; /*