mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
block: store partition_meta_info.uuid as a string
This will allow other types of UUID to be stored here, aside from true UUIDs. This also simplifies code that uses this field, since it's usually constructed from a, used as a, or compared to other, strings. Note: A simplistic approach here would be to set uuid_str[36]=0 whenever a /PARTNROFF option was found to be present. However, this modifies the input string, and causes subsequent calls to devt_from_partuuid() not to see the /PARTNROFF option, which causes different results. In order to avoid misleading future maintainers, this parameter is marked const. Signed-off-by: Stephen Warren <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Will Drewry <[email protected]> Cc: Kay Sievers <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
d48c152a41
commit
1ad7e89940
4 changed files with 25 additions and 26 deletions
|
|
@ -743,7 +743,6 @@ void __init printk_all_partitions(void)
|
|||
struct hd_struct *part;
|
||||
char name_buf[BDEVNAME_SIZE];
|
||||
char devt_buf[BDEVT_SIZE];
|
||||
char uuid_buf[PARTITION_META_INFO_UUIDLTH * 2 + 5];
|
||||
|
||||
/*
|
||||
* Don't show empty devices or things that have been
|
||||
|
|
@ -762,16 +761,11 @@ void __init printk_all_partitions(void)
|
|||
while ((part = disk_part_iter_next(&piter))) {
|
||||
bool is_part0 = part == &disk->part0;
|
||||
|
||||
uuid_buf[0] = '\0';
|
||||
if (part->info)
|
||||
snprintf(uuid_buf, sizeof(uuid_buf), "%pU",
|
||||
part->info->uuid);
|
||||
|
||||
printk("%s%s %10llu %s %s", is_part0 ? "" : " ",
|
||||
bdevt_str(part_devt(part), devt_buf),
|
||||
(unsigned long long)part_nr_sects_read(part) >> 1
|
||||
, disk_name(disk, part->partno, name_buf),
|
||||
uuid_buf);
|
||||
part->info ? part->info->uuid : "");
|
||||
if (is_part0) {
|
||||
if (disk->driverfs_dev != NULL &&
|
||||
disk->driverfs_dev->driver != NULL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue