From f9770058fa3bd8871b8b4ded0b10d4be418224ae Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 7 Sep 2020 10:15:40 +0100 Subject: [PATCH 2/4] options: Use cryptX instead of luksX as the temporary name. --- options/decrypt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/options/decrypt.c b/options/decrypt.c index d868f70..45de5b2 100644 --- a/common/options/decrypt.c +++ b/common/options/decrypt.c @@ -38,18 +38,18 @@ /** * Make a LUKS map name from the partition name, - * eg. C<"/dev/vda2" =E "luksvda2"> + * eg. C<"/dev/vda2" =E "cryptvda2"> */ static void make_mapname (const char *device, char *mapname, size_t len) { size_t i = 0; - if (len < 5) + if (len < 6) abort (); - strcpy (mapname, "luks"); - mapname += 4; - len -= 4; + strcpy (mapname, "crypt"); + mapname += 5; + len -= 5; if (STRPREFIX (device, "/dev/")) i = 5; -- 2.18.4