mirror of
https://github.com/systemd/systemd.git
synced 2025-03-21 02:50:18 +03:00
umount: ignore missing /proc/swaps
/proc/swaps does not exist when swap is disabled in the kernel. Just report an empty list of mountpoints to unmount in this case.
This commit is contained in:
parent
e05b415e95
commit
dee87d612d
@ -146,7 +146,7 @@ static int swap_list_get(MountPoint **head) {
|
||||
assert(head);
|
||||
|
||||
if (!(proc_swaps = fopen("/proc/swaps", "re")))
|
||||
return -errno;
|
||||
return (errno == ENOENT) ? 0 : -errno;
|
||||
|
||||
(void) fscanf(proc_swaps, "%*s %*s %*s %*s %*s\n");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user