Oh.. i understood ... Thanks ...i am realising my silly question ... Please CMIIW ... As For pendrive with a filesystem on it ..and mounted .....its just like any other path on my system we can access it and create file read/write in file using normal C file operations. Then my doubt is ...where do we need to use libusb ? Is it when ..we dont have pendrive but any other device like camera etc .. where reading from it is not like reading from a file on filesystem ..and we need to interact with linux driver for camera .....? nidhi On Thu, Nov 18, 2010 at 3:18 PM, Roger Quadros <roger.quadros@xxxxxxxxx> wrote: > Hi, > > On 11/18/2010 10:45 AM, ext nidhi mittal hada wrote: >> >> So i want to learn how can we store data on a pen drive connected to >> usb interface >> from use space C program. >> >> in that concern ..i reached to Greg K H article mentioning libusb >> ...is there any other way too ? >> >> then usb_control_msg function i found difficult to comprehend ..how do >> i know parameters for my pen drive .... >> > > Don't re-invent the wheel. For you (at user space) the usb storage host side > driver and the scsi disk driver already provide a block device /dev/sdxx for > you to read/write to. > > You can use any filesystem of your choice on that block device and then > read/write to it using the file read/write mechanism in the programming > language of your choice. > > note: FAT32 is not a reliable filesystem. There are better filesystems out > there. > > -- > regards, > -roger > -- Thanks & Regards Nidhi Mittal Hada Scientific officer D Computer Division Bhabha Atomic Research Center Mumbai http://nidhi-searchingmyself.blogspot.com/ -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html