daya wrote, On 23/03/07 16:54:
> To access the USB drive in raw mode in Linux...do not mount the drive.
> Just search the device file in the folder /dev
> It will probably be /dev/sda or /dev/sdc.
>
> Since all the devices are treated as files in linux.you can use the
> file in raw mode
> in C/C++ program
I think you mean binary mode, C does not have a raw mode.
> eg
>
> FILE* fp=fopen("/dev/sda","r");
That would open it in text mode which is not what you want (although it
does not make much difference on Linux). You should use "rb" for binary.
> etc.
> For writing you may probably need to run the program as root.
All this would be best discussed on a Linux or Unix programming group
where the specifics of the system are topical. They are not topical here.
--
Flash Gordon