]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libcam: Define depop structures and introduce scsi_wrap
authorWarner Losh <imp@FreeBSD.org>
Fri, 17 Sep 2021 22:29:22 +0000 (16:29 -0600)
committerWarner Losh <imp@FreeBSD.org>
Mon, 20 Sep 2021 22:27:59 +0000 (16:27 -0600)
commitda73926566da6f708ce3f17ff29fe867f1ad33cd
tree1df2903f683c81fe3f060f7492341e6418928bc0
parent2933a7ca03f16ba7b048a9bd2b3df1fc3cf9c344
libcam: Define depop structures and introduce scsi_wrap

Define structures related to the depop set of commands (GET PHYSICAL ELEMENT
STATUS, REMOVE ELEMENT AND TRUNCATE, and RESTORE ELEMENT AND REBUILD) as
well as the CDB construction routines.

Also create scsi_wrap.c. This will have convenience routines that will do all
the elements of allocating the ccb, generating the CDB, sending the command
(looping as necessary for cases where data is returned, but it's size isn't
known up front), etc. As this functionality is fleshed out, calling many
camcontrol commands programatically gets much easier.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D29017
lib/libcam/Makefile
lib/libcam/scsi_wrap.c [new file with mode: 0644]
lib/libcam/scsi_wrap.h [new file with mode: 0644]
sys/cam/scsi/scsi_all.c
sys/cam/scsi/scsi_all.h