diff options
author | Sebastian Rasmussen | 2016-05-29 22:11:52 +0200 |
---|---|---|
committer | Sebastian Rasmussen | 2016-05-31 23:51:07 +0200 |
commit | d1b7bfe5068d4aa3ee37d3755f0020aaa839b087 (patch) | |
tree | 466410a65e8cd000364530b5f6c26582dc9ed5ff /libfdisk/src/gpt.c | |
parent | misc: Fix various typos (diff) | |
download | kernel-qcow2-util-linux-d1b7bfe5068d4aa3ee37d3755f0020aaa839b087.tar.gz kernel-qcow2-util-linux-d1b7bfe5068d4aa3ee37d3755f0020aaa839b087.tar.xz kernel-qcow2-util-linux-d1b7bfe5068d4aa3ee37d3755f0020aaa839b087.zip |
fdisk: Fix typo RequiredPartiton -> RequiredPartition
This typo fix is backwards compatible in that fdisk will accept both
the GPT attribute RequiredPartition and RequiredPartiton with the typo.
Update documentation and tests to all use the new attribute name.
Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
Diffstat (limited to 'libfdisk/src/gpt.c')
-rw-r--r-- | libfdisk/src/gpt.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c index 6f163c070..f1c61ef0c 100644 --- a/libfdisk/src/gpt.c +++ b/libfdisk/src/gpt.c @@ -85,7 +85,8 @@ enum { GPT_ATTRBIT_GUID_COUNT = 16 }; -#define GPT_ATTRSTR_REQ "RequiredPartiton" +#define GPT_ATTRSTR_REQ "RequiredPartition" +#define GPT_ATTRSTR_REQ_TYPO "RequiredPartiton" #define GPT_ATTRSTR_NOBLOCK "NoBlockIOProtocol" #define GPT_ATTRSTR_LEGACY "LegacyBIOSBootable" @@ -1591,6 +1592,10 @@ static int gpt_entry_attrs_from_string( sizeof(GPT_ATTRSTR_REQ) - 1) == 0) { bit = GPT_ATTRBIT_REQ; p += sizeof(GPT_ATTRSTR_REQ) - 1; + } else if (strncmp(p, GPT_ATTRSTR_REQ_TYPO, + sizeof(GPT_ATTRSTR_REQ_TYPO) - 1) == 0) { + bit = GPT_ATTRBIT_REQ; + p += sizeof(GPT_ATTRSTR_REQ_TYPO) - 1; } else if (strncmp(p, GPT_ATTRSTR_LEGACY, sizeof(GPT_ATTRSTR_LEGACY) - 1) == 0) { bit = GPT_ATTRBIT_LEGACY; |