Hi...
I need to write a C program that will accomplish these things:
- read the name of a block device from the command line (e.g. myprog /dev/sda)
- open that block device in raw mode, read only
- read a random block, discard, repeat (infinite loop)
A quick answer: the usual read() C function will serve you well. It doesn't matter if you use it to read normal file or device, it's all treated as file. Pls read "man 2 read" for further information.

Just out of couriousity, why do you need a C program to do that? can you just do it by using "dd"?

regards,

Mulyadi


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to