summaryrefslogtreecommitdiff
path: root/src/swap.c
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2011-06-24 13:43:19 +0200
committerLennart Poettering <lennart@poettering.net>2011-06-27 14:32:44 +0200
commit3f8587327556c97ae4fc4c8b3ea0df122f769d4b (patch)
tree6622935a4949b82247b16d75e2e9b42410c97921 /src/swap.c
parent1616acbba41259ae0f828a7c6c0ac39b2c5942a6 (diff)
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.
Diffstat (limited to 'src/swap.c')
-rw-r--r--src/swap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/swap.c b/src/swap.c
index 14719ad18c..7675e6af21 100644
--- a/src/swap.c
+++ b/src/swap.c
@@ -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);