summaryrefslogtreecommitdiffstats
path: root/src/gpt-auto-generator/gpt-auto-generator.c
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2017-07-04 17:41:09 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-07-04 17:41:09 +0200
commit1a680ae36734a121c5d1767d35bda9e6a923db6d (patch)
tree1493db75d703bb4354265064a3caaa804df9fb81 /src/gpt-auto-generator/gpt-auto-generator.c
parentfstab-generator: handle NFS "bg" mounts correctly. (#6103) (diff)
downloadsystemd-1a680ae36734a121c5d1767d35bda9e6a923db6d.tar.xz
systemd-1a680ae36734a121c5d1767d35bda9e6a923db6d.zip
gpt-auto-generator: fix the handling of the value returned by fstab_has_fstype() in add_swap() (#6280)
fstab_has_fstype() returns '1' if fstab contains the passed fstype, not '0'.
Diffstat (limited to '')
-rw-r--r--src/gpt-auto-generator/gpt-auto-generator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c
index a6b09dcbf1..a072242430 100644
--- a/src/gpt-auto-generator/gpt-auto-generator.c
+++ b/src/gpt-auto-generator/gpt-auto-generator.c
@@ -309,7 +309,7 @@ static int add_swap(const char *path) {
r = fstab_has_fstype("swap");
if (r < 0)
return log_error_errno(r, "Failed to parse fstab: %m");
- if (r == 0) {
+ if (r > 0) {
log_debug("swap specified in fstab, ignoring.");
return 0;
}