Set logging settings and attempt to start the userspace helper ('userui').
Signed-off-by: Nigel Cunningham <[email protected]>
kernel/power/ui.c | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/kernel/power/ui.c b/kernel/power/ui.c
index a915a75..eedab56 100644
--- a/kernel/power/ui.c
+++ b/kernel/power/ui.c
@@ -499,3 +499,36 @@ void suspend_cond_pause(int pause, char
schedule();
}
+extern asmlinkage long sys_ioctl(unsigned int fd, unsigned int cmd,
+ unsigned long arg);
+
+/* suspend_prepare_console
+ *
+ * Description: Prepare a console for use, save current settings.
+ * Returns: Boolean: Whether an error occured. Errors aren't
+ * treated as fatal, but a warning is printed.
+ */
+void suspend_prepare_console(void)
+{
+ orig_loglevel = console_loglevel;
+ orig_default_message_loglevel = default_message_loglevel;
+ orig_kmsg = kmsg_redirect;
+ kmsg_redirect = fg_console + 1;
+ default_message_loglevel = 1;
+ console_loglevel = suspend_default_console_level;
+
+ ui_helper_data.pid = -1;
+
+ if (userui_ops.disabled)
+ return;
+
+ if (!*ui_helper_data.program) {
+ printk("suspend_userui: program not configured. suspend_userui disabled.\n");
+ return;
+ }
+
+ suspend_netlink_setup(&ui_helper_data);
+
+ return;
+}
+
--
Nigel Cunningham nigel at suspend2 dot net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]