Created attachment 32123 [details] [review] Have dkp_daemon_check_swap function 1st check if swap exists before determining how much is free dkp_client_can_hibernate can return true even if the machine has no swap partition. When determining the value of its can_hibernate property, devicekit-power checks if the kernel supports hibernate and whether there is enough swap space available to perform a hibernate. However, it does not seem to account for the possibility that a machine may not have a swap partition even though its kernel supports it. In this case, devicekit-power detects that the kernel supports hibernate and treats the swap space as completely available (therefore dkp_client_can_hibernate returns true). The attached patch modifies devicekit-power to first check if a swap partition exists before calculating how much is available.
Thanks for the patch, applied. commit bbb102c394eff71d84801b48b11e022b1fecb497 Author: Debbie Beliveau <debbie.beliveau@gmail.com> Date: Wed Dec 16 16:29:29 2009 +0000 Check if swap exists before determining how much is free Signed-off-by: Richard Hughes <richard@hughsie.com> :100644 100644 eb16a63... 47d84d5... M src/dkp-daemon.c
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.