Results 1 to 2 of 2
Hi,
Guys can u please convert the psuedo code here to proper linux/C/kernel syntax. Ive finally managed to invoke the custom syscall in my codes but I require it to ...
- 10-06-2011 #1Just Joined!
- Join Date
- Oct 2011
- Posts
- 1
Custom reboot system call
Hi,
Guys can u please convert the psuedo code here to proper linux/C/kernel syntax. Ive finally managed to invoke the custom syscall in my codes but I require it to do more than just print to screen
Code:#include <linux/linkage.h> #include <linux/kernel.h> #include <unistd.h> #include <linux/reboot.h> #include <linux/timer.h> #include <sys/reboot.h> asmlinkage long sys_customreboot ( int delay) { printk("<1>You have successfully called a custom syscall"); // value= get current time + delay (seconds); // // while ( current time != value) /*after factor seconds*/ // {}; /* wait here*/ // reboot(); return 1; }
- 10-07-2011 #2Linux Guru
- Join Date
- May 2011
- Posts
- 1,818
So you just want to run a command (i.e., /sbin/reboot)? Tried the system func? Or do you mean something else?


Reply With Quote
