X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=disk%2Fpart.c;h=491b02dc9c15ccbd8954a982ec2f802ae0f749d7;hb=4e2ece0e1518fb25bf0c672d0026477801b5e186;hp=cd14e988ed958091647913d1f0a0a9df7e928624;hpb=bd42a94268b165a6f298b9ab13be7003e8d96b02;p=u-boot diff --git a/disk/part.c b/disk/part.c index cd14e988ed..491b02dc9c 100644 --- a/disk/part.c +++ b/disk/part.c @@ -299,7 +299,7 @@ int part_get_info(struct blk_desc *dev_desc, int part, #ifdef HAVE_BLOCK_DEVICE struct part_driver *drv; -#ifdef CONFIG_PARTITION_UUIDS +#if CONFIG_IS_ENABLED(PARTITION_UUIDS) /* The common case is no UUID support */ info->uuid[0] = 0; #endif @@ -416,7 +416,7 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str, info->bootable = 0; strcpy((char *)info->type, BOOT_PART_TYPE); strcpy((char *)info->name, "Sandbox host"); -#ifdef CONFIG_PARTITION_UUIDS +#if CONFIG_IS_ENABLED(PARTITION_UUIDS) info->uuid[0] = 0; #endif #ifdef CONFIG_PARTITION_TYPE_GUID @@ -442,7 +442,7 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str, memset(info, 0, sizeof(*info)); strcpy((char *)info->type, BOOT_PART_TYPE); strcpy((char *)info->name, "UBI"); -#ifdef CONFIG_PARTITION_UUIDS +#if CONFIG_IS_ENABLED(PARTITION_UUIDS) info->uuid[0] = 0; #endif return 0; @@ -526,7 +526,7 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str, info->bootable = 0; strcpy((char *)info->type, BOOT_PART_TYPE); strcpy((char *)info->name, "Whole Disk"); -#ifdef CONFIG_PARTITION_UUIDS +#if CONFIG_IS_ENABLED(PARTITION_UUIDS) info->uuid[0] = 0; #endif #ifdef CONFIG_PARTITION_TYPE_GUID @@ -635,7 +635,7 @@ int part_get_info_by_name(struct blk_desc *dev_desc, const char *name, } if (strcmp(name, (const char *)info->name) == 0) { /* matched */ - return 0; + return i; } } }