public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Pat LaVarre <p.lavarre@ieee.org>
To: linux-scsi@vger.kernel.org
Subject: Re: sg utils sg_io -i 0x24 -y "12 00:00:00 24 00"
Date: 02 Dec 2003 17:17:56 -0700	[thread overview]
Message-ID: <1070410676.2347.8.camel@patibmrh9> (raw)

> > - O_RDWR
> > + O_RDONLY|O_NONBLOCK
> ...
> I dreamed up this patch only by guessing from
> hints found on the web, not from reading a
> document anywhere.

Possibly we recommend open O_NONBLOCK for SG_IO.

Evidence in favour of that conjecture includes the following, not close
to block/scsi_ioctl.c in the kernel source, but yes close in author
space:

---

From: linux-2.6.0-test11/Documentation/cdrom/cdrom-standard.tex
...
1997/12/28 ...
...
We therefore propose to use the flag $O_NONBLOCK$ to indicate
that the device is opened just for issuing $ioctl$
commands. Strictly, the meaning of $O_NONBLOCK$ is that opening and
subsequent calls to the device don't cause the calling process to
wait. We could interpret this as ``don't wait until someone has
inserted some valid data-\cdrom.'' Thus, our proposal of the
implementation for the $open()$ call for \cdrom s is:
...
\begin{itemize}
...
\item If no other flags are set than $O_RDONLY$, the device is opened
for data transfer, and the return value will be 0 only upon successful
initialization of the transfer. The call may even induce some actions
on the \cdrom, such as closing the tray.
...
\item If the option flag $O_NONBLOCK$ is set, opening will always be
successful, unless the whole device doesn't exist. The drive will take
no actions whatsoever.
...
\end{itemize}

---

Pat LaVarre



             reply	other threads:[~2003-12-03  0:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-03  0:17 Pat LaVarre [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-11-27 17:15 sg utils sg_io -i 0x24 -y "12 00:00:00 24 00" Pat LaVarre
2003-11-07  0:38 Pat LaVarre
2003-11-07 16:24 ` Pat LaVarre
2003-11-07 16:56   ` Pat LaVarre
2003-11-07 17:09     ` Pat LaVarre
2003-11-07 17:17       ` Pat LaVarre
2003-11-07 17:51 ` Patrick Mansfield
2003-11-07 18:11   ` Pat LaVarre
2003-11-07 18:27     ` Pat LaVarre
2003-11-07 18:31       ` Pat LaVarre
2003-11-11 23:52         ` Pat LaVarre
2003-11-14  3:09           ` Douglas Gilbert
2003-11-26 16:15           ` Pat LaVarre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1070410676.2347.8.camel@patibmrh9 \
    --to=p.lavarre@ieee.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox