Skip to content

Custom char device linux module under stock major (like “tty”)

I’m writing my first linux kernel module. It is a standard char device to communicate over a GPIO pin. It works like a charme. It is registered with its device name under /dev and in my own class name under /sys (it has some attributes available for configuration by the host application). My wish is to …

implement a read operation list in debugfs

i’m implementing a kernel module. using several techniques. 1 of them is to give read/write to different module variables. i was able to read/write all variables except the list i have in my module. the linked list: i would like to have a corresponding file in debugfs that will print the full list. i tr…

Domain argument to socket() and socketpair()

I’ve been studying Linux socket programming recently, and the concepts are still swirling and unsettled in my head. Can someone confirm or correct my understanding of the domain argument to socket() and socketpair(): one should choose PF_LOCAL (or PF_UNIX) if one wants the socket communication to be str…

Linux time conversion fail

My program will take the current system time in HH:MM:SS and convert it into seconds. The reason i convert it into second is because i want to find out the time that was 90 seconds ago. For example :Current time : 12:30:30Time 90 sec ago : 12:29:00 But i can’t make it to the correct timestamp. Here are …

How to filter properly my access logs with GoAccess?

I want to generate a report with only the POST /xmlrpc.php requests, so I run the following command : The results of the report are not all displayed (in the graph I see only 9 days, but I checked on the others logs and I have POST /xmlrpc.php requests almost every days (30 in total) ). Am I using zat

How to auto answer linux terminal

My code is But after question is “do you want install [y/n]”. How can I automaticaly answer to question? I want Whenever the terminal asks a question, my answer is be “y”. Answer Just add following to your command: It makes sure that confirmation is avoided.