chiark / gitweb /
journal-remote: stop using EWOULDBLOCK
[elogind.git] / src / gpt-auto-generator / gpt-auto-generator.c
index 909fdda60a15f418b2f2a9a7857bcfe67712a4d9..580f9929bd8d9995aad56d319324f8d80ebc714f 100644 (file)
@@ -21,8 +21,6 @@
 
 #include <unistd.h>
 #include <stdlib.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
 #include <sys/statfs.h>
 #include <blkid/blkid.h>
 
@@ -147,7 +145,7 @@ static int add_cryptsetup(const char *id, const char *what, bool rw, char **devi
         if (ferror(f))
                 return log_error_errno(errno, "Failed to write file %s: %m", p);
 
-        from = strappenda("../", n);
+        from = strjoina("../", n);
 
         to = strjoin(arg_dest, "/", d, ".wants/", n, NULL);
         if (!to)
@@ -548,7 +546,7 @@ static int enumerate_partitions(dev_t devnum) {
                         srv_rw = !(flags & GPT_FLAG_READ_ONLY),
 
                         free(srv);
-                        srv = strdup(node);
+                        srv = strdup(subnode);
                         if (!srv)
                                 return log_oom();
                 }