Hello!
I would like to ask how to read or write to/from hard disk in C. for example input to program is sector, and output must be the data on this sector, and if sector belong to any file? can anybody help me... please!
This is a discussion on read write from hard disk within the C Programming forums, part of the General Programming Boards category; Hello! I would like to ask how to read or write to/from hard disk in C. for example input to ...
Hello!
I would like to ask how to read or write to/from hard disk in C. for example input to program is sector, and output must be the data on this sector, and if sector belong to any file? can anybody help me... please!
Which OS
Which compiler
Which file system
Which ....
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I support http://www.ukip.org/ as the first necessary step to a free Europe.
linux OS distribution kubuntu
gcc compiler
FAT 32 file system
Maybe this?
http://www.nondot.org/sabre/os/articles/FileSystems/
IIRC, you can (as root) open the entire hard disk, eg. "/dev/hda" as a file, and do whatever you want as a single large regular file.
std_disclaimer.h
If you screw this up with inept programming and lose your entire disk, don't blame me for handing you a loaded gun.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I support http://www.ukip.org/ as the first necessary step to a free Europe.