Module Name:    src
Committed By:   mlelstv
Date:           Mon Jun 25 20:33:56 UTC 2012

Modified Files:
        src/sbin/iscsictl: iscsic_driverif.c

Log Message:
report luns returns a 32bit list length.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sbin/iscsictl/iscsic_driverif.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/iscsictl/iscsic_driverif.c
diff -u src/sbin/iscsictl/iscsic_driverif.c:1.4 src/sbin/iscsictl/iscsic_driverif.c:1.5
--- src/sbin/iscsictl/iscsic_driverif.c:1.4	Wed Jun 20 08:19:49 2012
+++ src/sbin/iscsictl/iscsic_driverif.c	Mon Jun 25 20:33:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsic_driverif.c,v 1.4 2012/06/20 08:19:49 martin Exp $	*/
+/*	$NetBSD: iscsic_driverif.c,v 1.5 2012/06/25 20:33:56 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2005,2006,2011 The NetBSD Foundation, Inc.
@@ -590,7 +590,6 @@ report_luns(int argc, char **argv)
 	int rc;
 	size_t llen;
 	uint32_t n;
-	uint16_t n2;
 	uint64_t *lp;
 
 	(void) memset(&io, 0x0, sizeof(io));
@@ -609,8 +608,8 @@ report_luns(int argc, char **argv)
 	if ((rc = do_ioctl(&io, TRUE)) != 0) {
 		return rc;
 	}
-	(void) memcpy(&n2, buf, sizeof(n2));
-	llen = ntohs(n2);
+	(void) memcpy(&n, buf, sizeof(n));
+	llen = ntohs(n);
 	if (!llen) {
 		printf("No LUNs!\n");
 		return 1;

Reply via email to