summaryrefslogtreecommitdiffstats
path: root/block/genhd.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/block/genhd.c b/block/genhd.c
index df9816ede75b..9cf5583c90ff 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -743,7 +743,7 @@ void __init printk_all_partitions(void)
743 struct hd_struct *part; 743 struct hd_struct *part;
744 char name_buf[BDEVNAME_SIZE]; 744 char name_buf[BDEVNAME_SIZE];
745 char devt_buf[BDEVT_SIZE]; 745 char devt_buf[BDEVT_SIZE];
746 u8 uuid[PARTITION_META_INFO_UUIDLTH * 2 + 1]; 746 char uuid_buf[PARTITION_META_INFO_UUIDLTH * 2 + 5];
747 747
748 /* 748 /*
749 * Don't show empty devices or things that have been 749 * Don't show empty devices or things that have been
@@ -762,14 +762,16 @@ void __init printk_all_partitions(void)
762 while ((part = disk_part_iter_next(&piter))) { 762 while ((part = disk_part_iter_next(&piter))) {
763 bool is_part0 = part == &disk->part0; 763 bool is_part0 = part == &disk->part0;
764 764
765 uuid[0] = 0; 765 uuid_buf[0] = '\0';
766 if (part->info) 766 if (part->info)
767 part_unpack_uuid(part->info->uuid, uuid); 767 snprintf(uuid_buf, sizeof(uuid_buf), "%pU",
768 part->info->uuid);
768 769
769 printk("%s%s %10llu %s %s", is_part0 ? "" : " ", 770 printk("%s%s %10llu %s %s", is_part0 ? "" : " ",
770 bdevt_str(part_devt(part), devt_buf), 771 bdevt_str(part_devt(part), devt_buf),
771 (unsigned long long)part->nr_sects >> 1, 772 (unsigned long long)part->nr_sects >> 1,
772 disk_name(disk, part->partno, name_buf), uuid); 773 disk_name(disk, part->partno, name_buf),
774 uuid_buf);
773 if (is_part0) { 775 if (is_part0) {
774 if (disk->driverfs_dev != NULL && 776 if (disk->driverfs_dev != NULL &&
775 disk->driverfs_dev->driver != NULL) 777 disk->driverfs_dev->driver != NULL)