chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1616acb
)
swap: ignore missing /proc/swaps
author
Michael Olbrich
<m.olbrich@pengutronix.de>
Fri, 24 Jun 2011 11:43:19 +0000
(13:43 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 27 Jun 2011 12:32:44 +0000
(14:32 +0200)
Otherwise systemd reports "Failed to fully start up daemon: No such file or
directory" when swap is disabled in the kernel.
src/swap.c
patch
|
blob
|
history
diff --git
a/src/swap.c
b/src/swap.c
index 14719ad18c9c3afa68415fbaecce8208ffa83a49..7675e6af21c9e10c5bcc89acb8c633a250e0db45 100644
(file)
--- 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);