On Tue, 11 Apr 2006 [EMAIL PROTECTED] wrote:
> Hi Alan,
>
> Thanks for your mail.
>
> Ya Linux Kernel is already having a driver. But being a new bee to usb, I am
> just trying to write a one.
>
> Could you please answer to my following questionsÂ…..
>
> 1) I didn't find an answer regarding the minor number, could you please tell
> me what is the minor base that i could issue while making a node for my
> driver?
I don't know.
> 2) May I know from which memory location I could read the file which is
> there on the memory stick?
To find out, you would need to decode the file system's data structures:
the directory and the FAT.
> 3) Some where on the net I have observed that 454th address location will
> contain the actual data address location. Depending upon that I have written
> the following code. Is it correct?
>
> UInt32 dataOffset = 0;
> void readPartitionTable()
> {
> UInt8 buff[ 512 ];
> UInt32 value;
>
> read_10(0, 1, buff);
>
> value = (UInt8) buff[ 0x1be + 8 ];
> value |= (UInt8) (buff[0x1be + 9] << 8);
> value |= (UInt8) (buff[0x1be + 10] << 16);
> value |= (UInt8) (buff[0x1be + 11] << 24);
>
> dataOffset = value;
> }
That should give you the starting sector number of the first partition.
> 4) Issuing Inquiry and test_unit_ready are really necessary before doing
> read_10?
No.
Alan Stern
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel