Open file in kernel Mode...

From: Praveen (praveenb@trinc.com)
Date: Wed May 24 2000 - 22:06:19 EST


Hi folks,
   I want to open the file in init module..
   Following is the piece of code i tried..Have a look it...

  open=sys_call_table[__NR_open];
   fd=(*open) ("/dev/tty",0,0);

But open system call is returning error value ( -14).

  Even i tried to read from standard input fd. I am getting the number of
  characters read,but data is not available in the buffer i used for read
  call. I think it may be because of buffer is in kernel space ...I am not
sure about
  that..

Please tell me, whats going on out there ....
Thz..
  

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:11 EST