File: hello.c

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (26 lines) | stat: -rw-r--r-- 547 bytes parent folder | download | duplicates (44)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 *  SPDX-License-Identifier: GPL-2.0+ or MIT
 */
#include <linux/module.h>
#include <linux/kernel.h>

static int number= 1;
static char *who = "World";

module_param(number, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(myint, "Just some number");
module_param(who, charp, 0000);
MODULE_PARM_DESC(who, "Whot to greet");

int init_module(void)
{
	printk(KERN_INFO "Hello %s (%d)!\n", who, number);
	return 0;
}

void cleanup_module(void)
{
	printk(KERN_INFO "Goodbye %s (%d)!\n", who, number);
}

MODULE_LICENSE("Dual MIT/GPL");