diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2011-01-04 10:02:21 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2011-01-04 10:02:21 +0000 |
commit | 8382eea8426de9d683e76105c28ddaae95870302 (patch) | |
tree | ca6ca4c557f107e9f84c86bb0279238430de4090 /usr.sbin/iscsid | |
parent | bdfc52b61054950405665e0445d8c914b9a2afc7 (diff) |
Truncate the scsi sense data to 18 bytes if more data was supplied.
dlg@ said it is OK to do that since the additional data is optional.
My connection to the iscsi target sending 64byte sense data is now
much happier.
Diffstat (limited to 'usr.sbin/iscsid')
-rw-r--r-- | usr.sbin/iscsid/vscsi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/iscsid/vscsi.c b/usr.sbin/iscsid/vscsi.c index ef1f7ba2697..dd94ea62183 100644 --- a/usr.sbin/iscsid/vscsi.c +++ b/usr.sbin/iscsid/vscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vscsi.c,v 1.2 2010/09/25 16:20:06 sobrado Exp $ */ +/* $OpenBSD: vscsi.c,v 1.3 2011/01/04 10:02:20 claudio Exp $ */ /* * Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org> @@ -149,8 +149,7 @@ vscsi_status(int tag, int status, void *buf, size_t len) t2i.status = status; if (buf) { if (len > sizeof(t2i.sense)) - fatal("vscsi_status: I'm sorry, Dave. " - "I'm afraid I can't do that."); + len = sizeof(t2i.sense); bcopy(buf, &t2i.sense, len); } |