]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fix add_esp() in the gpt-auto-generator.c (#6251)
authorДамјан Георгиевски <gdamjan@gmail.com>
Tue, 4 Jul 2017 07:40:59 +0000 (09:40 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 4 Jul 2017 07:40:59 +0000 (09:40 +0200)
b9088048b15cd21242b2308498fa865f864bfe45 seems to have broke it

fstab_is_mount_point() returns `true` (1) if the mount point exists and `false` (0) if it doesn't exist.

the change in b9088048 considered that if fstab_is_mount_point() returns 0
the mount point exists.

src/gpt-auto-generator/gpt-auto-generator.c

index c5319169b33d91d2dba5b1a8652d69aa07702573..a6b09dcbf18099d4ceb21c7ac2e2b8159f53a52e 100644 (file)
@@ -447,7 +447,7 @@ static int add_esp(DissectedPartition *p) {
         r = fstab_is_mount_point(esp);
         if (r < 0)
                 return log_error_errno(r, "Failed to parse fstab: %m");
-        if (r == 0) {
+        if (r > 0) {
                 log_debug("%s specified in fstab, ignoring.", esp);
                 return 0;
         }