mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 10:15:57 +01:00
pr_info everywhere
This commit is contained in:
@@ -57,7 +57,7 @@ static struct task_struct *kthread;
|
||||
static int work_func(void *data)
|
||||
{
|
||||
while (!kthread_should_stop()) {
|
||||
printk(KERN_INFO "%d\n", lkmc_dep);
|
||||
pr_info("%d\n", lkmc_dep);
|
||||
usleep_range(1000000, 1000001);
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -22,7 +22,7 @@ static int work_func(void *data)
|
||||
{
|
||||
int i = 0;
|
||||
while (!kthread_should_stop()) {
|
||||
printk(KERN_INFO "%d\n", i);
|
||||
pr_info("%d\n", i);
|
||||
usleep_range(1000000, 1000001);
|
||||
i++;
|
||||
if (i == 10)
|
||||
|
||||
@@ -15,7 +15,7 @@ static int work_func1(void *data)
|
||||
{
|
||||
int i = 0;
|
||||
while (!kthread_should_stop()) {
|
||||
printk(KERN_INFO "1 %d\n", i);
|
||||
pr_info("1 %d\n", i);
|
||||
usleep_range(1000000, 1000001);
|
||||
i++;
|
||||
if (i == 10)
|
||||
@@ -28,7 +28,7 @@ static int work_func2(void *data)
|
||||
{
|
||||
int i = 0;
|
||||
while (!kthread_should_stop()) {
|
||||
printk(KERN_INFO "2 %d\n", i);
|
||||
pr_info("2 %d\n", i);
|
||||
usleep_range(1000000, 1000001);
|
||||
i++;
|
||||
if (i == 10)
|
||||
|
||||
@@ -17,11 +17,11 @@ MODULE_LICENSE("GPL");
|
||||
|
||||
int init_module(void)
|
||||
{
|
||||
printk(KERN_INFO "init_module\n");
|
||||
pr_info("init_module\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cleanup_module(void)
|
||||
{
|
||||
printk(KERN_INFO "cleanup_module\n");
|
||||
pr_info("cleanup_module\n");
|
||||
}
|
||||
|
||||
@@ -15,14 +15,14 @@ The alternative is to get the serial data out streamed to console or to a file:
|
||||
|
||||
static int myinit(void)
|
||||
{
|
||||
printk(KERN_INFO "panic init\n");
|
||||
pr_info("panic init\n");
|
||||
panic("hello panic");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void myexit(void)
|
||||
{
|
||||
printk(KERN_INFO "panic cleanup\n");
|
||||
pr_info("panic cleanup\n");
|
||||
}
|
||||
|
||||
module_init(myinit)
|
||||
|
||||
@@ -24,7 +24,7 @@ static void work_func(struct work_struct *work)
|
||||
{
|
||||
int i = 0;
|
||||
while (atomic_read(&run)) {
|
||||
printk(KERN_INFO "%d\n", i);
|
||||
pr_info("%d\n", i);
|
||||
usleep_range(1000000, 1000001);
|
||||
i++;
|
||||
if (i == 10)
|
||||
|
||||
@@ -18,7 +18,7 @@ DECLARE_WORK(work, work_func);
|
||||
|
||||
static void work_func(struct work_struct *work)
|
||||
{
|
||||
printk(KERN_INFO "%d\n", i);
|
||||
pr_info("%d\n", i);
|
||||
i++;
|
||||
queue_delayed_work(queue, &next_work, HZ);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ static struct workqueue_struct *queue;
|
||||
|
||||
static void work_func(struct work_struct *work)
|
||||
{
|
||||
printk(KERN_INFO "worker\n");
|
||||
pr_info("worker\n");
|
||||
}
|
||||
|
||||
DECLARE_WORK(work, work_func);
|
||||
|
||||
Reference in New Issue
Block a user