[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] rdlen calculation



Hi!

Just thought about it again: The formula as it is now will _always_
yield wrong results for partitions where (dir_entries * 32L) % recsiz is
not zero, i.e. rdlen will be off by one in that case.

Of course, the microsoft documentation states (dir_entries * 32L)
_should_ always be an even multiple of recsiz, but this implies an
implementation has to work correctly even when this is not the case. It
also does _not_ say (dir_entries * 32L) _must_ be /any/ (odd or even)
multiple of recsiz (if this were the case, the formula in the specs
wouldn't need the (+ recsiz - 1)-correction).

Is there any Atari documentation that states differently? If so, the
code should respect that depending on the partition ID (TOS or DOS
compatible).

Furthermore, I have to correct my statement about HDDRUTIL: Even though
the default value for the number of root directory entries in the
partition dialog is 256, HDDRUTIL will automatically up it so that it
fills an entire (logical) record.


Ciao

Thomas


-- 
Thomas Binder (Gryf @ IRCNet)  gryf@hrzpub.tu-darmstadt.de
PGP-key available on request!  binder@rbg.informatik.tu-darmstadt.de

Attachment: pgpj1c5r8bAZo.pgp
Description: PGP signature