t-w / ADFlib

A free, portable and open implementation of the Amiga filesystem
GNU General Public License v2.0
0 stars 1 forks source link

Geometry setting code #4

Open t-w opened 7 months ago

t-w commented 7 months ago

The main issue is that geometry setting in done in several places and stages:

I would like to move all dealings with device geometry to opening a device - it should be set on any opened device (which can be that partitioned, formatted etc.). While "mounting" a device is basically reading partition/volume information (if we move reading rigid block info).

t-w commented 7 months ago

Regarding what is currently done in adfDevMountHd() - the geometry is being read from Rigid block and used regardless of what was set before. What seems rather missing here is that the geometry read from a real hardware device is completely ignored, while it should be, at least, compared with what is in Rigid Block, and reported if different.

t-w commented 7 months ago

So it is done as follows - the geometry is read from "native" devices, for others (file images) it is either predefined (for std. floppies) or calculated (to be reasonable).

However - if the device being opened has Rigid Disk block, the geometry is compared, reported if different (a warning is generated), and the one from Rigid disk block is being used. This is consistent with the earlier code.

If the geometry in RDB is incorrect, it is up to the client code (application) to change/update it.