Skip to content

Tag: kernel-module

How to send actions directly to input event?

I have a touch screen with events at /dev/input/event12 and /dev/input/event13. /dev/input/event12 is the main touch input, and in essence, I’d like to send instructions to the event directly to control behavior (ie, click location etc). Tools like xdotool do not want to work because this device is bein…

Prevent removal of busy kernel module

I have a simple kernel module that creates a character devices and does nothing with it. I wrote this user-space program that tests the character device. The program exits after 10 seconds. But if in the meantime I remove the module with rmmod or modprobe, then after 10 seconds the program segfaults or hangs,…

Get all mount points in kernel module

I’m trying to get all the mount points in a kernel module. Below is what I’ve come up with. It segfaults because of the strcat. Is this the correct way to get the mount points? Will this work? if so how do i fix the segfault? If not, how does one go about getting the mount points in a linux