<HTML ><HEAD ><TITLE >SG_SET_DEBUG</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ "><LINK REL="HOME" TITLE="The Linux SCSI Generic (sg) HOWTO" HREF="index.html"><LINK REL="UP" TITLE="Ioctl()s" HREF="ioctl.html"><LINK REL="PREVIOUS" TITLE="SG_SET_COMMAND_Q (and _GET_)" HREF="gs_commandq.html"><LINK REL="NEXT" TITLE="SG_EMULATED_HOST" HREF="e_host.html"></HEAD ><BODY CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >The Linux SCSI Generic (sg) HOWTO</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="gs_commandq.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Chapter 8. Ioctl()s</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="e_host.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="S_DEBUG">8.4. SG_SET_DEBUG</H1 ><DIV CLASS="FORMALPARA" ><P ><B >SG_SET_DEBUG 0x227e. </B >The third argument is assumed to point to an int. The default value is 0. If this call is made pointing to an int greater than 0 then any SCSI request that is issued that results in the SCSI status of CHECK_CONDITION (or COMMAND_TERMINATED) will cause a message to be sent to the log (and perhaps the console). The message is information derived from the sense buffer (i.e. the SCSI error message) and it is prefixed with "sg_cmd_done_bh".</P ></DIV ><P >The other actions of debug mode performed in version 2 of the sg driver have been removed as they are no longer needed. The internal state of the sg driver can now be found by viewing the output of <B CLASS="COMMAND" >cat /proc/scsi/sg/debug</B >.</P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="gs_commandq.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="e_host.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >SG_SET_COMMAND_Q (and _GET_)</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ioctl.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >SG_EMULATED_HOST</TD ></TR ></TABLE ></DIV ></BODY ></HTML >