[lkml]   [2004]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Write USB Device Driver entry not called
On Thu, 21 Oct 2004 09:24:52 +0530, eshwar <> wrote:
> if I modify the code like this
> char abc;
> if(read(fd,&abc,1) < 0)
> perror("read to bar failed: ");
> close(fd);
> Which will be sucess... This intern states that my file descriptor is right
> .... but write returns EBADF... both are contradicting statements....

It's this simple. File was opened for Read-Only. So for vfs_read it is
a 'good' file
descriptor. And for vfs_write it is a 'BAD' file descriptor.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:07    [W:0.027 / U:1.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site