Hi Alan,
Thanks a lot for your reply. Here I have couple of questions based on your
replies....
1) For scanner the minor base number is 48 in Linux, in the same way what is
the minor base number that I can give for a USB mass-storage driver? I am
sorry in repeating the same question but I felt like you didn't get my
question.
2) If I am right, I can only read the first partition with that mentioned
code.
Alan, in order to finish writing this driver I need your help because I am a
new bee. Hope you will give such precious suggestions to me.
Thank you,
Regards,
Jeeva.
From: Alan Stern <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
CC: linux-usb-devel@lists.sourceforge.net
Subject: Re: [linux-usb-devel] questions on moto(E398) mass-storage linux
driver
Date: Tue, 11 Apr 2006 10:36:01 -0400 (EDT)
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
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
_________________________________________________________________
One and only Ash. Find out all about her. Only on MSN Search
http://server1.msn.co.in/profile/aishwarya.asp
-------------------------------------------------------
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
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel