STATUS: 97% done

0000 T _gtime		compatible
    000e T _ftime		compatible
    00a4 T _stime		compatible
    00d2 T _setuid		compatible
    012e T _getuid		compatible
    0148 T _setgid		compatible
    019a T _getgid		compatible
    01b4 T _getpid		compatible
    01d0 T _setpgrp		compatible
    0206 T _sync		compatible
    020e T _nice		compatible
    027c T _unlink		compatible
    038e T _chdir		compatible
    0398 T _chroot		compatible
    03ac T _chdirec		compatible
    042a T _chmod		compatible
    04a0 T _chown		compatible
    04fa T _ssig		compatible
    0612 T _kill		compatible
    0722 T _times		compatible
    077a T _profil		compatible
    07ac T _sprofil		not existent
    0872 T _alarm		compatible
    08aa T _pause		compatible
    08bc T _umask		compatible
    08e0 T _utime		compatible
    09ee T _nosys		compatible
    09f8 T _nullsys		compatible
    09fa T _bpt			compatible
    0a0a T _utssys		compatible
    0b0a T _ulimit		compatible
This commit is contained in:
Oliver Lehmann 2008-05-21 22:23:13 +00:00
parent 94d5eb023f
commit db4050bcb1
1 changed files with 16 additions and 11 deletions

View File

@ -33,7 +33,6 @@ char sys4wstr[] = "@[$]sys4.c Rev : 4.2 09/26/83 22:15:02";
#include <sys/filsys.h> #include <sys/filsys.h>
#include <sys/mount.h> #include <sys/mount.h>
/* /*
* Everything in this file is a routine implementing a system call. * Everything in this file is a routine implementing a system call.
*/ */
@ -86,6 +85,7 @@ stime()
if(suser()) if(suser())
time = uap->time; time = uap->time;
} }
setuid() setuid()
{ {
register uid; register uid;
@ -348,7 +348,6 @@ ssig()
} }
u.u_signal[a-1] = uap->fun; u.u_signal[a-1] = uap->fun;
u.u_procp->p_sig &= ~(1L<<(a-1)); u.u_procp->p_sig &= ~(1L<<(a-1));
if (a == SIGCLD) { if (a == SIGCLD) {
a = u.u_procp->p_pid; a = u.u_procp->p_pid;
for (p = &proc[1]; p < &proc[Nproc] ; p++) { for (p = &proc[1]; p < &proc[Nproc] ; p++) {
@ -549,22 +548,23 @@ bpt()
utssys() utssys()
{ {
register i; register int c;
register struct mount *mp;
register struct a { register struct a {
char *cbuf; char *cbuf;
int mv; int mv;
int type; int type;
} *uap; } *uap;
register struct mount *mp; struct filsys *fp;
register struct filsys *fp; daddr_t tfree;
ino_t tinode;
char fname[6];
char fpack[6];
extern int Nmount; extern int Nmount;
/* variable declarations missing probably used for case 2 */
uap = (struct a *)u.u_ap; uap = (struct a *)u.u_ap;
switch(uap->type) { switch(uap->type) {
/* case 0 should work - case 2 is not compatible */
case 0: /* uname */ case 0: /* uname */
if (copyout(&utsname, uap->cbuf, sizeof(struct utsname))) if (copyout(&utsname, uap->cbuf, sizeof(struct utsname)))
u.u_error = EFAULT; u.u_error = EFAULT;
@ -573,13 +573,18 @@ case 0: /* uname */
/* case 1 was umask */ /* case 1 was umask */
case 2: /* ustat */ case 2: /* ustat */
for(i=0; i<Nmount; i++) { for (mp = mount; mp < &mount[Nmount]; mp++) {
mp = &mount[i];
if(mp->m_flags == MINUSE && mp->m_dev==uap->mv) { if(mp->m_flags == MINUSE && mp->m_dev==uap->mv) {
fp = mp->m_bufp->b_un.b_filsys; fp = mp->m_bufp->b_un.b_filsys;
if(copyout(&fp->s_tfree, uap->cbuf, 18)) tfree = fp->s_tfree;
tinode = fp->s_tinode;
for(c=0; c < 6; c++) {
fname[c] = fp->s_fname[c];
fpack[c] = fp->s_fpack[c];
}
if(copyout(&tfree, uap->cbuf, 18))
u.u_error = EFAULT; u.u_error = EFAULT;
return; return;
} }