summaryrefslogtreecommitdiff
path: root/ubifs-utils/mkfs.ubifs
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2018-10-18 16:37:07 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2018-11-01 12:41:13 +0100
commit82e9055c49a6bceff3e32757cb4c0f10f46468ae (patch)
treedcbcf9c5fcc7dcd09ed987213fa184f2d6f66e01 /ubifs-utils/mkfs.ubifs
parentb9829c7e5b4a0c4e693a79fd0da36fa37e3e1a1a (diff)
mkfs.ubifs: Accept 0x prefix for key descriptor
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'ubifs-utils/mkfs.ubifs')
-rw-r--r--ubifs-utils/mkfs.ubifs/fscrypt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ubifs-utils/mkfs.ubifs/fscrypt.c b/ubifs-utils/mkfs.ubifs/fscrypt.c
index 6d1fa4b..02132e2 100644
--- a/ubifs-utils/mkfs.ubifs/fscrypt.c
+++ b/ubifs-utils/mkfs.ubifs/fscrypt.c
@@ -165,6 +165,9 @@ static int parse_key_descriptor(const char *desc, __u8 *dst)
{
int i, hi, lo;
+ if (desc[0] == '0' && (desc[1] == 'x' || desc[1] == 'X'))
+ desc += 2;
+
for (i = 0; i < FS_KEY_DESCRIPTOR_SIZE; ++i) {
if (!desc[i * 2] || !desc[i * 2 + 1]) {
err_msg("key descriptor '%s' is too short", desc);