]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
part: rename disk_partition_type_uuid()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 2 Sep 2023 07:35:21 +0000 (09:35 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 11 Sep 2023 20:27:49 +0000 (16:27 -0400)
Rename disk_partition_type_uuid to disk_partition_type_guid.

Provide function descriptions for the getter and setter.

Fixes: bcd645428c34 ("part: Add accessors for struct disk_partition type_uuid")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
disk/part_efi.c
include/part.h

index 39382c5faee0876c97bd59359d00728e143c2e3a..b7aef3731b5a62a7b727f3121f0a54b9344a6b7a 100644 (file)
@@ -299,7 +299,7 @@ int part_get_info_efi(struct blk_desc *desc, int part,
        }
        if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID)) {
                uuid_bin_to_str(gpt_pte[part - 1].partition_type_guid.b,
-                               (char *)disk_partition_type_uuid(info),
+                               (char *)disk_partition_type_guid(info),
                                UUID_STR_FORMAT_GUID);
        }
 
index f321479a5e91d63c816729e7bfeab13d6e0297aa..db34bc6bb7d9788fc35ab9424896a911d0abc640 100644 (file)
@@ -108,18 +108,38 @@ static inline void disk_partition_clr_uuid(struct disk_partition *info)
 }
 
 /* Accessors for struct disk_partition field ->type_guid */
-extern char *__invalid_use_of_disk_partition_type_uuid;
+extern char *__invalid_use_of_disk_partition_type_guid;
 
+/**
+ * disk_partition_type_guid() - get partition type GUID
+ *
+ * By using this function to get the partition type GUID we can use
+ * 'if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID))' instead of
+ * '#ifdef CONFIG_PARTITION_TYPE_GUID'.
+ *
+ * @info:      partition information
+ * Return:     partition type GUID
+ */
 static inline const
-char *disk_partition_type_uuid(const struct disk_partition *info)
+char *disk_partition_type_guid(const struct disk_partition *info)
 {
 #ifdef CONFIG_PARTITION_TYPE_GUID
        return info->type_guid;
 #else
-       return __invalid_use_of_disk_partition_type_uuid;
+       return __invalid_use_of_disk_partition_type_guid;
 #endif
 }
 
+/**
+ * disk_partition_set_type_guid() - set partition type GUID
+ *
+ * By using this function to set the partition type GUID we can use
+ * 'if (IS_ENABLED(CONFIG_PARTITION_TYPE_GUID))' instead of
+ * '#ifdef CONFIG_PARTITION_TYPE_GUID'.
+ *
+ * @info:      partition information
+ * @val:       partition type GUID as string
+ */
 static inline void disk_partition_set_type_guid(struct disk_partition *info,
                                                const char *val)
 {