aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2009-06-18 02:38:40 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2009-06-18 02:38:40 +0000
commitc993e63f5f5b2fca0cf434c9001995e22a7ab252 (patch)
treec854977395273df783fd12fa538ffbf57bdbf657
parentbdf08eb339d446e045ed7e7d08be11e16a7e76ad (diff)
downloadsg3_utils-c993e63f5f5b2fca0cf434c9001995e22a7ab252.tar.gz
sg_luns: reduce maxlen default to 8192
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@278 6180dd3e-e324-4e3e-922d-17de1ae2f315
-rw-r--r--ChangeLog3
-rw-r--r--doc/sg_luns.86
-rw-r--r--src/sg_luns.c4
3 files changed, 7 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index a31ef588..65e0b1be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@ Each utility has its own version number, date of last change and
some description at the top of its ".c" file. All utilities in the main
directory have their own "man" pages. There is also a sg3_utils man page.
-Changelog for sg3_utils-1.28 [20090615] [svn: r277]
+Changelog for sg3_utils-1.28 [20090617] [svn: r278]
- sg_unmap: new utility for thin provisioning
- add examples/sg_unmap_example.txt
- sg_read_block_limits: new utility for tape drives
@@ -13,6 +13,7 @@ Changelog for sg3_utils-1.28 [20090615] [svn: r277]
- tweak print format, remove test code
- sg_requests: remove test code in progress calculation
- sg_reset: add target reset option
+ - sg_luns: reduce default maxlen to 8192 (for FreeBSD)
- sg_lib: sg_set_binary_mode() needs config.h included
- change SG3_UTILS_* constants to SG_LIB_*
- decode service actions within persistent reserve in/out
diff --git a/doc/sg_luns.8 b/doc/sg_luns.8
index f0cc26c5..83ef8503 100644
--- a/doc/sg_luns.8
+++ b/doc/sg_luns.8
@@ -1,4 +1,4 @@
-.TH SG_LUNS "8" "April 2008" "sg3_utils\-1.26" SG3_UTILS
+.TH SG_LUNS "8" "June 2009" "sg3_utils\-1.28" SG3_UTILS
.SH NAME
sg_luns \- send the SCSI REPORT LUNS command
.SH SYNOPSIS
@@ -28,7 +28,7 @@ output response to this command in ASCII hex.
\fB\-m\fR, \fB\-\-maxlen\fR=\fILEN\fR
where \fILEN\fR is the (maximum) response length in bytes. It is placed in
the cdb's "allocation length" field. If not given (or \fILEN\fR is zero)
-then 65536 is used. The maximum value of \fILEN\fR is 65536.
+then 8192 is used. The maximum allowed value of \fILEN\fR is 65536.
.TP
\fB\-q\fR, \fB\-\-quiet\fR
output ASCII hex rendering of each report lun, one per line.
@@ -69,7 +69,7 @@ Written by Douglas Gilbert.
.SH "REPORTING BUGS"
Report bugs to <dgilbert at interlog dot com>.
.SH COPYRIGHT
-Copyright \(co 2004\-2008 Douglas Gilbert
+Copyright \(co 2004\-2009 Douglas Gilbert
.br
This software is distributed under a FreeBSD license. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/src/sg_luns.c b/src/sg_luns.c
index 93d43c38..0df18a27 100644
--- a/src/sg_luns.c
+++ b/src/sg_luns.c
@@ -48,10 +48,10 @@
* This program issues the SCSI REPORT LUNS command to the given SCSI device.
*/
-static char * version_str = "1.14 20090615";
+static char * version_str = "1.15 20090617";
#define MAX_RLUNS_BUFF_LEN (1024 * 64)
-#define DEF_RLUNS_BUFF_LEN MAX_RLUNS_BUFF_LEN
+#define DEF_RLUNS_BUFF_LEN (1024 * 8)
static unsigned char reportLunsBuff[MAX_RLUNS_BUFF_LEN];