[systemd-commits] TODO src/sleep

Lennart Poettering lennart at kemper.freedesktop.org
Wed May 30 06:04:47 PDT 2012


 TODO              |    6 ------
 src/sleep/sleep.c |   10 ++++++++++
 2 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit eb2672893108e14d50bd79b7fc714b75c5427c0b
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed May 30 15:04:39 2012 +0200

    sleep: print nice messages right before and right after system hibernate/sleep

diff --git a/TODO b/TODO
index f4d3c63..a9e38d3 100644
--- a/TODO
+++ b/TODO
@@ -36,12 +36,6 @@ Features:
 
 * parse kernel cmdline option for capability bset
 
-* logind: listen to power-button events
-  - run poweroff if no session is active
-  - console session should beep when we refuse to poweroff
-  - graphical sessions will show a dialog, like they do already today
-  - use udev to tag input devices we want to subscribe to
-
 * journalctl /dev/sda, journalctl /usr/bin/httpd, journalctl --device=b12:8 (--device=n12, --device=+usb:1-1)
 
 * make use of /sys/power/wake_lock in inhibitors
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index 7062dc2..941edc3 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -65,12 +65,22 @@ int main(int argc, char *argv[]) {
         arguments[3] = NULL;
         execute_directory(SYSTEMD_SLEEP_BINARY_PATH, NULL, arguments);
 
+        if (streq(argv[1], "suspend"))
+                log_info("Suspending system...");
+        else
+                log_info("Hibernating system...");
+
         fputs(verb, f);
         fputc('\n', f);
         fflush(f);
 
         r = ferror(f) ? -errno : 0;
 
+        if (streq(argv[1], "suspend"))
+                log_info("System resumed.");
+        else
+                log_info("System thawed.");
+
         arguments[1] = (char*) "post";
         execute_directory(SYSTEMD_SLEEP_BINARY_PATH, NULL, arguments);
 



More information about the systemd-commits mailing list