Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geometry setting code #4

Open
t-w opened this issue Feb 19, 2024 · 2 comments
Open

Geometry setting code #4

t-w opened this issue Feb 19, 2024 · 2 comments

Comments

@t-w
Copy link
Owner

t-w commented Feb 19, 2024

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

  • opening/creating a device
    • read from a real device (is possible)
    • calculated or set standard (in case of, for instance, standard floppies)
  • for hard disks - the already set geometry is being overwritten by what is read from Rigid block,
    and it is done in adfDevMountHd()
    • geometry read (earlier) 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)

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
Copy link
Owner Author

t-w commented Feb 19, 2024

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 added a commit that referenced this issue Feb 19, 2024
This code does exacly the same (using geometry from Rigid Block
if present), but it does additional validity checks and
gives a warning in case the geometry read from the device
(or set / calculated) differs from the one in Rigid Block.
@t-w
Copy link
Owner Author

t-w commented Feb 22, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant