Hello,
I have used open system call in KLD to create a file. But after
inserting the module the file is not created though the file descriptor
returned is non zero. I also used close system call to close the file, using
the descriptor returned by open system call.
I called the following function from my module:
int f_open(void)
{
struct open_args o;
struct close_args c;
struct thread *td = curthread;
int fd;
o.path = "/home/file1.c";
o.flags = O_CREAT | O_RDWR | O_APPEND;
o.mode = 777;
fd = open(td,&a);
printf("\nFile descriptor = %d",fd);
c.fd = fd;
close(td,&c);
}
Can anyone help me in this regard?
TIA,
Anupam Deshpande
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"