diff options
Diffstat (limited to 'appl/lib/scsiio.b')
| -rw-r--r-- | appl/lib/scsiio.b | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/appl/lib/scsiio.b b/appl/lib/scsiio.b index 152a22dd..3b4ce115 100644 --- a/appl/lib/scsiio.b +++ b/appl/lib/scsiio.b @@ -264,7 +264,7 @@ Scsi.open(dev: string): ref Scsi return nil; buf := array[512] of byte; - n := readn(ctlfd, buf, len buf); + n := sys->readn(ctlfd, buf, len buf); if(n < 8){ if(n >= 0) sys->werrstr("error reading ctl file"); @@ -301,17 +301,3 @@ qunlock(s: ref Scsi) { <-s.lock; } - -readn(fd: ref Sys->FD, buf: array of byte, nb: int): int -{ - for(nr := 0; nr < nb;){ - n := sys->read(fd, buf[nr:], nb-nr); - if(n <= 0){ - if(nr == 0) - return n; - break; - } - nr += n; - } - return nr; -} |
