mirror of
https://github.com/yaakov-h/scream-driver.git
synced 2024-11-22 01:14:49 +00:00
initial driver commit
This commit is contained in:
commit
e1c0f30373
3 changed files with 35 additions and 0 deletions
8
.gitignore
vendored
Normal file
8
.gitignore
vendored
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
*.cmd
|
||||||
|
*.symvers
|
||||||
|
*.order
|
||||||
|
*.mod
|
||||||
|
*.mod.*
|
||||||
|
*.o
|
||||||
|
*.o.d
|
||||||
|
*.ko
|
6
Makefile
Normal file
6
Makefile
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
obj-m += scream.o
|
||||||
|
|
||||||
|
all:
|
||||||
|
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
|
||||||
|
clean:
|
||||||
|
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
|
21
scream.c
Normal file
21
scream.c
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/uaccess.h>
|
||||||
|
#include <linux/fs.h>
|
||||||
|
#include <linux/proc_fs.h>
|
||||||
|
|
||||||
|
MODULE_AUTHOR("Yaakov");
|
||||||
|
MODULE_DESCRIPTION("Scream Device");
|
||||||
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
|
static int __init scream_module_init(void) {
|
||||||
|
printk(KERN_INFO "Module init");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __exit scream_module_exit(void) {
|
||||||
|
printk(KERN_INFO "Module exit");
|
||||||
|
}
|
||||||
|
|
||||||
|
module_init(scream_module_init);
|
||||||
|
module_exit(scream_module_exit);
|
Loading…
Reference in a new issue