X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=disk%2Fpart.c;h=d73625c4434c622a4a8d3e0ed78e41667b6eabf5;hb=81ac7e51ccf2984e9c0964a883d6b7e8fe875aad;hp=7bdc90eff701183934874195356c36e6d5a4ab5f;hpb=612404c28a64a6df300642a1550a65dcc8e01f82;p=oweals%2Fu-boot.git diff --git a/disk/part.c b/disk/part.c index 7bdc90eff7..d73625c443 100644 --- a/disk/part.c +++ b/disk/part.c @@ -35,16 +35,6 @@ #define PRINTF(fmt,args...) #endif -/* Rather than repeat this expression each time, add a define for it */ -#if (defined(CONFIG_CMD_IDE) || \ - defined(CONFIG_CMD_SATA) || \ - defined(CONFIG_CMD_SCSI) || \ - defined(CONFIG_CMD_USB) || \ - defined(CONFIG_MMC) || \ - defined(CONFIG_SYSTEMACE) ) -#define HAVE_BLOCK_DEVICE -#endif - struct block_drvr { char *name; block_dev_desc_t* (*get_dev)(int dev); @@ -472,6 +462,23 @@ int get_device_and_partition(const char *ifname, const char *dev_part_str, int part; disk_partition_t tmpinfo; + /* + * For now, we have a special case for sandbox, since there is no + * real block device support. + */ + if (0 == strcmp(ifname, "host")) { + *dev_desc = NULL; + info->start = info->size = info->blksz = 0; + info->bootable = 0; + strcpy((char *)info->type, BOOT_PART_TYPE); + strcpy((char *)info->name, "Sandbox host"); +#ifdef CONFIG_PARTITION_UUIDS + info->uuid[0] = 0; +#endif + + return 0; + } + /* If no dev_part_str, use bootdevice environment variable */ if (!dev_part_str || !strlen(dev_part_str) || !strcmp(dev_part_str, "-"))