summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorken <ken@FreeBSD.org>1999-06-10 16:14:18 +0000
committerken <ken@FreeBSD.org>1999-06-10 16:14:18 +0000
commitdbeceb7755c45d8011b352f07c60e67d32489504 (patch)
treec4e058e76cedefbcf161cc0915beca83c6b64d93 /sbin
parente2ee147d6ed976e1c2dd4690ca2a6c71d3997b4e (diff)
downloadFreeBSD-src-dbeceb7755c45d8011b352f07c60e67d32489504.zip
FreeBSD-src-dbeceb7755c45d8011b352f07c60e67d32489504.tar.gz
For vendor-specific commands sent using the 'camcontrol cmd' facility,
use the passed in CDB length, not 1. Submitted by: Jean-Marc Zucconi <jmz@FreeBSD.ORG>
Diffstat (limited to 'sbin')
-rw-r--r--sbin/camcontrol/camcontrol.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c
index a129e18..db37df2 100644
--- a/sbin/camcontrol/camcontrol.c
+++ b/sbin/camcontrol/camcontrol.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: camcontrol.c,v 1.10 1999/05/06 20:15:38 ken Exp $
+ * $Id: camcontrol.c,v 1.11 1999/05/10 23:30:01 ken Exp $
*/
#include <sys/ioctl.h>
@@ -1557,8 +1557,8 @@ scsicmd(struct cam_device *device, int argc, char **argv, char *combinedopt,
hook.argc = argc - optind;
hook.argv = argv + optind;
hook.got = 0;
- buff_encode_visit(cdb, sizeof(cdb), tstr,
- iget, &hook);
+ cdb_len = buff_encode_visit(cdb, sizeof(cdb), tstr,
+ iget, &hook);
/*
* Increment optind by the number of arguments the
* encoding routine processed. After each call to
@@ -1693,7 +1693,7 @@ scsicmd(struct cam_device *device, int argc, char **argv, char *combinedopt,
case 3:
case 6:
case 7:
- cdb_len = 1;
+ /* computed by buff_encode_visit */
break;
case 4:
cdb_len = 16;
OpenPOWER on IntegriCloud