summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-09-15 08:40:16 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-09-16 09:47:28 -0500
commit442e00839e4fc3c11506f5c8a9477b465865aecc (patch)
treeeaeeb42c9fac7b02eb5fe5d491dad2e3db1889de /src/shared
parent112a7f4696ebb96abdb42df62e1e794e903f66b3 (diff)
Assume that /proc/meminfo can be missing
Travis tests are failing, probably because /proc/meminfo is not available in the test environment. The same might be true in some virtualized systems, so just treat missing /proc/meminfo as a sign that hibernation is not possible.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/sleep-config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c
index 5ec7cce458..148c4dc617 100644
--- a/src/shared/sleep-config.c
+++ b/src/shared/sleep-config.c
@@ -172,7 +172,8 @@ static bool enough_memory_for_hibernation(void) {
r = get_status_field("/proc/meminfo", "\nSwapFree:", &swapfree);
if (r < 0) {
- log_error("Failed to retrieve SwapFree from /proc/meminfo: %s", strerror(-r));
+ log_full(r == -ENOENT ? LOG_DEBUG : LOG_WARNING,
+ "Failed to retrieve SwapFree from /proc/meminfo: %s", strerror(-r));
return false;
}