sandbox: Provide a way to bind fixed/removeable devices
authorSimon Glass <sjg@chromium.org>
Mon, 15 Mar 2021 05:11:11 +0000 (18:11 +1300)
committerSimon Glass <sjg@chromium.org>
Sat, 27 Mar 2021 02:04:31 +0000 (15:04 +1300)
commit1758551ec9526d56303a2b5cf1f58147e66945ed
tree8e8b35f4dadae793cd6668d10f958f0337191806
parent803e9c1c94d06cfab43606056c653268e12926d8
sandbox: Provide a way to bind fixed/removeable devices

At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for code that distinguishes them.

Add a -r flag to the 'host bind' command and plumb it through to provide
this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>
cmd/host.c
doc/arch/sandbox.rst
drivers/block/sandbox.c
include/sandboxblockdev.h