sandbox: Move buffer to scsi_emul_info

Move the buffer into this struct so it can be shared between different
implementations.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2022-09-21 16:21:37 +02:00
parent 1377d448a2
commit fc7a7ed3a6
2 changed files with 35 additions and 11 deletions

View File

@@ -20,8 +20,13 @@
* @read_len: Number of bytes of data left in the current read command
* @alloc_len: Allocation length from the last incoming command
* @transfer_len: Transfer length from CBW header
* @buff: Data buffer for outgoing data
*/
struct scsi_emul_info {
/* provided by the caller: */
void *buff;
/* state maintained by the emulator: */
enum scsi_cmd_phase phase;
int buff_used;
int read_len;