mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
swap: ignore missing /proc/swaps
Otherwise systemd reports "Failed to fully start up daemon: No such file or directory" when swap is disabled in the kernel.
This commit is contained in:
parent
1616acbba4
commit
3f85873275
@ -1237,7 +1237,7 @@ static int swap_enumerate(Manager *m) {
|
||||
|
||||
if (!m->proc_swaps) {
|
||||
if (!(m->proc_swaps = fopen("/proc/swaps", "re")))
|
||||
return -errno;
|
||||
return (errno == ENOENT) ? 0 : -errno;
|
||||
|
||||
m->swap_watch.type = WATCH_SWAP;
|
||||
m->swap_watch.fd = fileno(m->proc_swaps);
|
||||
|
Loading…
x
Reference in New Issue
Block a user