From 69ab80881552d5f79ca95f6b3be48ad122ab1ec2 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Fri, 13 Sep 2013 19:41:52 -0400 Subject: Advertise hibernation only if there's enough free swap Condition that is checked is taken from upower: active(anon) < free swap * 0.98 This is really stupid, because the kernel knows the situation better, e.g. there could be two swap files, and then hibernation would be impossible despite passing this check, or the kernel could start supporting compressed swap and/or compressed hibernation images, and then this this check would be too stringent. Nevertheless, until we have something better, this should at least return a true negative if there's no swap. Logging of capabilities in the journal is changed to not strip leading zeros. I consider this more readable anyway. http://cgit.freedesktop.org/upower/tree/src/up-daemon.c#n613 https://bugzilla.redhat.com/show_bug.cgi?id=1007059 --- src/shared/logs-show.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/shared/logs-show.c') diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index 87633e7816..f50777c58d 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -201,7 +201,7 @@ static int output_short( assert(j); /* Set the threshold to one bigger than the actual print - * treshold, so that if the line is actually longer than what + * threshold, so that if the line is actually longer than what * we're willing to print, ellipsization will occur. This way * we won't output a misleading line without any indication of * truncation. -- cgit v1.2.3-54-g00ecf