aboutsummaryrefslogtreecommitdiff
path: root/src/libdisk/scsi.c
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2020-01-14 11:41:08 +0100
committerPetter Rodhelind <petter.rodhelind@gmail.com>2020-01-14 11:41:08 +0100
commit02d7aa8915f9c3a3288dab01f321eb94ba219e3b (patch)
treef053238978479e408a2b83571443e132f30586ab /src/libdisk/scsi.c
parentc0c9d8f883dfd3a7f5a74499d91bb95884b15873 (diff)
parent3d1382b98a502d0c34d5ba2c462396acc515016e (diff)
downloadplan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.gz
plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.tar.bz2
plan9port-02d7aa8915f9c3a3288dab01f321eb94ba219e3b.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/libdisk/scsi.c')
-rw-r--r--src/libdisk/scsi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libdisk/scsi.c b/src/libdisk/scsi.c
index 3f351053..b790ef3b 100644
--- a/src/libdisk/scsi.c
+++ b/src/libdisk/scsi.c
@@ -1,7 +1,7 @@
/*
* Now thread-safe.
*
- * The codeqlock guarantees that once codes != nil, that pointer will never
+ * The codeqlock guarantees that once codes != nil, that pointer will never
* change nor become invalid.
*
* The QLock in the Scsi structure moderates access to the raw device.
@@ -62,7 +62,7 @@ getcodes(void)
codes[n] = '\0';
qunlock(&codeqlock);
}
-
+
char*
scsierror(int asc, int ascq)
{
@@ -228,11 +228,11 @@ scsi(Scsi *s, uchar *cmd, int ccount, void *v, int dcount, int io)
if((n=_scsicmd(s, req, sizeof(req), sense, sizeof(sense), Sread, 0)) < 14)
if(scsiverbose)
fprint(2, "reqsense scsicmd %d: %r\n", n);
-
+
if(_scsiready(s, 0) < 0)
if(scsiverbose)
fprint(2, "unit not ready\n");
-
+
key = sense[2];
code = sense[12];
if(code == 0x17 || code == 0x18) { /* recovered errors */
@@ -319,7 +319,7 @@ openscsi(char *dev)
s->rawfd = rawfd;
s->inquire = p;
s->changetime = time(0);
-
+
if(scsiready(s) < 0)
goto Error1;