summaryrefslogtreecommitdiff
path: root/disk
diff options
context:
space:
mode:
authorHenrik Nordström <henrik@henriknordstrom.net>2013-11-10 10:26:56 -0700
committerSimon Glass <sjg@chromium.org>2014-01-08 17:24:03 -0700
commitf4d8de48f5a2aa1885daa0d425b8c0568a2ccb69 (patch)
treed86aea3653bfff137f2a94bea66d5fbddcb59853 /disk
parent60d18d3fe9d1a5db663711063cd0d5c915af377a (diff)
downloadu-boot-f4d8de48f5a2aa1885daa0d425b8c0568a2ccb69.tar.gz
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')
-rw-r--r--disk/part.c6
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[] = {
#if defined(CONFIG_SYSTEMACE)
{ .name = "ace", .get_dev = systemace_get_dev, },
#endif
+#if defined(CONFIG_SANDBOX)
+ { .name = "host", .get_dev = host_get_dev, },
+#endif
{ },
};
@@ -286,6 +289,9 @@ static void print_part_header (const char *type, block_dev_desc_t * dev_desc)
case IF_TYPE_MMC:
puts ("MMC");
break;
+ case IF_TYPE_HOST:
+ puts("HOST");
+ break;
default:
puts ("UNKNOWN");
break;