aboutsummaryrefslogtreecommitdiff
path: root/include/scsi_emul.h
diff options
context:
space:
mode:
authorSimon Glass2022-09-21 16:21:40 +0200
committerSimon Glass2022-09-25 08:30:05 -0600
commitf148ad1b5fb14a3295ced502647de5be69e46100 (patch)
tree4ee299459c4835cff96b7a65e017b48099a55830 /include/scsi_emul.h
parenta3718f1e536c564610f23298e2c0540877ef30f8 (diff)
sandbox: scsi: Move file size into shared struct
Move this information into struct scsi_emul_info so we can use it in common code. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/scsi_emul.h')
-rw-r--r--include/scsi_emul.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/scsi_emul.h b/include/scsi_emul.h
index 86c9379ca9e..3c52398e3ff 100644
--- a/include/scsi_emul.h
+++ b/include/scsi_emul.h
@@ -18,6 +18,7 @@
* @vendor: Vendor name
* @product: Product name
* @block_size: Block size of device in bytes (normally 512)
+ * @file_size: Size of the backing file for this emulator, in bytes
*
* @phase: Current SCSI phase
* @buff_used: Number of bytes ready to transfer back to host
@@ -32,6 +33,7 @@ struct scsi_emul_info {
const char *vendor;
const char *product;
int block_size;
+ loff_t file_size;
/* state maintained by the emulator: */
enum scsi_cmd_phase phase;