mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 08:56:15 +09:00
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'.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
65e1dee7dc
commit
1a680ae367
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user