]> err.no Git - systemd/commitdiff
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 c5e54d0988270a8d657fab064fbc03f71c89b460..2bc4f566a628dabadfd971997596a08772c6398e 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);