Get name of kernel module in Driver Code - KBUILD_MODNAME

Kernel build system defines KBUILD_MODNAME automatically from each Makefile.

Following is the sample code which prints the name of module when loaded and unloaded.


Ouptut:


Comments

Popular posts from this blog

Appending and Prepending in Yocto - +=, =+ vs .=, =.

Connecting Serial ports of two Ubuntu VMWare Virtual Machines

Linux Commands for Hardware Info - lshw, lspci, lsdev, lscpu, lsblk, lsusb