Re: Linux Kernal inconsistency?

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

 





Hi,

I am writing a kernel module in which I am trying to read the contents of a 
file into a buffer, but the buffer is still empty. Do you know why it is so?

The code that I have is :

fd = filp_open(filename,O_RDONLY, 0500);
num_read = fd->f_op->read(fd, buffer , count, &fd->f_pos);

I tried printing out the contents of buffer, but it is empty.
But num_read has a value > 0.

I would really appreciate a reply.

Thanks,
Femitha.


>From: John Levon <moz@compsoc.man.ac.uk>
>To: kernelnewbies@nl.linux.org
>Subject: Re: Linux Kernal inconsistency?
>Date: Sat, 10 Nov 2001 18:31:50 +0000
>
>On Sat, Nov 10, 2001 at 04:56:30PM +0000, Dave Jones wrote:
>
> > Feel like writing this (and related trickery) up for a
> > external-modules-howto for the webpages ? 8)
>
>yes I do.
>
>john
>
>--
>"I know I believe in nothing but it is my nothing"
>	- Manic Street Preachers
>--
>Kernelnewbies: Help each other learn about the Linux kernel.
>Archive:       http://mail.nl.linux.org/kernelnewbies/
>IRC Channel:   irc.openprojects.net / #kernelnewbies
>Web Page:      http://www.kernelnewbies.org/
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/



[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