aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBin Meng2023-09-26 16:43:33 +0800
committerTom Rini2023-10-10 16:19:43 -0400
commit8897faba2d1d2e6802cd066580100685baa46f7f (patch)
tree2589c2bb478a4c1f50c5b4e6d0f6fdf3c616406b /include
parent77ca9d74571e92969591d39df134ccd72296f4d9 (diff)
blk: sandbox: Support binding a device with a given logical block size
Allow optionally set the logical block size of the host device to bind in the "host bind" command. If not given, defaults to 512. Signed-off-by: Bin Meng <bmeng@tinylab.org>
Diffstat (limited to 'include')
-rw-r--r--include/sandbox_host.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/sandbox_host.h b/include/sandbox_host.h
index ebd7d99b473..f7a5fc67230 100644
--- a/include/sandbox_host.h
+++ b/include/sandbox_host.h
@@ -74,10 +74,11 @@ int host_detach_file(struct udevice *dev);
* @label: Label of the attachment, e.g. "test1"
* @removable: true if the device should be marked as removable, false
* if it is fixed. See enum blk_flag_t
+ * @blksz: logical block size of the device
* @devp: Returns the device created, on success
* Returns: 0 if OK, -ve on error
*/
-int host_create_device(const char *label, bool removable,
+int host_create_device(const char *label, bool removable, unsigned long blksz,
struct udevice **devp);
/**
@@ -87,11 +88,13 @@ int host_create_device(const char *label, bool removable,
* @filename: Name of the file, e.g. "/path/to/disk.img"
* @removable: true if the device should be marked as removable, false
* if it is fixed. See enum blk_flag_t
+ * @blksz: logical block size of the device
* @devp: Returns the device created, on success
* Returns: 0 if OK, -ve on error
*/
int host_create_attach_file(const char *label, const char *filename,
- bool removable, struct udevice **devp);
+ bool removable, unsigned long blksz,
+ struct udevice **devp);
/**
* host_find_by_label() - Find a host by label