want a way to run vendor-specific commands via libscsi
When trying to create an action in libscsi, which is effectively a command to run, it needs to know how to determine the size of that command. One of the challenges with this is that if libscsi doesn't know the command, which is often common of vendor specific commands, then it will fail. We need to add a new interface to allow someone to specify the size of the cdb.
This is further complicated by the uscsi engine in libscsi, which needs to know how to determine the cdb size. Today it does that by trying to determine that from the command. However, that has no relation to the actual allocated size. If a user changes the first byte in the cdb, this could lead to us potentially giving a larger or smaller size in that command. While it might be more accurate for uscsi to try and determine it, it wouldn't be more correct necessarily. Really, the expected contract is that the command shouldn't change once it's been allocated.
I tested this with a custom program that leverages the new library. I also tested some existing consumers ala fwflash to make sure that they're not impacted.
Updated by Electric Monk over 3 years ago
- Status changed from New to Closed
commit b75e7d76519aa3dc2e72aa357a039a6b65372a1c Author: Robert Mustacchi <email@example.com> Date: 2019-01-10T18:26:29.000Z 9821 want a way to run vendor-specific commands via libscsi Reviewed by: Bryan Cantrill <firstname.lastname@example.org> Reviewed by: Jerry Jelinek <email@example.com> Reviewed by: Garrett D'Amore <firstname.lastname@example.org> Approved by: Richard Lowe <email@example.com>