Provided by: sg3-utils_1.17-2_i386 bug

NAME

       sg_read_long - send the scsi command read long

SYNOPSIS

       sg_read_long    [--correct]   [--help]   [--lba=<num>]   [--out=<name>]
       [--verbose] [--version] [--xfer_len=<num>] <scsi_device>

DESCRIPTION

       Send READ LONG command to a Linux  SCSI  device.  The  read  buffer  is
       output  in  hex and ASCII to stdout or placed in a file.  Note that the
       data returned includes the logical block data (typically 512 bytes  for
       a  disk)  plus  ECC  information  (whose  format  is  proprietary) plus
       optionally other proprietary data.

       --correct | -c sets the ’CORRCT’ bit in the  READ  LONG  SCSI  command.
       When set the data is corrected by the ECC before being transferred back
       to this utility. The default is to leave  the  ’CORRCT’  bit  clear  in
       which case the data is not corrected.

       --help | -h
              output the usage message then exit.

       --lba=<num> | -l <num>
              the  logical  block address of the sector to read. Assumed to be
              in decimal unless prefixed with ’0x’. Defaults to lba 0. Only 32
              bit lbas currently supported.

       --out=<name> | -o <name>
              instead of outputting ASCII hex to stdout, try to send it to the
              file called <name>. If ’-’ is  given  as  the  <name>  then  the
              (binary) output is sent to stdout. Note that all informative and
              error output is sent to stderr.

       --verbose | -v
              increase the level of verbosity, (i.e. debug output).

       --version | -V
              print the version string and then exit.

       --xfer_len=<num> | -x <num>
              the transfer length in bytes (default  to  520).  If  the  given
              value  (or  the default) does not match the "long" block size of
              the device, the appropriate xfer_len value is derived  from  the
              error  response  and  printed  (to stderr). The idea is that the
              user will retry this utility with the correct transfer length.

       The lba and  xfer_len  numerical  arguments  may  be  followed  by  the
       following  multiplicative  suffixes:  c C *1; w W *2; b B *512; k K KiB
       *1,024; KB  *1,000;  m  M  MiB  *1,048,576;  MB  *1,000,000;  g  G  GiB
       *1,073,741,824;  and  GB  *1,000,000,000  .  Also  a suffix of the form
       "x<n>" multiplies the leading number by <n>.

       Alternatively numerical values can be given in hexadecimal preceded  by
       either  "0x"  or "0X". When hex numbers are given multipliers cannot be
       used.

       As a data point, Fujitsu uses a  54  byte  ECC  (per  block)  which  is
       capable  of  correcting  up to a single burst error or 216 bits "on the
       fly". [Information obtained from MAV20xxrc product manual.]

AUTHORS

       Written by Douglas Gilbert.

REPORTING BUGS

       Report bugs to <dgilbert at interlog dot com>.

COPYRIGHT

       Copyright © 2004-2005 Douglas Gilbert
       This software is distributed under the  GPL  version  2.  There  is  NO
       warranty;  not  even  for  MERCHANTABILITY  or FITNESS FOR A PARTICULAR
       PURPOSE.

SEE ALSO

       sg_write_long, sg_dd