#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/klog.h>
#include <sys/mount.h>
#include <sys/resource.h>
#include <sys/socket.h>
#define PLY_SUPER_SECRET_LAZY_UNMOUNT_FLAG 2
#endif
+#ifndef PLY_DISABLE_CONSOLE_PRINTK
+#define PLY_DISABLE_CONSOLE_PRINTK 6
+#endif
+
+#ifndef PLY_ENABLE_CONSOLE_PRINTK
+#define PLY_ENABLE_CONSOLE_PRINTK 7
+#endif
+
static int errno_stack[PLY_ERRNO_STACK_SIZE];
static int errno_stack_position = 0;
return true;
}
+void
+ply_show_new_kernel_messages (bool should_show)
+{
+ int type;
+
+ if (should_show)
+ type = PLY_ENABLE_CONSOLE_PRINTK;
+ else
+ type = PLY_DISABLE_CONSOLE_PRINTK;
+
+ if (klogctl (type, NULL, 0) < 0)
+ ply_trace ("could not toggle printk visibility: %m");
+}
+
ply_daemon_handle_t *
ply_create_daemon (void)
{
bool ply_create_directory (const char *directory);
bool ply_create_file_link (const char *source,
const char *destination);
+void ply_show_new_kernel_messages (bool should_show);
ply_daemon_handle_t *ply_create_daemon (void);
bool ply_detach_daemon (ply_daemon_handle_t *handle,
{
assert (plugin != NULL);
+ ply_show_new_kernel_messages (false);
+
ply_window_set_keyboard_input_handler (plugin->window,
(ply_window_keyboard_input_handler_t)
on_keyboard_input, plugin);
ply_window_show_text_cursor (plugin->window);
ply_window_reset_colors (plugin->window);
}
+
+ ply_show_new_kernel_messages (true);
}
void
detach_from_event_loop,
plugin);
+ ply_show_new_kernel_messages (false);
start_animation (plugin);
return true;
ply_window_show_text_cursor (plugin->window);
ply_window_reset_colors (plugin->window);
}
+
+ ply_show_new_kernel_messages (true);
}
void