chiark / gitweb /
fsck: use _cleanup_close_pair_ where appropriate
[elogind.git] / src / cryptsetup / cryptsetup-generator.c
index 3657890df4c18418eea78234f7b2caaf4eac9027..5a0611afbbb4ad7650f1c35d534504c3dd8d87ad 100644 (file)
 ***/
 
 #include <errno.h>
-#include <string.h>
-#include <unistd.h>
 
 #include "dropin.h"
-#include "fileio.h"
 #include "generator.h"
 #include "hashmap.h"
 #include "log.h"
@@ -67,8 +64,8 @@ static int create_disk(
         assert(name);
         assert(device);
 
-        noauto = fstab_test_option(options, "noauto\0");
-        nofail = fstab_test_option(options, "nofail\0");
+        noauto = fstab_test_yes_no_option(options, "noauto\0" "auto\0");
+        nofail = fstab_test_yes_no_option(options, "nofail\0" "fail\0");
         tmp = fstab_test_option(options, "tmp\0");
         swap = fstab_test_option(options, "swap\0");
 
@@ -183,7 +180,7 @@ static int create_disk(
         if (ferror(f))
                 return log_error_errno(errno, "Failed to write file %s: %m", p);
 
-        from = strappenda("../", n);
+        from = strjoina("../", n);
 
         if (!noauto) {