Skip to content

thehxdev/todo.ko

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

todo.ko

Todo app as Linux kernel module!

Warning

Since this is my first Linux kernel module, don't load the kernel module in your main operating system. Compile and load the module inside a Linux VM.

Build

Build the module with GNU make:

make

Use

Basic operations and instructions:

Load the module

sudo insmod todo.ko

Get all todos

cat /proc/todo

Add a new task

echo -n 'A: Read a new book' > /proc/todo

Delete a task

echo -n 'D: Read a new book' > /proc/todo

remove and unload the module

sudo rmmod todo

Command syntax

When you write to /proc/todo, the module parses your input. The first character MUST be an uppercase english ascii character. At this point only A for add and D for delete are supported. The general syntax:

command := CMD_CHAR: TASK

A command contains a single uppercase character which specifies the operation, a colon right after command character and the rest is the task itself.