umount: be happy if /proc/swaps doesn't exist

Kernels work without swap just fine.

Fixes: #13993
This commit is contained in:
Lennart Poettering
2019-11-15 14:57:27 +01:00
parent f795267e3a
commit 2cdd0d612d
+2
View File
@@ -184,6 +184,8 @@ int swap_list_get(const char *swaps, MountPoint **head) {
return log_oom();
r = mnt_table_parse_swaps(t, swaps);
if (r == -ENOENT) /* no /proc/swaps is fine */
return 0;
if (r < 0)
return log_error_errno(r, "Failed to parse %s: %m", swaps ?: "/proc/swaps");