diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2023-09-02 09:35:21 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-09-11 16:27:49 -0400 |
commit | 782c7f1bdb0a25e1851a47ff1aba9f71162c2f9d (patch) | |
tree | 8ccdf5154e69b0079c34e86ad4be56c63448a477 /include/part.h | |
parent | 7cc1d87d7e1e64d7bb280ead94c55a51c4f3ee63 (diff) | |
download | u-boot-782c7f1bdb0a25e1851a47ff1aba9f71162c2f9d.zip u-boot-782c7f1bdb0a25e1851a47ff1aba9f71162c2f9d.tar.gz u-boot-782c7f1bdb0a25e1851a47ff1aba9f71162c2f9d.tar.bz2 |
part: rename disk_partition_type_uuid()
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>
Diffstat (limited to 'include/part.h')
-rw-r--r-- | include/part.h | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/include/part.h b/include/part.h index f321479..db34bc6 100644 --- a/include/part.h +++ b/include/part.h @@ -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) { |