STATUS: 73%
0000 T _read compatible
0006 T _write compatible
000c T _rdwr stack assignments are not compatible
uses for an adding an other temp. reg.
u_base assignment is not correct
01d6 T _open compatible
01fe T _creat compatible
0224 T _copen stack assignments are not compatible
041a T _close compatible
045e T _seek compatible
04ec T _link u_dirp assignment is not correct.
05c2 T _mknod compatible
0660 T _saccess compatible
This commit is contained in:
parent
eabb736762
commit
2596f91389
|
|
@ -54,12 +54,12 @@ register mode;
|
||||||
{
|
{
|
||||||
register struct file *fp;
|
register struct file *fp;
|
||||||
register struct inode *ip;
|
register struct inode *ip;
|
||||||
|
long j;
|
||||||
register struct a {
|
register struct a {
|
||||||
int fdes;
|
int fdes;
|
||||||
char *cbuf;
|
char *cbuf;
|
||||||
unsigned count;
|
unsigned count;
|
||||||
} *uap;
|
} *uap;
|
||||||
long j; /*FIXME: should be stack+0 is stack+2*/
|
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
uap = (struct a *)u.u_ap;
|
uap = (struct a *)u.u_ap;
|
||||||
|
|
@ -70,18 +70,18 @@ register mode;
|
||||||
u.u_error = EBADF;
|
u.u_error = EBADF;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
u.u_base.l = (caddr_t)(((long)uap->cbuf) & 0x7F00FFFF); /* FIXME: this is not 100% compatible */
|
u.u_base.l = (caddr_t)(((long)uap->cbuf) & 0x7F00FFFF); /* FIXME: this is not 100% compatible (sys2.s v1.1 Line 151-154) */
|
||||||
u.u_count = uap->count;
|
u.u_count = uap->count;
|
||||||
u.u_segflg = 0;
|
u.u_segflg = 0;
|
||||||
u.u_fmode = fp->f_flag;
|
u.u_fmode = fp->f_flag;
|
||||||
ip = fp->f_inode;
|
ip = fp->f_inode;
|
||||||
type = ip->i_mode&IFMT;
|
type = ip->i_mode&IFMT;
|
||||||
if (type==IFREG || type==IFDIR) {
|
if (type==IFREG || type==IFDIR) {
|
||||||
u.u_offset = fp->f_offset;
|
u.u_offset = fp->f_offset; /* FIXME: uses different temp. reg. (sys2.s v1.1 line 172-173 */
|
||||||
if(ip->i_locklist) {
|
if(ip->i_locklist) { /* FIXME: uses different temp. reg. (sys2.s v1.1 line 174-175 */
|
||||||
j = u.u_offset + u.u_count; /*FIXME: rr2 is used for adding, rr4 should be used j is used nowhere*/
|
j = u.u_offset + u.u_count; /* FIXME: j should be +0 but is +2 and why is it defined at all? */
|
||||||
if(locked(mode == FREAD?0x100:0,ip,u.u_offset))
|
if(locked(mode == FREAD?0x100:0,ip,u.u_offset)) /* probably it should be some variable locked() usess */
|
||||||
return;
|
return; /* (sys2.s v1.1 line 147-150) */
|
||||||
}
|
}
|
||||||
plock(ip);
|
plock(ip);
|
||||||
if ((u.u_fmode&FAPPEND) && (mode == FWRITE))
|
if ((u.u_fmode&FAPPEND) && (mode == FWRITE))
|
||||||
|
|
@ -140,14 +140,14 @@ creat()
|
||||||
* Check permissions, allocate an open file structure,
|
* Check permissions, allocate an open file structure,
|
||||||
* and call the device open routine if any.
|
* and call the device open routine if any.
|
||||||
*/
|
*/
|
||||||
copen(mode, arg,j)
|
copen(mode, arg)
|
||||||
register mode;
|
register mode;
|
||||||
int arg; /*FIXME: this should be stack +4 but is +0*/
|
int arg; /*FIXME: this has to be stack +4 (sys2.s v1.1 line 332 */
|
||||||
{
|
{
|
||||||
register struct inode *ip;
|
register struct inode *ip;
|
||||||
register struct file *fp;
|
register struct file *fp;
|
||||||
long j; /*FIXME: this should be stack +0 but is +4*/
|
long j;
|
||||||
int i; /*FIXME: this is stack +8*/
|
int i;
|
||||||
|
|
||||||
if ((mode&(FREAD|FWRITE)) == 0) {
|
if ((mode&(FREAD|FWRITE)) == 0) {
|
||||||
u.u_error = EINVAL;
|
u.u_error = EINVAL;
|
||||||
|
|
@ -158,7 +158,7 @@ int arg; /*FIXME: this should be stack +4 but is +0*/
|
||||||
if (ip == NULL) {
|
if (ip == NULL) {
|
||||||
if (u.u_error)
|
if (u.u_error)
|
||||||
return;
|
return;
|
||||||
ip = maknode(arg&07777&(~ISVTX));
|
ip = maknode(arg&07777&(~ISVTX)); /*FIXME: see above (sys2.s v.1. line 350 )*/
|
||||||
if (ip == NULL)
|
if (ip == NULL)
|
||||||
return;
|
return;
|
||||||
mode &= ~FTRUNC;
|
mode &= ~FTRUNC;
|
||||||
|
|
@ -179,9 +179,9 @@ int arg; /*FIXME: this should be stack +4 but is +0*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(ip->i_locklist) {
|
if(ip->i_locklist) {
|
||||||
j=0x4000000; /*FIXME: only usage of j - makes no real sense if its private*/
|
j=0x40000000; /* FIXME: j should be +0 but is +4 and why is it defined at all? */
|
||||||
if(locked(0,ip,0)){
|
if(locked(0,ip,0)){ /* probably it should be some variable locked() usess */
|
||||||
iput(ip);
|
iput(ip); /* (sys2.s v1.1 line 407) */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -211,7 +211,7 @@ int arg; /*FIXME: this should be stack +4 but is +0*/
|
||||||
fp->f_flag = mode&FMASK;
|
fp->f_flag = mode&FMASK;
|
||||||
fp->f_inode = ip;
|
fp->f_inode = ip;
|
||||||
i = u.u_r.r_val1;
|
i = u.u_r.r_val1;
|
||||||
if (setjmp(u.u_qsav)) { /* catch half-opens */
|
if (save(u.u_qsav)) { /* catch half-opens */
|
||||||
setscr();
|
setscr();
|
||||||
if (u.u_error == 0)
|
if (u.u_error == 0)
|
||||||
u.u_error = EINTR;
|
u.u_error = EINTR;
|
||||||
|
|
@ -284,7 +284,7 @@ link()
|
||||||
register struct a {
|
register struct a {
|
||||||
char *target;
|
char *target;
|
||||||
char *linkname;
|
char *linkname;
|
||||||
} *uap;
|
} *uap; /* FIXME: some var definitions are missing (sys2.c v1.1 line 593, 653, 657)*/
|
||||||
|
|
||||||
uap = (struct a *)u.u_ap;
|
uap = (struct a *)u.u_ap;
|
||||||
ip = namei(uchar, 0);
|
ip = namei(uchar, 0);
|
||||||
|
|
@ -302,7 +302,7 @@ link()
|
||||||
*/
|
*/
|
||||||
prele(ip);
|
prele(ip);
|
||||||
|
|
||||||
u.u_dirp.l = (caddr_t)(((long)uap->linkname) & 0x7F00FFFF); /* FIXME: this is not 100% compatible */
|
u.u_dirp.l = (caddr_t)(((long)uap->linkname) & 0x7F00FFFF); /* FIXME: this is not 100% compatible (sys2.c v1.1 line 611-613) */
|
||||||
|
|
||||||
xp = namei(uchar, 1);
|
xp = namei(uchar, 1);
|
||||||
if (xp != NULL) {
|
if (xp != NULL) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue