2004-10-13 06:34:00

by Eshwar

[permalink] [raw]
Subject: Re: Write USB Device Driver entry not called

Open is sucessfull.... I don't think the problem the flags of open

Eshwar


----- Original Message -----
From: "Raj" <[email protected]>
To: "eshwar" <[email protected]>
Cc: "Linux Kernel Mailing List" <[email protected]>
Sent: Wednesday, October 13, 2004 11:45 AM
Subject: Re: Write USB Device Driver entry not called


> >
> > devfd = open("/dev/usb/dabusb10",O_APPEND | S_IRUSR| S_IWUSR );
>
> Did your open() succeed here ??? i guess S_IRUSR etc is used when you
> create a new file and not when you open a new one.
>
> > if ( write(devfd,send,512) < 0) {
> > printf ("write Failed\n");
> > return -1;
> > }
>
> well , if open fails above, then....
>
> -- Raj


2004-10-13 06:38:13

by Raj

[permalink] [raw]
Subject: Re: Write USB Device Driver entry not called

On Thu, 21 Oct 2004 23:22:02 +0530, eshwar <[email protected]> wrote:
> Open is sucessfull.... I don't think the problem the flags of open
>
Try this: open("/dev/usb/dabusb10",O_WRONLY | O_APPEND );

######
raj
######

2004-10-13 11:41:29

by Alan

[permalink] [raw]
Subject: Re: Write USB Device Driver entry not called

On Iau, 2004-10-21 at 18:52, eshwar wrote:
> Open is sucessfull.... I don't think the problem the flags of open

I do. See any book on C/Unix style file opening. For an existing file
you want
open("foo", O_flags)

for a new file possibly

open("foo", O_CREAT|o_flags, S_Iblah)