From f306361695318725efb627300753fe67d4a6629b Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 22 May 1991 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1991-05-22 --- port/stfcall.c | 2 +- port/sysproc.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/port/stfcall.c b/port/stfcall.c index 80e90d72e1a5a74d81b4dd14505d49cfe325c8f2..79a338ccc22203ac28e05b9b6f47cb96ff51a549 100644 --- a/port/stfcall.c +++ b/port/stfcall.c @@ -7,7 +7,7 @@ #include "fcall.h" -#define DPRINT if(fcalldebug)kprint +#define DPRINT if(fcalldebug)print int fcalldebug = 0; diff --git a/port/sysproc.c b/port/sysproc.c index f1a281066dd4bf68743dfc681a77ae8315f08ceb..39a8b4e69be895a2b074d33c5b5d060e6233d8e4 100644 --- a/port/sysproc.c +++ b/port/sysproc.c @@ -152,7 +152,7 @@ sysexec(ulong *arg) char **argv, **argp; char *a, *charp, *file; char *progarg[sizeof(Exec)/2+1], elem[NAMELEN]; - ulong ssize, spage, nargs, nbytes, n, bssend; + ulong sbase, ssize, spage, nargs, nbytes, n, bssend; ulong *sp; int indir; Exec exec; @@ -239,13 +239,16 @@ sysexec(ulong *arg) } ssize = BY2WD*(nargs+1) + ((nbytes+(BY2WD-1)) & ~(BY2WD-1)); spage = (ssize+(BY2PG-1)) >> PGSHIFT; - + sbase = TSTKTOP-(spage<seg[ESEG]; s->proc = p; - s->o = neworig(TSTKTOP-(spage<o = neworig(sbase, spage, OWRPERM, 0); s->minva = s->o->va; s->maxva = TSTKTOP;