diff options
| author | Charles.Forsyth <devnull@localhost> | 2007-07-14 10:41:18 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2007-07-14 10:41:18 +0000 |
| commit | a6011949be081a8fe1bec0713ce60c36beb3a351 (patch) | |
| tree | 0855fa75f38a7361a9b7a9fe12608bd99761add0 /appl/lib/scsiio.b | |
| parent | d42218ac2785e9e4bea53ec499f563cab5747959 (diff) | |
20070714-1142
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; -} |
