[Libguestfs] [PATCH common v2 2/4] options: Use cryptX instead of luksX as the temporary name.

Richard W.M. Jones rjones at redhat.com
Mon Sep 7 09:41:18 UTC 2020


---
 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/options/decrypt.c
+++ b/options/decrypt.c
@@ -38,18 +38,18 @@
 
 /**
  * Make a LUKS map name from the partition name,
- * eg. C<"/dev/vda2" =E<gt> "luksvda2">
+ * eg. C<"/dev/vda2" =E<gt> "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.27.0




More information about the Libguestfs mailing list