STATUS: 74% 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		not compatible
    0612 T _kill		not compatible
    0722 T _times		not 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		not compatible
    09ee T _nosys		compatible
    09f8 T _nullsys		compatible
    09fa T _bpt			not existent
    0a0a T _utssys		not compatible
    0b0a T _ulimit		nearly compatible
This commit is contained in:
Oliver Lehmann 2008-05-19 20:10:19 +00:00
parent 5ff6e8b5e0
commit b4b7540453
1 changed files with 19 additions and 9 deletions

View File

@ -53,18 +53,21 @@ ftime()
} *uap; } *uap;
struct timeb t; struct timeb t;
register unsigned ms; register unsigned ms;
extern int Timezone;
extern int Dstflag;
uap = (struct a *)u.u_ap; uap = (struct a *)u.u_ap;
dvi(); dvi();
t.time = time; t.time = time;
ms = lbolt; ms = lbolt;
evi();
if (ms > HZ) { if (ms > HZ) {
ms -= HZ; ms -= HZ;
t.time++; t.time++;
} }
t.millitm = (1000*ms)/HZ; t.millitm = (1000*ms)/HZ;
t.timezone = TIMEZONE; t.timezone = Timezone;
t.dstflag = DSTFLAG; t.dstflag = Dstflag;
if (copyout((caddr_t)&t, (caddr_t)uap->tp, sizeof(t)) < 0) if (copyout((caddr_t)&t, (caddr_t)uap->tp, sizeof(t)) < 0)
u.u_error = EFAULT; u.u_error = EFAULT;
} }
@ -572,7 +575,7 @@ ulimit()
int cmd; int cmd;
long arg; long arg;
} *uap; } *uap;
register brk, stk; register stk, j, brk, i;
uap = (struct a *)u.u_ap; uap = (struct a *)u.u_ap;
switch(uap->cmd) { switch(uap->cmd) {
@ -585,12 +588,19 @@ ulimit()
break; break;
case 3: case 3:
brk = 1024 - u.u_dsize if (u.u_segmented) {
- ((u.u_ssize + btoct(8*1024) - 1)/btoct(8*1024)) brk = u.u_segno[u.u_nsegs - 1];
* btoct(8*1024); stk = 256;
if ((stk = btoct(8*1024) - u.u_ssize % btoct(8*1024)) < USIZE) } else {
brk -= USIZE - stk; brk = 0;
u.u_r.r_off = ctob((long)brk); stk = 256 - u.u_ssize;
}
i = umemory-USIZE-u.u_tsize-u.u_ssize-u.u_dsize;
u.u_r.r_val1 = brk;
u.u_r.r_val2 = min(i,stk)<<8;
break; break;
} }
} }