From: Pat LaVarre <p.lavarre@ieee.org>
To: patmans@us.ibm.com
Cc: dougg@torque.net, linux-scsi@vger.kernel.org
Subject: Re: sg utils sg_io -i 0x24 -y "12 00:00:00 24 00"
Date: 07 Nov 2003 11:11:35 -0700 [thread overview]
Message-ID: <1068228695.3417.34.camel@patrh9> (raw)
In-Reply-To: <20031107095145.A3785@beaverton.ibm.com>
Patrick M:
>
Hi! Immediate attention! Wow. Thank you.
> Do you have a tar ball or such of all the code?
> Or is this still very much a work in progress?
Yes release early release often.
> I don't see all the functions in the patch, for example, gcs_in.
That patch just gives you enough to compile & link & run the verbose,
spinq.c, and to compile without linking the alternative, concise,
inq.c. I don't mean to be coy, I'm just trying not to overwhelm the
list, I've thought about this problem in isolation for nearly a decade
without before now finding anyone else on Earth who cared.
> I was going to say put the functions in a library, but maybe you already
> are headed that way. Then create a libsgio or such, and users like
> sg_utils, scsi_id, cdrecord, scsidev, etc. could link with sgio.
Aye. Yes I did try this already. Most recent demo might be the
lscsi.so of the gccscsi tar ball on the web. There I called the .so
library from gforth, which more directly offers dynamic link than static
link, again I built both Linux & Win XP/2K.
> And lose the macros I, Y, etc, just use the function name, or at least
> have more meaningful macro names.
I'm trying to distinguish two kinds of test code.
In spinq.c we see the meaningful subroutine names we like already - yes?
I'm not sure you agree we want to write any other kind of code?
In inq.c we see cryptic macro names. Those cryptic names correspond
directly to the -a thru -z options of a "nice" tool like plscsi or
camcontrol or my now proposed sg_io.
For example, if our command line is -i x24 -y "12 00:00:00 24 00" then
our C code is { I(0x24); Y("12 00:00:00 24 00"); }. When you learn the
one cryptic syntax, you learn the other cryptic syntax, modulo some
transliteration.
I'm thinking if we like a cryptic command line, then so too we like
cryptic C code. We write inq.c, not just spinq.c, depending on our
audience.
I'm in two minds over the name sg_io. I'm guessing that's the name that
the sg utils audience will want, but I'm confident that name won't mean
anything on the other operating systems and having to find how to type _
will annoy people.
I figure for those other folk we will offer a gcs command line, and let
people ignore the fact that a gcs command line and an sg_io command line
accomplish the same thing with the same syntax.
Or maybe we'd rather say gcs always. But if the cost of getting gcs
into sg utils is to say sg_io for Linux only, then I figure we pay that
cost.
> The command line plscsi could support both long and short names (-i or
> --gcs-in).
Ouch, sorry, yes I left that part of the patch out, I find I have to
sneaker net it here, please stay tuned.
Pat LaVarre
next prev parent reply other threads:[~2003-11-07 18:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-07 0:38 sg utils sg_io -i 0x24 -y "12 00:00:00 24 00" 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 [this message]
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
-- strict thread matches above, loose matches on Subject: below --
2003-11-27 17:15 Pat LaVarre
2003-12-03 0:17 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=1068228695.3417.34.camel@patrh9 \
--to=p.lavarre@ieee.org \
--cc=dougg@torque.net \
--cc=linux-scsi@vger.kernel.org \
--cc=patmans@us.ibm.com \
/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