]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
umount: be happy if /proc/swaps doesn't exist
authorLennart Poettering <lennart@poettering.net>
Fri, 15 Nov 2019 13:57:27 +0000 (14:57 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 15 Nov 2019 13:57:27 +0000 (14:57 +0100)
Kernels work without swap just fine.

Fixes: #13993
src/shutdown/umount.c

index 4a96e1b79432abdcc618b92f7ae84364f7e09b6c..11be9466a584f665bd6676998f7a481aeb27e2c4 100644 (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");