194 lines
3.5 KiB
HTML
194 lines
3.5 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>SG_GET_REQUEST_TABLE</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_GET_PACK_ID"
|
|
HREF="g_packid.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="SG_SET_RESERVED_SIZE (and _GET_ )"
|
|
HREF="gs_rs_size.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="g_packid.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="gs_rs_size.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="SECT1"
|
|
><H1
|
|
CLASS="SECT1"
|
|
><A
|
|
NAME="G_RQ_TAB">8.13. SG_GET_REQUEST_TABLE</H1
|
|
><DIV
|
|
CLASS="FORMALPARA"
|
|
><P
|
|
><B
|
|
>SG_GET_REQUEST_TABLE 0x2286. </B
|
|
>This ioctl outputs an array of information about the status of
|
|
requests associated with the current file descriptor. Its 3rd
|
|
argument should point to memory large enough to receive SG_MAX_QUEUE
|
|
objects of the sg_req_info_t structure. This structure has the
|
|
following members:
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="PROGRAMLISTING"
|
|
> req_state
|
|
0 -> request not in use
|
|
1 -> request has been sent, but is not finished (i.e. it is
|
|
between stages 1 and 2 in the "theory of operation")
|
|
2 -> request is ready to be read() (i.e. it is between stages
|
|
2 and 3 in the "theory of operation")
|
|
orphan
|
|
0 -> normal request
|
|
1 -> request sent by SG_IO ioctl() which has been interrupted
|
|
by a signal
|
|
sg_io_owned
|
|
0 -> request sent by a write()
|
|
1 -> request sent by a SG_IO ioctl()
|
|
problem
|
|
0 -> no problem (or 1 == req_state)
|
|
1 -> req_state is 2 and either masked_status, host_status or
|
|
driver_status is non-zero
|
|
duration
|
|
[if 1 == req_state] time since request was sent (in millisecs)
|
|
[if 2 == req_state] duration of request (in millisecs). Clock
|
|
is stopped when stage 2 in "theory of operation" is
|
|
reached
|
|
pack_id
|
|
usr_ptr
|
|
these are user provided values in the sg_io_hdr_t (or
|
|
struct sg_header) that sent the request</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></DIV
|
|
></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="g_packid.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="gs_rs_size.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>SG_GET_PACK_ID</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_SET_RESERVED_SIZE (and _GET_ )</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |