chiark / gitweb /
use "Out of memory." consistantly (or with "\n")
[elogind.git] / src / cryptsetup / cryptsetup-generator.c
index b86521a7128c9d25a5521493539e58e25ed538ee..fb6b4d25c03cdaf21042214e469a4485b0132de1 100644 (file)
@@ -88,7 +88,7 @@ static int create_disk(
                 goto fail;
         }
 
-        p = join(arg_dest, "/", n, NULL);
+        p = strjoin(arg_dest, "/", n, NULL);
         if (!p) {
                 r = -ENOMEM;
                 log_error("Failed to allocate unit file name.");
@@ -120,10 +120,11 @@ static int create_disk(
                 "# Automatically generated by systemd-cryptsetup-generator\n\n"
                 "[Unit]\n"
                 "Description=Cryptography Setup for %%I\n"
+                "Documentation=man:systemd-cryptsetup@.service(8) man:crypttab(5)\n"
                 "SourcePath=/etc/crypttab\n"
                 "Conflicts=umount.target\n"
                 "DefaultDependencies=no\n"
-                "BindTo=%s dev-mapper-%%i.device\n"
+                "BindsTo=%s dev-mapper-%%i.device\n"
                 "After=systemd-readahead-collect.service systemd-readahead-replay.service %s\n"
                 "Before=umount.target\n",
                 d, d);
@@ -174,7 +175,7 @@ static int create_disk(
 
         if (!noauto) {
 
-                to = join(arg_dest, "/", d, ".wants/", n, NULL);
+                to = strjoin(arg_dest, "/", d, ".wants/", n, NULL);
                 if (!to) {
                         r = -ENOMEM;
                         goto fail;
@@ -190,9 +191,9 @@ static int create_disk(
                 free(to);
 
                 if (!nofail)
-                        to = join(arg_dest, "/cryptsetup.target.requires/", n, NULL);
+                        to = strjoin(arg_dest, "/cryptsetup.target.requires/", n, NULL);
                 else
-                        to = join(arg_dest, "/cryptsetup.target.wants/", n, NULL);
+                        to = strjoin(arg_dest, "/cryptsetup.target.wants/", n, NULL);
                 if (!to) {
                         r = -ENOMEM;
                         goto fail;
@@ -210,7 +211,7 @@ static int create_disk(
         }
 
         e = unit_name_escape(name);
-        to = join(arg_dest, "/dev-mapper-", e, ".device.requires/", n, NULL);
+        to = strjoin(arg_dest, "/dev-mapper-", e, ".device.requires/", n, NULL);
         if (!to) {
                 r = -ENOMEM;
                 goto fail;
@@ -302,7 +303,7 @@ static int parse_proc_cmdline(void) {
 
                         t = strv_append(arg_proc_cmdline_disks, word + 10);
                         if (!t) {
-                                log_error("Out of memory");
+                                log_error("Out of memory.");
                                 r = -ENOMEM;
                                 goto finish;
                         }
@@ -316,7 +317,7 @@ static int parse_proc_cmdline(void) {
 
                                 t = strv_append(arg_proc_cmdline_disks, word + 13);
                                 if (!t) {
-                                        log_error("Out of memory");
+                                        log_error("Out of memory.");
                                         r = -ENOMEM;
                                         goto finish;
                                 }
@@ -379,7 +380,7 @@ int main(int argc, char *argv[]) {
                 device = strappend("UUID=", *i);
 
                 if (!name || !device) {
-                        log_error("Out of memory");
+                        log_error("Out of memory.");
                         r = EXIT_FAILURE;
                         free(name);
                         free(device);