1.\" 2.\" Copyright (c) 1998, 1999, 2000 Kenneth D. Merry. 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 3. The name of the author may not be used to endorse or promote products 14.\" derived from this software without specific prior written permission. 15.\" 16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26.\" SUCH DAMAGE. 27.\" 28.\" $FreeBSD$ 29.\" 30.Dd September 14, 1998 31.Dt CAMCONTROL 8 32.Os 33.Sh NAME 34.Nm camcontrol 35.Nd CAM control program 36.Sh SYNOPSIS 37.Nm 38.Aq Ar command 39.Op device id 40.Op generic args 41.Op command args 42.Nm 43.Ic devlist 44.Op Fl v 45.Nm 46.Ic periphlist 47.Op device id 48.Op Fl n Ar dev_name 49.Op Fl u Ar unit_number 50.Nm 51.Ic tur 52.Op device id 53.Op generic args 54.Nm 55.Ic inquiry 56.Op device id 57.Op generic args 58.Op Fl D 59.Op Fl S 60.Op Fl R 61.Nm 62.Ic start 63.Op device id 64.Op generic args 65.Nm 66.Ic stop 67.Op device id 68.Op generic args 69.Nm 70.Ic eject 71.Op device id 72.Op generic args 73.Nm 74.Ic rescan 75.Aq bus Ns Op :target:lun 76.Nm 77.Ic reset 78.Aq bus Ns Op :target:lun 79.Nm 80.Ic defects 81.Op device id 82.Op generic args 83.Aq Fl f Ar format 84.Op Fl P 85.Op Fl G 86.Nm 87.Ic modepage 88.Op device id 89.Op generic args 90.Aq Fl m Ar page \*(Ba Fl l 91.Op Fl P Ar pgctl 92.Op Fl b | Fl e 93.Op Fl d 94.Nm 95.Ic cmd 96.Op device id 97.Op generic args 98.Aq Fl c Ar cmd Op args 99.Op Fl i Ar len Ar fmt 100.Bk -words 101.Op Fl o Ar len Ar fmt Op args 102.Ek 103.Nm 104.Ic debug 105.Op Fl I 106.Op Fl T 107.Op Fl S 108.Op Fl c 109.Aq all|off|bus Ns Op :target Ns Op :lun 110.Nm 111.Ic tags 112.Op device id 113.Op generic args 114.Op Fl N Ar tags 115.Op Fl q 116.Op Fl v 117.Nm 118.Ic negotiate 119.Op device id 120.Op generic args 121.Op Fl c 122.Op Fl D Ar enable|disable 123.Op Fl O Ar offset 124.Op Fl q 125.Op Fl R Ar syncrate 126.Op Fl T Ar enable|disable 127.Op Fl U 128.Op Fl W Ar bus_width 129.Op Fl v 130.Nm 131.Ic format 132.Op device id 133.Op generic args 134.Op Fl q 135.Op Fl w 136.Op Fl y 137.Nm 138.Ic help 139.Sh DESCRIPTION 140.Nm 141is a utility designed to provide a way for users to access and control the 142.Fx 143CAM subsystem. 144.Pp 145.Nm 146can cause a loss of data and/or system crashes if used improperly. Even 147expert users are encouraged to exercise caution when using this command. 148Novice users should stay away from this utility. 149.Pp 150.Nm 151has a number of primary functions, many of which support an optional 152device identifier. A device identifier can take one of three forms: 153.Bl -tag -width 14n 154.It deviceUNIT 155Specify a device name and unit number combination, like "da5" or "cd3". 156Note that character device node names (e.g. /dev/rsd0.ctl) are 157.Em not 158allowed here. 159.It bus:target 160Specify a bus number and target id. The bus number can be determined from 161the output of 162.Dq camcontrol devlist . 163The lun defaults to 0. 164.It bus:target:lun 165Specify the bus, target and lun for a device. (e.g. 1:2:0) 166.El 167.Pp 168The device identifier, if it is specified, 169.Em must 170come immediately after the function name, and before any generic or 171function-specific arguments. Note that the 172.Fl n 173and 174.Fl u 175arguments described below will override any device name or unit number 176specified beforehand. The 177.Fl n 178and 179.Fl u 180arguments will 181.Em not 182override a specified bus:target or bus:target:lun, however. 183.Pp 184Most of the 185.Nm 186primary functions support these generic arguments: 187.Bl -tag -width 14n 188.It Fl C Ar count 189SCSI command retry count. In order for this to work, error recovery 190.Pq Fl E 191must be turned on. 192.It Fl E 193Instruct the kernel to perform generic SCSI error recovery for the given 194command. This is needed in order for the retry count 195.Pq Fl C 196to be honored. Other than retrying commands, the generic error recovery in 197the code will generally attempt to spin up drives that are not spinning. 198It may take some other actions, depending upon the sense code returned from 199the command. 200.It Fl n Ar dev_name 201Specify the device type to operate on, e.g. "da", "cd". 202.It Fl t Ar timeout 203SCSI command timeout in seconds. This overrides the default timeout for 204any given command. 205.It Fl u Ar unit_number 206Specify the device unit number, e.g. "1", "5". 207.It Fl v 208Be verbose, print out sense information for failed SCSI commands. 209.El 210.Pp 211Primary command functions: 212.Bl -tag -width periphlist 213.It Ic devlist 214List all physical devices (logical units) attached to the CAM subsystem. 215This also includes a list of peripheral drivers attached to each device. 216With the 217.Fl v 218argument, SCSI bus number, adapter name and unit numbers are printed as 219well. 220.It Ic periphlist 221List all peripheral drivers attached to a given physical device (logical 222unit). 223.It Ic tur 224Send the SCSI test unit ready (0x00) command to the given device. 225.Nm 226will report whether the device is ready or not. 227.It Ic inquiry 228Send a SCSI inquiry command (0x12) to a device. By default, 229.Nm 230will print out the standard inquiry data, device serial number, and 231transfer rate information. The user can specify that only certain types of 232inquiry data be printed: 233.Bl -tag -width 4n 234.It Fl D 235Get the standard inquiry data. 236.It Fl S 237Print out the serial number. If this flag is the only one specified, 238.Nm 239will not print out "Serial Number" before the value returned by the drive. 240This is to aid in script writing. 241.It Fl R 242Print out transfer rate information. 243.El 244.It Ic start 245Send the SCSI Start/Stop Unit (0x1B) command to the given device with the 246start bit set. 247.It Ic stop 248Send the SCSI Start/Stop Unit (0x1B) command to the given device with the 249start bit cleared. 250.It Ic eject 251Send the SCSI Start/Stop Unit (0x1B) command to the given device with the 252start bit cleared and the eject bit set. 253.It Ic rescan 254Tell the kernel to scan the given bus (XPT_SCAN_BUS), or bus:target:lun 255(XPT_SCAN_LUN) for new devices or devices that have gone away. The user 256may only specify a bus to scan, or a lun. Scanning all luns on a target 257isn't supported. 258.It Ic reset 259Tell the kernel to reset the given bus (XPT_RESET_BUS) by issuing a SCSI bus 260reset for that bus, or to reset the given bus:target:lun 261(XPT_RESET_DEV), typically by issuing a BUS DEVICE RESET message after 262connecting to that device. 263Note that this can have a destructive impact 264on the system. 265.It Ic defects 266Send the SCSI READ DEFECT DATA (10) command (0x37) to the given device, and 267print out any combination of: the total number of defects, the primary 268defect list (PLIST), and the grown defect list (GLIST). 269.Bl -tag -width 11n 270.It Fl f Ar format 271The three format options are: 272.Em block , 273to print out the list as logical blocks, 274.Em bfi , 275to print out the list in bytes from index format, and 276.Em phys , 277to print out the list in physical sector format. The format argument is 278required. Most drives support the physical sector format. Some drives 279support the logical block format. Many drives, if they don't support the 280requested format, return the data in an alternate format, along with sense 281information indicating that the requested data format isn't supported. 282.Nm 283attempts to detect this, and print out whatever format the drive returns. 284If the drive uses a non-standard sense code to report that it doesn't 285support the requested format, 286.Nm 287will probably see the error as a failure to complete the request. 288.It Fl G 289Print out the grown defect list. This is a list of bad blocks that have 290been remapped since the disk left the factory. 291.It Fl P 292Print out the primary defect list. 293.El 294.Pp 295If neither 296.Fl P 297nor 298.Fl G 299is specified, 300.Nm 301will print out the number of defects given in the READ DEFECT DATA header 302returned from the drive. 303.It Ic modepage 304Allows the user to display and optionally edit a SCSI mode page. The mode 305page formats are located in 306.Pa /usr/share/misc/scsi_modes . 307This can be overridden by specifying a different file in the 308.Ev SCSI_MODES 309environment variable. 310The 311.Ic modepage 312command takes several arguments: 313.Bl -tag -width 12n 314.It Fl d 315Disable block descriptors for mode sense. 316.It Fl b 317Displays mode page data in binary format. 318.It Fl e 319This flag allows the user to edit values in the mode page. The user may 320either edit mode page values with the text editor pointed to by his 321.Ev EDITOR 322environment variable, or supply mode page values via standard input, using 323the same format that 324.Nm 325uses to display mode page values. The editor will be invoked if 326.Nm 327detects that standard input is terminal. 328.It Fl l 329Lists all available mode pages. 330.It Fl m Ar mode_page 331This specifies the number of the mode page the user would like to view 332and/or edit. This argument is mandatory unless 333.Fl l 334is specified. 335.It Fl P Ar pgctl 336This allows the user to specify the page control field. Possible values are: 337.Bl -tag -width xxx -compact 338.It 0 339Current values 340.It 1 341Changeable values 342.It 2 343Default values 344.It 3 345Saved values 346.El 347.El 348.It Ic cmd 349Allows the user to send an arbitrary SCSI CDB to any device. 350The 351.Ic cmd 352function requires the 353.Fl c 354argument to specify the CDB. Other arguments are optional, depending on 355the command type. The command and data specification syntax is documented 356in 357.Xr cam_cdbparse 3 . 358NOTE: If the CDB specified causes data to be transfered to or from the 359SCSI device in question, you MUST specify either 360.Fl i 361or 362.Fl o . 363.Bl -tag -width 17n 364.It Fl c Ar cmd Op args 365This specifies the SCSI CDB. CDBs may be 6, 10, 12 or 16 bytes. 366.It Fl i Ar len Ar fmt 367This specifies the amount of data to read, and how it should be displayed. 368If the format is 369.Sq - , 370.Ar len 371bytes of data will be read from the device and written to standard output. 372.It Fl o Ar len Ar fmt Op args 373This specifies the amount of data to be written to a device, and the data 374that is to be written. If the format is 375.Sq - , 376.Ar len 377bytes of data will be read from standard input and written to the device. 378.El 379.It Ic debug 380Turn on CAM debugging printfs in the kernel. This requires options CAMDEBUG 381in your kernel config file. WARNING: enabling debugging printfs currently 382causes an EXTREME number of kernel printfs. You may have difficulty 383turning off the debugging printfs once they start, since the kernel will be 384busy printing messages and unable to service other requests quickly. 385The 386.Ic debug 387function takes a number of arguments: 388.Bl -tag -width 18n 389.It Fl I 390Enable CAM_DEBUG_INFO printfs. 391.It Fl T 392Enable CAM_DEBUG_TRACE printfs. 393.It Fl S 394Enable CAM_DEBUG_SUBTRACE printfs. 395.It Fl c 396Enable CAM_DEBUG_CDB printfs. This will cause the kernel to print out the 397SCSI CDBs sent to the specified device(s). 398.It all 399Enable debugging for all devices. 400.It off 401Turn off debugging for all devices 402.It bus Ns Op :target Ns Op :lun 403Turn on debugging for the given bus, target or lun. If the lun or target 404and lun are not specified, they are wildcarded. (i.e., just specifying a 405bus turns on debugging printfs for all devices on that bus.) 406.El 407.It Ic tags 408Show or set the number of "tagged openings" or simultaneous transactions 409we attempt to queue to a particular device. By default, the 410.Ic tags 411command, with no command-specific arguments (i.e. only generic arguments) 412prints out the "soft" maximum number of transactions that can be queued to 413the device in question. For more detailed information, use the 414.Fl v 415argument described below. 416.Bl -tag -width 7n 417.It Fl N Ar tags 418Set the number of tags for the given device. This must be between the 419minimum and maximum number set in the kernel quirk table. The default for 420most devices that support tagged queueing is a minimum of 2 and a maximum 421of 255. The minimum and maximum values for a given device may be 422determined by using the 423.Fl v 424switch. The meaning of the 425.Fl v 426switch for this 427.Nm 428subcommand is described below. 429.It Fl q 430Be quiet, and don't report the number of tags. This is generally used when 431setting the number of tags. 432.It Fl v 433The verbose flag has special functionality for the 434.Em tags 435argument. It causes 436.Nm 437to print out the tagged queueing related fields of the XPT_GDEV_TYPE CCB: 438.Bl -tag -width 13n 439.It dev_openings 440This is the amount of capacity for transactions queued to a given device. 441.It dev_active 442This is the number of transactions currently queued to a device. 443.It devq_openings 444This is the kernel queue space for transactions. This count usually mirrors 445dev_openings except during error recovery operations when 446the device queue is frozen (device is not allowed to receive 447commands), the number of dev_openings is reduced, or transaction 448replay is occurring. 449.It devq_queued 450This is the number of transactions waiting in the kernel queue for capacity 451on the device. This number is usually zero unless error recovery is in 452progress. 453.It held 454The held count is the number of CCBs held by peripheral drivers that have 455either just been completed or are about to be released to the transport 456layer for service by a device. Held CCBs reserve capacity on a given 457device. 458.It mintags 459This is the current "hard" minimum number of transactions that can be 460queued to a device at once. The 461.Ar dev_openings 462value above cannot go below this number. The default value for 463.Ar mintags 464is 2, although it may be set higher or lower for various devices. 465.It maxtags 466This is the "hard" maximum number of transactions that can be queued to a 467device at one time. The 468.Ar dev_openings 469value cannot go above this number. The default value for 470.Ar maxtags 471is 255, although it may be set higher or lower for various devices. 472.El 473.El 474.It Ic negotiate 475Show or negotiate various communication parameters. Some controllers may 476not support setting or changing some of these values. For instance, the 477Adaptec 174x controllers do not support changing a device's sync rate or 478offset. 479.Nm 480will not attempt to set the parameter if the controller indicates that it 481does not support setting the parameter. To find out what the controller 482supports, use the 483.Fl v 484flag. The meaning of the 485.Fl v 486flag for the 487.Ic negotiate 488command is described below. Also, some controller drivers don't support 489setting negotiation parameters, even if the underlying controller supports 490negotiation changes. Some controllers, such as the Advansys wide 491controllers, support enabling and disabling synchronous negotiation for 492a device, but do not support setting the synchronous negotiation rate. 493.Bl -tag -width 17n 494.It Fl a 495Attempt to make the negotiation settings take effect immediately by sending 496a Test Unit Ready command to the device. 497.It Fl c 498Show or set current negotiation settings. This is the default. 499.It Fl D Ar enable|disable 500Enable or disable disconnection. 501.It Fl O Ar offset 502Set the command delay offset. 503.It Fl q 504Be quiet, don't print anything. This is generally useful when you want to 505set a parameter, but don't want any status information. 506.It Fl R Ar syncrate 507Change the synchronization rate for a device. The sync rate is a floating 508point value specified in MHz. So, for instance, 509.Sq 20.000 510is a legal value, as is 511.Sq 20 . 512.It Fl T Ar enable|disable 513Enable or disable tagged queueing for a device. 514.It Fl U 515Show or set user negotiation settings. The default is to show or set 516current negotiation settings. 517.It Fl v 518The verbose switch has special meaning for the 519.Ic negotiate 520subcommand. It causes 521.Nm 522to print out the contents of a Path Inquiry (XPT_PATH_INQ) CCB sent to the 523controller driver. 524.It Fl W Ar bus_width 525Specify the bus width to negotiate with a device. The bus width is 526specified in bits. The only useful values to specify are 8, 16, and 32 527bits. The controller must support the bus width in question in order for 528the setting to take effect. 529.El 530.Pp 531In general, sync rate and offset settings will not take effect for a 532device until a command has been sent to the device. The 533.Fl a 534switch above will automatically send a Test Unit Ready to the device so 535negotiation parameters will take effect. 536.It Ic format 537Issue the 538.Tn SCSI 539FORMAT UNIT command to the named device. 540.Pp 541.Em WARNING! WARNING! WARNING! 542.Pp 543Low level formatting a disk will destroy ALL data on the disk. Use 544extreme caution when issuing this command. Many users low-level format 545disks that do not really need to be low-level formatted. There are 546relatively few scenarios that call for low-level formatting a disk. 547One reason for 548low-level formatting a disk is to initialize the disk after changing 549its physical sector size. Another reason for low-level formatting a disk 550is to revive the disk if you are getting "medium format corrupted" errors 551from the disk in response to read and write requests. 552.Pp 553Some disks take longer than others to format. Users should specify a 554timeout long enough to allow the format to complete. The default format 555timeout is 3 hours, which should be long enough for most disks. Some hard 556disks will complete a format operation in a very short period of time 557(on the order of 5 minutes or less). This is often because the drive 558doesn't really support the FORMAT UNIT command -- it just accepts the 559command, waits a few minutes and then returns it. 560.Pp 561The 562.Sq format 563subcommand takes several arguments that modify its default behavior. The 564.Fl q 565and 566.Fl y 567arguments can be useful for scripts. 568.Pp 569.Bl -tag -width 6n 570.It Fl q 571Be quiet, don't print any status messages. This option will not disable 572the questions, however. To disable questions, use the 573.Fl y 574argument, below. 575.It Fl w 576Issue a non-immediate format command. By default, 577.Nm 578issues the FORMAT UNIT command with the immediate bit set. This tells the 579device to immediately return the format command, before the format has 580actually completed. Then, 581.Nm 582gathers 583.Tn SCSI 584sense information from the device every second to determine how far along 585in the format process it is. If the 586.Fl w 587argument is specified, 588.Nm 589will issue a non-immediate format command, and will be unable to print any 590information to let the user know what percentage of the disk has been 591formatted. 592.It Fl y 593Don't ask any questions. By default, 594.Nm 595will ask the user if he/she really wants to format the disk in question, 596and also if the default format command timeout is acceptable. The user 597will not be asked about the timeout if a timeout is specified on the 598command line. 599.El 600.It Ic help 601Print out verbose usage information. 602.El 603.Sh ENVIRONMENT 604The 605.Ev SCSI_MODES 606variable allows the user to specify an alternate mode page format file. 607.Pp 608The 609.Ev EDITOR 610variable determines which text editor 611.Nm 612starts when editing mode pages. 613.Sh FILES 614.Bl -tag -width /usr/share/misc/scsi_modes -compact 615.It Pa /usr/share/misc/scsi_modes 616is the SCSI mode format database. 617.It Pa /dev/xpt0 618is the transport layer device. 619.It Pa /dev/pass* 620are the CAM application passthrough devices. 621.El 622.Sh EXAMPLES 623.Dl camcontrol eject -n cd -u 1 -v 624.Pp 625Eject the CD from cd1, and print SCSI sense information if the command 626fails. 627.Pp 628.Dl camcontrol tur da0 629.Pp 630Send the SCSI test unit ready command to da0. 631.Nm 632will report whether the disk is ready, but will not display sense 633information if the command fails since the 634.Fl v 635switch was not specified. 636.Pp 637.Bd -literal -offset indent 638camcontrol tur da1 -E -C 4 -t 50 -v 639.Ed 640.Pp 641Send a test unit ready command to da1. Enable kernel error recovery. 642Specify a retry count of 4, and a timeout of 50 seconds. Enable sense 643printing (with the 644.Fl v 645flag) if the command fails. Since error recovery is turned on, the 646disk will be spun up if it is not currently spinning. 647.Nm 648will report whether the disk is ready. 649.Bd -literal -offset indent 650camcontrol cmd -n cd -u 1 -v -c "3C 00 00 00 00 00 00 00 0e 00" \e 651 -i 0xe "s1 i3 i1 i1 i1 i1 i1 i1 i1 i1 i1 i1" 652.Ed 653.Pp 654Issue a READ BUFFER command (0x3C) to cd1. Display the buffer size of cd1, 655and display the first 10 bytes from the cache on cd1. Display SCSI sense 656information if the command fails. 657.Pp 658.Bd -literal -offset indent 659camcontrol cmd -n cd -u 1 -v -c "3B 00 00 00 00 00 00 00 0e 00" \e 660 -o 14 "00 00 00 00 1 2 3 4 5 6 v v v v" 7 8 9 8 661.Ed 662.Pp 663Issue a WRITE BUFFER (0x3B) command to cd1. Write out 10 bytes of data, 664not including the (reserved) 4 byte header. Print out sense information if 665the command fails. Be very careful with this command, improper use may 666cause data corruption. 667.Pp 668.Bd -literal -offset indent 669camcontrol modepage da3 -m 1 -e -P 3 670.Ed 671.Pp 672Edit mode page 1 (the Read-Write Error Recover page) for da3, and save the 673settings on the drive. Mode page 1 contains a disk drive's auto read and 674write reallocation settings, among other things. 675.Pp 676.Dl camcontrol rescan 0 677.Pp 678Rescan SCSI bus 0 for devices that have been added, removed or changed. 679.Pp 680.Dl camcontrol rescan 0:1:0 681.Pp 682Rescan SCSI bus 0, target 1, lun 0 to see if it has been added, removed, or 683changed. 684.Pp 685.Dl camcontrol tags da5 -N 24 686.Pp 687Set the number of concurrent transactions for da5 to 24. 688.Pp 689.Bd -literal -offset indent 690camcontrol negotiate -n da -u 4 -T disable 691.Ed 692.Pp 693Disable tagged queueing for da4. 694.Pp 695.Bd -literal -offset indent 696camcontrol negotiate -n da -u 3 -R 20.000 -O 15 -a 697.Ed 698.Pp 699Negotiate a sync rate of 20MHz and an offset of 15 with da3. Then send a 700Test Unit Ready command to make the settings take effect. 701.Sh SEE ALSO 702.Xr cam 3 , 703.Xr cam_cdbparse 3 , 704.Xr cam 4 , 705.Xr pass 4 , 706.Xr xpt 4 707.Sh HISTORY 708The 709.Nm 710command first appeared in 711.Fx 3.0 . 712.Pp 713The mode page editing code and arbitrary SCSI command code are based upon 714code in the old 715.Xr scsi 8 716utility and 717.Xr scsi 3 718library, written by Julian Elischer and Peter Dufault. The 719.Xr scsi 8 720program first appeared in 386BSD 0.1.2.4, and first appeared in 721.Fx 722in 723.Fx 2.0.5 . 724.Sh AUTHORS 725.An Kenneth Merry Aq ken@FreeBSD.org 726.Sh BUGS 727The code that parses the generic command line arguments doesn't know that 728some of the subcommands take multiple arguments. So if, for instance, you 729tried something like this: 730.Bd -literal -offset indent 731camcontrol cmd -n da -u 1 -c "00 00 00 00 00 v" 0x00 -v 732.Ed 733.Pp 734The sense information from the test unit ready command would not get 735printed out, since the first 736.Xr getopt 3 737call in 738.Nm 739bails out when it sees the second argument to 740.Fl c 741.Pq 0x00 , 742above. Fixing this behavior would take some gross code, or changes to the 743.Xr getopt 3 744interface. The best way to circumvent this problem is to always make sure 745to specify generic 746.Nm 747arguments before any command-specific arguments. 748