aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/genhd.c10
-rw-r--r--include/linux/genhd.h6
2 files changed, 6 insertions, 10 deletions
diff --git a/block/genhd.c b/block/genhd.c
index f6ecddb7995..d7f7d4e3da3 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -744,7 +744,7 @@ void __init printk_all_partitions(void)
744 struct hd_struct *part; 744 struct hd_struct *part;
745 char name_buf[BDEVNAME_SIZE]; 745 char name_buf[BDEVNAME_SIZE];
746 char devt_buf[BDEVT_SIZE]; 746 char devt_buf[BDEVT_SIZE];
747 u8 uuid[PARTITION_META_INFO_UUIDLTH * 2 + 1]; 747 char uuid_buf[PARTITION_META_INFO_UUIDLTH * 2 + 5];
748 748
749 /* 749 /*
750 * Don't show empty devices or things that have been 750 * Don't show empty devices or things that have been
@@ -763,14 +763,16 @@ void __init printk_all_partitions(void)
763 while ((part = disk_part_iter_next(&piter))) { 763 while ((part = disk_part_iter_next(&piter))) {
764 bool is_part0 = part == &disk->part0; 764 bool is_part0 = part == &disk->part0;
765 765
766 uuid[0] = 0; 766 uuid_buf[0] = '\0';
767 if (part->info) 767 if (part->info)
768 part_unpack_uuid(part->info->uuid, uuid); 768 snprintf(uuid_buf, sizeof(uuid_buf), "%pU",
769 part->info->uuid);
769 770
770 printk("%s%s %10llu %s %s", is_part0 ? "" : " ", 771 printk("%s%s %10llu %s %s", is_part0 ? "" : " ",
771 bdevt_str(part_devt(part), devt_buf), 772 bdevt_str(part_devt(part), devt_buf),
772 (unsigned long long)part->nr_sects >> 1, 773 (unsigned long long)part->nr_sects >> 1,
773 disk_name(disk, part->partno, name_buf), uuid); 774 disk_name(disk, part->partno, name_buf),
775 uuid_buf);
774 if (is_part0) { 776 if (is_part0) {
775 if (disk->driverfs_dev != NULL && 777 if (disk->driverfs_dev != NULL &&
776 disk->driverfs_dev->driver != NULL) 778 disk->driverfs_dev->driver != NULL)
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 6f43b145a63..7a1ce181644 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -221,12 +221,6 @@ static inline void part_pack_uuid(const u8 *uuid_str, u8 *to)
221 } 221 }
222} 222}
223 223
224static inline char *part_unpack_uuid(const u8 *uuid, char *out)
225{
226 sprintf(out, "%pU", uuid);
227 return out;
228}
229
230static inline int disk_max_parts(struct gendisk *disk) 224static inline int disk_max_parts(struct gendisk *disk)
231{ 225{
232 if (disk->flags & GENHD_FL_EXT_DEVT) 226 if (disk->flags & GENHD_FL_EXT_DEVT)