chiark / gitweb /
cryptsetup: call mkswap on dm device, not on source device
authorLennart Poettering <lennart@poettering.net>
Tue, 4 Jan 2011 01:12:07 +0000 (02:12 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 4 Jan 2011 01:12:07 +0000 (02:12 +0100)
src/cryptsetup-generator.c

index c5e54d0..2bc4f56 100644 (file)
@@ -122,13 +122,13 @@ static int create_disk(
 
         if (options && has_option(options, "tmp"))
                 fprintf(f,
-                        "ExecStartPost=/sbin/mke2fs '%s'",
-                        u);
+                        "ExecStartPost=/sbin/mke2fs '/dev/mapper/%s'",
+                        name);
 
         if (options && has_option(options, "swap"))
                 fprintf(f,
-                        "ExecStartPost=/sbin/mkswap '%s'",
-                        u);
+                        "ExecStartPost=/sbin/mkswap '/dev/mapper/%s'",
+                        name);
 
         fflush(f);