Amos Shapira wrote: On 31/07/07, Shachar Shemesh <[EMAIL PROTECTED]> wrote:
Amos Shapira wrote: Currently my plan is to add a special file under /proc or /dev which any program will be able to open and then pass the arguments through ioctl(2). why not do it the way it's meant to be done, using a custom device? That's the straight forward way. What do you mean by "custom device"? It means exactly what you were thinking of: "add a special file under /proc or /dev which any program will be able to open and then pass the arguments through ioctl(2)." I missed understood one thing do you want to add a system call to any file descriptor or just have a way to inquire some data or operate from/on the kernel? a "custom device"/"loadable module" can be loaded and unloaded without rebooting, and by using the current set of system calls (especially ioctl) you can implement those operations. on the other hand if you want this sys call to be available for any file descriptor hence any device, a change in the sys call structure will be required. But I'm just repeating what Gilad wrote in my words. Install your own interrupt handler on the syscall interrupt number (memory serve me right, this is 80 on i386 for Linux). Filter out your Thanks but no thanks - my goal in this experiment (besides doing some kernel hacking) is to help people, not put new obstacles on their path to heavenly Linux experience :) Cheers, --Amos -- Ravid Baruch Naali E-mail: [EMAIL PROTECTED] Mobile: 052-5830021