[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Open file in kernel Mode...
> >>> 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..
> >>>
*****************************************
Praveen.M
Software Engineer
Emdedded System
Rendezvous On Chip.
Secunderabad.
Email : praveenb@xxxxxxxxx
*****************************************