Silly me. I thought that if the result returned by the write() was okay, if
the # of bytes read as reported by the read() was okay, if the 'status'
variable in sg_header was okay, then everything was okay, no SCSI error
detected. How stupid of me. I have to check all of that, PLUS check the
sense_data buffer. And now, three lines of condition for the 'if' later, I'm
now accurately reporting an error when I send a REPORT_ELEMENT_STATUS command
to a hard drive (!). 

Hopefully this message is getting archived so that next time someone goes into
'google' and does the query 'scsi generic linux sense', he'll get a response
that makes sense :-).

(Oh, I discovered this bit of trivia by digging around in the sg_utils package
and noticing it in one of the test programs... it doesn't appear to be
documented anywhere, though I may have overlooked said documentation, sigh). 

-- 
Eric Lee Green                         [EMAIL PROTECTED]
Software Engineer                      Visit our Web page:
Enhanced Software Technologies, Inc.   http://www.estinc.com/
(602) 470-1115 voice                   (602) 470-1116 fax

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to