Skip to content

LennickeBe/key_value_storage_driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

key_value_storage_driver

This project was done to show that I can familiarize myself with the subject of kernel module programming on my own. The task was to create a small linux driver with stores key-value pairs using an xarray. Furthermore should the user-interaction be based on ioctl.

Installation

After cloning first compile the source code:

user@pc:~$ cd key_value_storage_driver
user@pc:~/key_value_storage_drive$ make

Load the module using insmod:

user@pc:~/key_value_storage_driver$ sudo insmod kvs_driver.ko

In order to unload the module again you can use rmmod:

user@pc:~$ sudo rmmod kvs_driver

Usage

The kvs_app programm won't work without the module beeing loaded. (See Installation)

Show the usage in command line:

user@pc:~/key_storage_value_driver$ sudo ./kvs_app help

Add a value for the index "key". Key needs to be an integer and the length smaller than the ENTRY_LEN defined in kvs_driver.h (default is 100).

user@pc:~/key_storage_value_driver$ sudo ./kvs_app add <key> <value>

Show the value for the index "key". Key needs to be an integer.

user@pc:~/key_storage_value_driver$ sudo ./kvs_app show <key>

Remove the entry with index "key". Key needs to be an integer.

user@pc:~/key_storage_value_driver$ sudo ./kvs_app rm <key>

Clear all key-value pairs.

user@pc:~/key_storage_value_driver$ sudo ./kvs_app clear

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published