Mail Archives: djgpp/1997/03/06/04:49:54
Roberto Galan Fernandez. (zzpar01 AT sirio DOT etsiig DOT uniovi DOT es) wrote:
: Hi, All:
: How can I covert one cluster number of the FAT (File Allocation
: Table) to a logic sector number?
:
: The way I use is this:
:
: aux= 1+(nș_FAT_copies * nș_sectors_per_FAT) +
: + (nș_directory_entries * nș_bytes_per_entry)
You must divide this ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with bytes_per_sector.
:
:
: logic_sector_number=(nș_cluster-2)*(nș_sectors_per_cluster)+(aux)
Also don't trust that there is only one sector before FATs (for example,
your physical drive may be divided to two or more logical drives).
BTW, how is this related to djgpp?
--
Esa Peuha
student of mathematics at the University of Helsinki
http://www.helsinki.fi/~peuha/
- Raw text -