From f4ab6bd1adbb9bff11da6885084de2ed31f2a415 Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Fri, 5 Jun 2009 13:33:40 +0000 Subject: 20090605-1433 --- appl/cmd/disk/kfs.b | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'appl/cmd') diff --git a/appl/cmd/disk/kfs.b b/appl/cmd/disk/kfs.b index 56440205..d4c23ccf 100644 --- a/appl/cmd/disk/kfs.b +++ b/appl/cmd/disk/kfs.b @@ -444,7 +444,7 @@ init(nil: ref Draw->Context, args: list of string) if(wrencheck(wrenfd)) error("kfs super/root in trouble"); - if(!ream && !superok(0)){ + if(!ream && !readonly && !superok(0)){ sys->print("kfs needs check\n"); if(!nocheck) check(thedevice, Cquiet|Cfree); @@ -508,7 +508,7 @@ shutdown() kill(hd pids); # TO DO: when Bmod deferred, must sync # sync super block - if(superok(1)){ + if(!readonly && superok(1)){ # ; } iobufclear(); @@ -1393,6 +1393,8 @@ dirread(cp: ref Chan, f: ref Tmsg.Read, file: ref File, d: ref Dentry): ref Rmsg data := array[count] of byte; offset := f.offset; iounit := cp.msize-IOHDRSZ; + if(count > iounit) + count = iounit; # Pick up where we left off last time if nothing has changed, # otherwise must scan from the beginning. -- cgit v1.2.3