#
# Test file for SCSI command capabilities:
#

# NOTE: Though the parser accepts the list of device types to restrict
#       access to the command doesn't limit it.

# Commands for any device.

# Test unit ready
tur -t 100000 "0 0 0 0 0 0"

# Inquiry
inquiry "12 0 0 0 60 0" -i 0x60 "s8 z8 z16 z4"

# Verbose inquiry.
vinq "12 0 0 0 60 0" -i 0x60 " *i1 *i1 \
	{ISO version} t2 {ECMA version} t3 {ANSI-approved Version} t3 \
	s7 \
	{ RelAdr } t1 \
	{ WBus32 } t1 \
	{ WBus16 } t1 \
	{ Sync } t1 \
	{ Linked } t1 \
	{ Reserved } t1 \
	{ CmdQue } t1 \
	{ SftRe } t1 \
	z8 z16 z4"

# Change definitions.
changedef "40 0 0 v 0 0 0 0 0 0"

# Commands for sequential devices.

# A few tape things I was playing with.  Since the Exabyte 8200
# really didn't like any of these these "sequential" entries
# may be wrong so look
# at them closely if you try to use them.

# Number of blocks on the tape
nblocks sequential "25 0 0 0 0 0 0 0 0 0"  -i 8 "i4"

# Read position on a tape.
readposition sequential "34 0 0 0 0 0 0 0 0 0" -i 20 "*i1 \
	{partition} i1 \
	*i1 *i1 \
	{First block} i4 \
	{Last block} i4 \
	*i1 \
	{Number of blocks} i3 \
	{Number of bytes} i3"

# Read max and min block length.
readbl sequential \
	"5 0 0 0 0 0" -i 5 "*i1 {Max Block Length} i3 {Min block length} i2"

# Commands for direct access devices

# format, reassign: Format the device or reassign blocks.  Too
# dangerous for me to even want in my cap file during testing.

#format direct -t 2h "4 0 0 0 0 0"

reassign direct "7 0 0 0 0 0" -o 4 "0 0 4:i2 v:i4"

# Track.  Return block number when seek is required:
track direct "25 0 {block number} v:i4 0 0 0:7 1:1 0" -i 8 "i4"

# Size of the defect list.
# ndefects plist glist
ndefects direct \
	"37 0 0:3 {plist} v:1 {vlist} v:1 5:3 0 0 0 0 4:i2 0" \
	-i 4 "*i2 {Defect list length} i2"

# Defect list.
# defects size plist glist size
defects direct \
	"37 0 0:3 {plist} v:1 {vlist} v:1 5:3 0 0 0 0 {xfer} v:i2 0" \
	-i v "s4 ( {Cylinder} i3  {Head} i1  {Sector} i4)"
