About reading a text-file from kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I need to open a text-file from kernel itself, and read the contents
from that file, and close that file.

I tried using sys_open system call, but I was getting error saying
"bad address"

After playing around for some time, I felt that this system calls
assume that all data sent to them is from userspace, and even the
output that
they will be giving should go to userspace.

One more problem is that, this "sys_open" and "sys_read" system call
use file-discripter which is stored in tast_struct of current process.
I would also like to avoid this.

Is there any way by which I can read the contents of the file from the
kernel itself ?
Are there any example in kernel, which will help me in understanding
how to read from textfile.

Thank you for help
--
Pravin Shinde

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux