mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 10:15:57 +01:00
init_dev_kmsg
This commit is contained in:
13
kernel_module/user/init_dev_kmsg.c
Normal file
13
kernel_module/user/init_dev_kmsg.c
Normal file
@@ -0,0 +1,13 @@
|
||||
/* https://stackoverflow.com/questions/12683169/measure-time-taken-for-linux-kernel-from-bootup-to-userpace/46517014#46517014 */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(void) {
|
||||
FILE *fp;
|
||||
fp = fopen("/dev/kmsg", "w");
|
||||
fputs(__FILE__ "\n", fp);
|
||||
fclose(fp);
|
||||
while (1)
|
||||
sleep(0xFFFFFFFF);
|
||||
}
|
||||
Reference in New Issue
Block a user