Page MenuHomeFreeBSD

Add a sense subcommand to camcontrol(8)
ClosedPublic

Authored by ken on Dec 28 2023, 8:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 18, 4:41 PM
Unknown Object (File)
Sat, May 11, 11:18 AM
Unknown Object (File)
Apr 22 2024, 1:20 PM
Unknown Object (File)
Apr 22 2024, 3:27 AM
Unknown Object (File)
Apr 22 2024, 3:27 AM
Unknown Object (File)
Apr 22 2024, 3:27 AM
Unknown Object (File)
Apr 22 2024, 3:27 AM
Unknown Object (File)
Apr 22 2024, 3:15 AM
Subscribers
None

Details

Summary

This adds a sense subcommand to camcontrol.

There are situations where sending a REQUEST SENSE command to a device can yield helpful information. And sometimes it is necessary to do that without sending a TEST UNIT READY and getting autosense back.

blackpearl:/usr/home/kenm:!:0} camcontrol sense da10
(pass1:mps0:0:20:0): SCSI status: OK
(pass1:mps0:0:20:0): SCSI sense: NOT READY asc:4,4 (Logical unit not ready, format in progress)
(pass1:mps0:0:20:0): Progress: 4% (2946/65536) complete

sm4u-1-mgmt:/usr/home/kenm:!:0} camcontrol sense da1
(pass1:mps0:0:9:0): SCSI status: OK
(pass1:mps0:0:9:0): SCSI sense: NO SENSE asc:5e,5 (Idle-B condition activated by timer)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ken requested review of this revision.Dec 28 2023, 8:20 PM
ken created this revision.
sbin/camcontrol/camcontrol.c
941โ€“942

It seems the status here will always be "OK". Not sure it worth printing. Plus it is confusing, since the original command that could produce the sense data without autosensing would likely return a "Check Condition".

ken marked an inline comment as done.Dec 28 2023, 8:59 PM
ken added inline comments.
sbin/camcontrol/camcontrol.c
941โ€“942

Good point, I agree it would be confusing.

ken marked an inline comment as done.
This revision is now accepted and ready to land.Dec 28 2023, 9:05 PM
This revision was automatically updated to reflect the committed changes.