diff options
author | Henrik Nordström | 2013-11-10 11:26:56 -0600 |
---|---|---|
committer | Simon Glass | 2014-01-08 18:24:03 -0600 |
commit | f4d8de48f5a2aa1885daa0d425b8c0568a2ccb69 (patch) | |
tree | d86aea3653bfff137f2a94bea66d5fbddcb59853 /disk/part.c | |
parent | 60d18d3fe9d1a5db663711063cd0d5c915af377a (diff) | |
download | u-boot-f4d8de48f5a2aa1885daa0d425b8c0568a2ccb69.tar.gz u-boot-f4d8de48f5a2aa1885daa0d425b8c0568a2ccb69.tar.xz u-boot-f4d8de48f5a2aa1885daa0d425b8c0568a2ccb69.zip |
sandbox: block driver using host file/device as backing store
Provide a way to use any host file or device as a block device in U-Boot.
This can be used to provide filesystem access within U-Boot to an ext2
image file on the host, for example.
The support is plumbed into the filesystem and partition interfaces.
We don't want to print a message in the driver every time we find a missing
device. Pass the information back to the caller where a message can be printed
if desired.
Signed-off-by: Henrik Nordström <henrik@henriknordstrom.net>
Signed-off-by: Simon Glass <sjg@chromium.org>
- Removed change to part.c get_device_and_partition()
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'disk/part.c')
-rw-r--r-- | disk/part.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/disk/part.c b/disk/part.c index d2e34cfcfa..6941033d8d 100644 --- a/disk/part.c +++ b/disk/part.c | |||
@@ -43,6 +43,9 @@ static const struct block_drvr block_drvr[] = { | |||
43 | #if defined(CONFIG_SYSTEMACE) | 43 | #if defined(CONFIG_SYSTEMACE) |
44 | { .name = "ace", .get_dev = systemace_get_dev, }, | 44 | { .name = "ace", .get_dev = systemace_get_dev, }, |
45 | #endif | 45 | #endif |
46 | #if defined(CONFIG_SANDBOX) | ||
47 | { .name = "host", .get_dev = host_get_dev, }, | ||
48 | #endif | ||
46 | { }, | 49 | { }, |
47 | }; | 50 | }; |
48 | 51 | ||
@@ -286,6 +289,9 @@ static void print_part_header (const char *type, block_dev_desc_t * dev_desc) | |||
286 | case IF_TYPE_MMC: | 289 | case IF_TYPE_MMC: |
287 | puts ("MMC"); | 290 | puts ("MMC"); |
288 | break; | 291 | break; |
292 | case IF_TYPE_HOST: | ||
293 | puts("HOST"); | ||
294 | break; | ||
289 | default: | 295 | default: |
290 | puts ("UNKNOWN"); | 296 | puts ("UNKNOWN"); |
291 | break; | 297 | break; |