# Linux Kernel Module Cheat

##### 17.7.4.1. Automatically create character device file on insmod

And also destroy it on `rmmod`:

    ./character_device_create.sh
    echo $?

Outcome: the test passes:

    0

Sources:

- kernel_modules/character_device_create.c

- rootfs_overlay/lkmc/character_device_create.sh

Bibliography: https://stackoverflow.com/questions/5970595/how-to-create-a-device-node-from-the-init-module-code-of-a-linux-kernel-module/45531867#45531867