https://github.com/whizikxd/dev-one
/dev/one that when read from, returns all '1's
https://github.com/whizikxd/dev-one
kernel-module linux linux-kernel-device linux-kernel-driver linux-kernel-module
Last synced: 12 months ago
JSON representation
/dev/one that when read from, returns all '1's
- Host: GitHub
- URL: https://github.com/whizikxd/dev-one
- Owner: whizikxd
- License: gpl-3.0
- Created: 2024-10-28T18:46:31.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-28T22:27:00.000Z (about 1 year ago)
- Last Synced: 2025-02-09T08:34:49.564Z (about 1 year ago)
- Topics: kernel-module, linux, linux-kernel-device, linux-kernel-driver, linux-kernel-module
- Language: C
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# /dev/one
A device that when read from, returns '1' in ascii, this is a learning project -
don't take this code as an example :)
## Building
Running make should work for your system, if not, try installing linux-headers
using your distributions package manager.
```
make
```
To load the module after building, do
```
sudo insmod src/dev_one.ko
```
After this, you can read from /dev/one !
```
sudo head -c 20 /dev/one
```