diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2011-02-12 02:09:20 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2011-02-12 02:09:20 +0000 |
commit | 6d20b35271ff0394217801f7d9d36953440689a0 (patch) | |
tree | aa2b6548c18345725e711fc1d36eec7d1c02039f | |
parent | a9df0c8e87baa4bd80429d3f10c8e1ff9cef586b (diff) | |
download | sg3_utils-6d20b35271ff0394217801f7d9d36953440689a0.tar.gz |
sg_test_rwbuf.8 typos and related
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@384 6180dd3e-e324-4e3e-922d-17de1ae2f315
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | doc/sg_read_buffer.8 | 9 | ||||
-rw-r--r-- | doc/sg_test_rwbuf.8 | 8 | ||||
-rw-r--r-- | src/sg_rbuf.c | 26 | ||||
-rw-r--r-- | src/sg_read_buffer.c | 2 |
5 files changed, 29 insertions, 18 deletions
@@ -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.31 [20110211] [svn: r383] +Changelog for sg3_utils-1.31 [20110211] [svn: r384] - sg_decode_sense: new utility to decode sense data - sg_vpd: LB provisioning + Block limits pages (sbc3r26) - sync asc/ascq and version descriptors with spc4r28 diff --git a/doc/sg_read_buffer.8 b/doc/sg_read_buffer.8 index ae9054c8..c001218a 100644 --- a/doc/sg_read_buffer.8 +++ b/doc/sg_read_buffer.8 @@ -23,7 +23,9 @@ output the usage message then exit. If used multiple times also prints the mode names and their acronyms. .TP \fB\-H\fR, \fB\-\-hex\fR -output the response in hexadecimal. +output the response in hexadecimal. When given twice the response is +output in hex with the corresponding representation in ASCII to the +right of each line. .TP \fB\-i\fR, \fB\-\-id\fR=\fIID\fR this option sets the buffer id field in the cdb. \fIID\fR is a value between @@ -37,8 +39,9 @@ respond with less bytes. \fB\-m\fR, \fB\-\-mode\fR=\fIMO\fR this option sets the mode field in the cdb. \fIMO\fR is a value between 0 (default) and 31 inclusive. Alternatively an abbreviation can be given. -To list the available mode abbreviations given an invalid -one (e.g. '\-\-mode=xxx'). +To list the available mode abbreviations use an invalid +one (e.g. '\-\-mode=xxx'). As an example, to fetch the read buffer +descriptor give '\-\-mode=desc' . .TP \fB\-o\fR, \fB\-\-offset\fR=\fIOFF\fR this option sets the buffer offset field in the cdb. \fIOFF\fR is a value diff --git a/doc/sg_test_rwbuf.8 b/doc/sg_test_rwbuf.8 index 081bb4b6..b8187898 100644 --- a/doc/sg_test_rwbuf.8 +++ b/doc/sg_test_rwbuf.8 @@ -1,4 +1,4 @@ -.TH SG_TEST_RWBUF "8" "January 2007" "sg3_utils\-1.23" SG3_UTILS +.TH SG_TEST_RWBUF "8" "February 2011" "sg3_utils\-1.31" SG3_UTILS .SH NAME sg_test_rwbuf \- Tests the SCSI host adapter by issuing write and read operations on a device's buffer and calculating checksums. @@ -42,8 +42,8 @@ buffer length and offset, print them out then exit (without testing with write/read sequences). .TP \fB\-s\fR, \fB\-\-size\fR=\fISZ\fR -where \fISZ\fRis teh size of buffer in bytes to be written then read and -checked. This number needs to be less than on equal to the size of the +where \fISZ\fR is the size of buffer in bytes to be written then read and +checked. This number needs to be less than or equal to the size of the device's data buffer which can be seen from the \fI\-\-quick\fR option. Either this option or the \fI\-\-quick\fR option should be given. .TP @@ -79,7 +79,7 @@ the sg3_utils(8) man page. .SH AUTHORS Written by D. Gilbert and K. Garloff .SH COPYRIGHT -Copyright \(co 2000\-2006 Douglas Gilbert, Kurt Garloff +Copyright \(co 2000\-2011 Douglas Gilbert, Kurt Garloff .br This software is distributed under the GPL version 2. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/sg_rbuf.c b/src/sg_rbuf.c index 9f3e9f39..346dfeaf 100644 --- a/src/sg_rbuf.c +++ b/src/sg_rbuf.c @@ -25,7 +25,7 @@ #include "sg_io_linux.h" /* A utility program originally written for the Linux OS SCSI subsystem. - * Copyright (C) 1999-2009 D. Gilbert + * Copyright (C) 1999-2011 D. Gilbert * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) @@ -51,7 +51,7 @@ #endif -static char * version_str = "4.88 20090908"; +static char * version_str = "4.89 20110211"; static struct option long_options[] = { {"buffer", 1, 0, 'b'}, @@ -82,7 +82,9 @@ struct opts_t { int opt_new; }; -static void usage() + +static void +usage() { fprintf(stderr, "Usage: sg_rbuf [--buffer=EACH] [--dio] [--help] " "[--mmap] [--quick]\n" @@ -104,7 +106,8 @@ static void usage() "repeatedly\n"); } -static void usage_old() +static void +usage_old() { printf("Usage: sg_rbuf [-b=EACH_KIB] [-d] [-m] [-q] [-s=OVERALL_MIB] " "[-t] [-v] [-V]\n DEVICE\n"); @@ -123,7 +126,8 @@ static void usage_old() "repeatedly\n"); } -static void usage_for(const struct opts_t * optsp) +static void +usage_for(const struct opts_t * optsp) { if (optsp->opt_new) usage(); @@ -131,7 +135,8 @@ static void usage_for(const struct opts_t * optsp) usage_old(); } -static int process_cl_new(struct opts_t * optsp, int argc, char * argv[]) +static int +process_cl_new(struct opts_t * optsp, int argc, char * argv[]) { int c, n; int64_t nn; @@ -214,7 +219,8 @@ static int process_cl_new(struct opts_t * optsp, int argc, char * argv[]) return 0; } -static int process_cl_old(struct opts_t * optsp, int argc, char * argv[]) +static int +process_cl_old(struct opts_t * optsp, int argc, char * argv[]) { int k, jmp_out, plen, num; int64_t nn; @@ -301,7 +307,8 @@ static int process_cl_old(struct opts_t * optsp, int argc, char * argv[]) return 0; } -static int process_cl(struct opts_t * optsp, int argc, char * argv[]) +static int +process_cl(struct opts_t * optsp, int argc, char * argv[]) { int res; char * cp; @@ -322,7 +329,8 @@ static int process_cl(struct opts_t * optsp, int argc, char * argv[]) } -int main(int argc, char * argv[]) +int +main(int argc, char * argv[]) { int sg_fd, res, j; unsigned int k, num; diff --git a/src/sg_read_buffer.c b/src/sg_read_buffer.c index 0bd891b6..d84de8d9 100644 --- a/src/sg_read_buffer.c +++ b/src/sg_read_buffer.c @@ -299,7 +299,7 @@ main(int argc, char * argv[]) if (do_raw) dStrRaw((const char *)resp, rb_len); else if (do_hex || (rb_len < 4)) - dStrHex((const char *)resp, rb_len, 1); + dStrHex((const char *)resp, rb_len, ((do_hex > 1) ? 0 : 1)); else { switch (rb_mode) { case MODE_DESCRIPTOR: |