Homework_Lesson_3/README.md

23 lines
865 B
Markdown

# Homework_Lesson_3
## Assignment
Modify the kernel module you created in the #2 Homework to accommodate the functionality of a character device that puts the number of time the device file has been read from into the file.
Compile and run the program.
Try reading the device file through “cat /proc/devices”.
Submit the source code and the screen shot of the result of execution displayed by the dmesg command.
Deadline of homework: Oct 30, 2022 (in case that you cannot finish in the class)
## Prerequisits
- requires the correct linux headers to be installed
- root access is needed
## how to run the kernel module
- `make` to build the module
- `sudo insmod <module_name>` to run the module
- `sudo rmmod <module_name>` to stop the module
## viewing the log
on systems that run systemd:
``` journalctl -f -k ```
you can also use
``` dmesg ```