diff options
author | 2014-03-25 12:01:28 +0000 | |
---|---|---|
committer | 2014-03-25 12:01:28 +0000 | |
commit | bd6c3caab1ffcd726272961d955aed9a5626ae99 (patch) | |
tree | 85060bde1594eaad23fdd528eec0947b184dbf14 | |
parent | reword error message when a table has an invalid configuration file, it has (diff) | |
download | wireguard-openbsd-bd6c3caab1ffcd726272961d955aed9a5626ae99.tar.xz wireguard-openbsd-bd6c3caab1ffcd726272961d955aed9a5626ae99.zip |
when working with the cdb its better to use cmdlen than datalen.
ok jmatthew@
-rw-r--r-- | sys/dev/pci/qle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/qle.c b/sys/dev/pci/qle.c index c40f9109a07..4a06d935d7e 100644 --- a/sys/dev/pci/qle.c +++ b/sys/dev/pci/qle.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qle.c,v 1.17 2014/03/25 07:15:52 dlg Exp $ */ +/* $OpenBSD: qle.c,v 1.18 2014/03/25 12:01:28 dlg Exp $ */ /* * Copyright (c) 2013, 2014 Jonathan Matthew <jmatthew@openbsd.org> @@ -2388,7 +2388,7 @@ qle_put_cmd(struct qle_softc *sc, void *buf, struct scsi_xfer *xs, if (xs->cmdlen > 16) { htolem16(&req->req_fcp_cmnd_len, 12 + xs->cmdlen + 4); cmnd->fcp_add_cdb_len = xs->cmdlen - 16; - memcpy(cmnd->fcp_cdb + xs->datalen, &fcp_dl, sizeof(fcp_dl)); + memcpy(cmnd->fcp_cdb + xs->cmdlen, &fcp_dl, sizeof(fcp_dl)); } else { htolem16(&req->req_fcp_cmnd_len, 12 + 16 + 4); cmnd->fcp_add_cdb_len = 0; |