gpt: introduce GPT_LAVEL_MAX
This commit is contained in:
+1
-1
@@ -104,7 +104,7 @@ int gpt_partition_label_valid(const char *s) {
|
||||
if (!recoded)
|
||||
return -ENOMEM;
|
||||
|
||||
return char16_strlen(recoded) <= 36;
|
||||
return char16_strlen(recoded) <= GPT_LABEL_MAX;
|
||||
}
|
||||
|
||||
bool gpt_partition_type_is_root(sd_id128_t id) {
|
||||
|
||||
@@ -115,6 +115,9 @@
|
||||
#define GPT_FLAG_NO_AUTO (1ULL << 63)
|
||||
#define GPT_FLAG_GROWFS (1ULL << 59)
|
||||
|
||||
/* maximum length of gpt label */
|
||||
#define GPT_LABEL_MAX 36
|
||||
|
||||
const char *gpt_partition_type_uuid_to_string(sd_id128_t id);
|
||||
const char *gpt_partition_type_uuid_to_string_harder(
|
||||
sd_id128_t id,
|
||||
|
||||
Reference in New Issue
Block a user