Page MenuHomeFreeBSD

Add a sense subcommand to camcontrol(8)
ClosedPublic

Authored by ken on Dec 28 2023, 8:20 PM.
Tags
None
Referenced Files
F81902536: D43225.id.diff
Sat, Nov 30, 2:25 PM
Unknown Object (File)
Tue, Nov 12, 3:02 PM
Unknown Object (File)
Mon, Nov 11, 4:53 PM
Unknown Object (File)
Mon, Nov 11, 4:45 AM
Unknown Object (File)
Sun, Nov 10, 11:46 PM
Unknown Object (File)
Sun, Nov 10, 9:45 AM
Unknown Object (File)
Sun, Nov 10, 12:10 AM
Unknown Object (File)
Sat, Nov 9, 9:25 PM
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 Skipped
Unit
Tests Skipped

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.