Commit Graph

40 Commits

Author SHA1 Message Date
mlelstv 100b2229a1 Add REPORT_LUNS command. 2022-08-21 12:44:16 +00:00
flxd b0be1b67cd Add "getrealloc" and "setrealloc" commands to get/set automatic reallocation
parameters/enables for error recovery, similar to {get,set}cache.
Many old SCSI disks shipped with reallocation disabled, albeit supporting it.
Minor (cosmetic) fixup of scsi_disk_pages while there.
Based upon code in PR bin/29165 by Greg A. Woods.
OK christos@
2016-11-19 08:43:40 +00:00
snj f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
jakllsch 7528c09b60 We supply data with the FORMAT UNIT command, so tell the kernel which
direction it is to go (write).
2013-01-12 02:52:59 +00:00
jakllsch 8c34b2a378 take sizeof actual symbol we are memsetting 2013-01-12 02:50:09 +00:00
jakllsch 9211d76436 make a bunch of globals static 2012-11-03 19:26:52 +00:00
jakllsch 7f13651aab drop write-only variable 2012-11-03 19:14:53 +00:00
joerg baa8e84b6f Use __dead 2011-08-29 14:34:58 +00:00
joerg 39a0f733b0 Decide on printing an int as int and not as short. 2011-05-24 12:04:18 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
christos 18d6bea575 PR/37932: Yakovetsky Vladimir: build distribution with USE_FORT fails
fix buffer overflow
2008-02-02 17:07:04 +00:00
bouyer e47fe82adf Kimura Fuyuki, bin/35216: add a setspeed command, to set the highest speed
that the optical drive should use for reading data.
2007-01-22 20:56:46 +00:00
lukem 925bd672b3 Ensure that "setcache <mode>" doesn't use random data for "byte2"
("setcache <mode> save" DTRT).
Found by gcc -Wuninitialized.

Appease other -Wuninitialized warnings.
2005-06-02 00:13:10 +00:00
thorpej df9803ce96 Part 1 of a cleanup pass over the SCSI subsystem. The aim is to name
everything "scsi_*", since we really are talking about the SCSI command
set, ATAPI transport not withstanding.  Improve the names of many structures,
and prepend "SCSI_" onto all SCSI command opcodes.  Place items described
by the SCSI Primary Commands document into scsi_spc.h.
2005-02-21 00:29:06 +00:00
xtraeme 9bab889d46 Kill __P(), use ANSI function declarations; WARNS=3. 2005-02-05 13:37:39 +00:00
ginsbach 661eb28d4c Add command to read the defect data from a direct access device. 2005-01-07 02:08:34 +00:00
fair 76b92d1ae9 Increase the SCSI command timeout for device start & stop from 10
to 30 seconds, per PR 25734. I've seen this problem myself. I think
that scsictl should:

1. accept a timeout flag/parameter to set the timeout to an arbitrary
value other than the default.

2. support a verbose mode that would report the timeout value before
the command is started, and then report how long the command actually
took to complete, though I suppose the latter could also be done
by using time(1).
2004-06-01 02:40:00 +00:00
jmmv b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
mycroft 46743e2182 Add prevent/allow commands. 2003-09-01 04:34:16 +00:00
mycroft 4950c2c904 Add a flushcache command -- I need it for my DVD+RW. 2003-09-01 04:24:55 +00:00
agc c2a3b5ec84 Add NetBSD RCS Ids. 2003-06-23 11:53:35 +00:00
petrov 1b08fb1305 Added debug command to support SCIOCDEBUG. 2002-09-26 06:15:38 +00:00
thorpej 0683880e19 * Add "getcache" and "setcache" commands to get/set basic cache
parameters (enables, really).
* Fix an error in the manpage.
* Shuffle some code to group things together better.
2002-09-03 16:56:05 +00:00
grant 6742cb1812 sweep of errx/warnx, remove unnecessary trailing \n 2002-07-20 08:36:17 +00:00
mjacob 41194c0e70 Add a bunch of stuff from Bob Nestor that fixes format to allow one to
specify device logical blocksize.

Furthermore, it also adds an 'immediate' option, which then sends more modern
devices into formatting in the background. scsictl still waits around and
sends a TEST UNIT READY every 10 seconds and, based upon the sense data
it gets back after the invariable CHECK CONDITION, prints out a progress
indicator (based upon SKSV progress in the sense data).

While we're at it, add a 'tur', 'reserve', 'release', 'start' and 'stop'
functions to the device commands.

Fix a long standing bug in scsi_command- the value in retsts is an integral
value- not a bitmask.
2002-06-26 16:04:11 +00:00
tsutsui 93fc30d106 21600000 -> 6*60*60*1000 (timeout in six hours for format command) 2002-04-14 03:24:42 +00:00
bouyer 03fd5e671e Add and document a 'detach' command. 2001-07-18 20:36:36 +00:00
bouyer 1047a6a764 Adapt for MODE SENSE/SELECT changes in kernel. 2001-05-15 15:11:02 +00:00
ad 93e3741265 Remove superfluous newlines in calls to errx(). 2001-04-01 14:59:56 +00:00
cgd 8a986b2e96 convert to use getprogname() 2001-02-19 22:48:57 +00:00
mycroft 3d346bb5e5 Increase the format timeout to 6 hours. 1999-10-27 22:29:06 +00:00
mycroft f6624fbbee Make `reassign' actually work. 1999-10-04 17:10:56 +00:00
ad 2829eb17d7 Make `all' a synonym for the `any' keyword. 1999-09-28 23:32:04 +00:00
mjl 89fa8aef99 Clarify usage message. 1999-08-13 21:12:18 +00:00
hubertf 958ed46f74 Collect all little usage-messages spread around into one place,
and as a side effect, print the available commands (and their
usage) if no command is given on the command line.

Approved by Jason Thorpe.
1999-07-30 02:29:04 +00:00
jwise d3c740d725 Code to check if a cooked device was specified was failing even if the
cooked device was opened successfully.  Also fix a typo.

Fixes second part of PR bin/6883 for Soren S. Jorvang <soren@t.dk>
1999-02-24 18:51:39 +00:00
thorpej c1425134ae Simple support for formatting a SCSI disk. This will be enhanced in
the near future.
1998-11-12 01:16:08 +00:00
thorpej c0b197f941 Fix a thinko in the device opening code. 1998-10-17 05:08:27 +00:00
thorpej 3c5483a351 Fix a couple of usage strings. 1998-10-15 21:49:09 +00:00
thorpej c9a47c223b scsictl(8) - a program to manipulate SCSI devices and busses. Currently
supports:

Devices: identify, reassign blocks, reset

Busses: reset, scan for devices

Coming soon, device formatting, mode page editing, device freeze/thaw, etc.
1998-10-15 21:44:39 +00:00