diff options
author | Anastasiia Lukianenko <anastasiia_lukianenko@epam.com> | 2020-08-06 12:42:59 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-14 15:18:30 -0400 |
commit | 53d725c74e825cdbca9c278514a44b1aa15513e3 (patch) | |
tree | 34b3f35e38826fda604b8e37d08a7cb0b8d9203d /drivers/xen | |
parent | 3a739cc6c9481bd2d567ba24461e355237556ee6 (diff) |
xen: pvblock: Print found devices indices
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/pvblock.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/xen/pvblock.c b/drivers/xen/pvblock.c index 1284bc4cca..76e82fbf41 100644 --- a/drivers/xen/pvblock.c +++ b/drivers/xen/pvblock.c @@ -793,6 +793,24 @@ fail: return ret; } +static void print_pvblock_devices(void) +{ + struct udevice *udev; + bool first = true; + const char *class_name; + + class_name = uclass_get_name(UCLASS_PVBLOCK); + for (blk_first_device(IF_TYPE_PVBLOCK, &udev); udev; + blk_next_device(&udev), first = false) { + struct blk_desc *desc = dev_get_uclass_platdata(udev); + + if (!first) + puts(", "); + printf("%s: %d", class_name, desc->devnum); + } + printf("\n"); +} + void pvblock_init(void) { struct driver_info info; @@ -815,6 +833,8 @@ void pvblock_init(void) if (ret) return; uclass_foreach_dev_probe(UCLASS_PVBLOCK, udev); + + print_pvblock_devices(); } static int pvblock_probe(struct udevice *udev) |