From 59bd979548320bb8e82fec03dc5e5ccb3adcf828 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 22 Jun 1994 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1994-06-22 --- pc/fns.h | 1 + pc/l.s | 4 ++++ port/error.h | 1 + port/sysfile.c | 3 ++- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pc/fns.h b/pc/fns.h index 1a7e474ab462bd753b538384d61b2e05c409b7ce..d201df41e2c63b95de4efbe9e20db5db40c10009 100644 --- a/pc/fns.h +++ b/pc/fns.h @@ -25,6 +25,7 @@ void fpsave(FPsave*); ulong fpstatus(void); ulong getcr0(void); ulong getcr2(void); +ulong getcr3(void); char* getconf(char*); ulong getstatus(void); void hardclock(void); diff --git a/pc/l.s b/pc/l.s index cc8f08a96076c0e6eb3c190faab6130a0ad55bcd..4edc6485fa5cc42fc00d1d389e6945e61d67aebf 100644 --- a/pc/l.s +++ b/pc/l.s @@ -289,6 +289,10 @@ TEXT getcr2(SB),$0 /* fault address */ MOVL CR2,AX RET +TEXT getcr3(SB),$0 /* page directory base */ + MOVL CR3,AX + RET + #define FPOFF\ WAIT;\ MOVL CR0,AX;\ diff --git a/port/error.h b/port/error.h index 005a40c1bd262bcc1f1d46d6b03501e1ea59670f..789686bc1da6546f4961c11f357865126455cb42 100644 --- a/port/error.h +++ b/port/error.h @@ -53,3 +53,4 @@ extern char Erecover[]; /* failed to recover fd */ extern char Eshort[]; /* i/o count too small */ extern char Enobitstore[]; /* out of screen memory */ extern char Egreg[]; /* coherency problem */ +extern char Ebadspec[]; /* bad attach specifier */ diff --git a/port/sysfile.c b/port/sysfile.c index 299273883ed9a8e46e092ab9c651f4372b5fd075..2e8bf5ddafdae329b07a7448793c0e6a669ccfa7 100644 --- a/port/sysfile.c +++ b/port/sysfile.c @@ -548,7 +548,8 @@ bindmount(ulong *arg, int ismount) error(Ebadarg); bogus.spec = (char*)arg[3]; - nameok(bogus.spec); + if(strchr(bogus.spec, ' ')) + error(Ebadspec); ret = devno('M', 0); c0 = (*devtab[ret].attach)((char*)&bogus);