mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-14 00:47:26 +00:00
1758551ec9
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>
26 lines
572 B
C
26 lines
572 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright (c) 2013, Henrik Nordstrom <henrik@henriknordstrom.net>
|
|
*/
|
|
|
|
#ifndef __SANDBOX_BLOCK_DEV__
|
|
#define __SANDBOX_BLOCK_DEV__
|
|
|
|
struct host_block_dev {
|
|
#ifndef CONFIG_BLK
|
|
struct blk_desc blk_dev;
|
|
#endif
|
|
char *filename;
|
|
int fd;
|
|
};
|
|
|
|
/**
|
|
* host_dev_bind() - Bind or unbind a device
|
|
*
|
|
* @dev: Device number (0=first slot)
|
|
* @filename: Host filename to use, or NULL to unbind
|
|
* @removable: true if the block device should mark itself as removable
|
|
*/
|
|
int host_dev_bind(int dev, char *filename, bool removable);
|
|
|
|
#endif
|