initdisk: actually restrict disk size to 2TB instead of modulo 2TB, fix ExtLBAForce usage #118
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey Jeremy,
I had a look at the recent changes and found some places where I am not sure that it is correct. For instance, I think
ExtLBAForce
originally was meant to force LBA access for partitions contained inside an extended partition of type LBA (0x0E).ExtLBAForce is now set in
LBA_Get_Drive_Parameters
toInitKernelConfig.ForceLBA
. I understand you somewhat wanted to force the use of LBA (it is not clear to me in what case exactly), but settingExtLBAForce
inLBA_Get_Drive_Parameters
is in my opinion a) the wrong variable and b) the wrong place for it.I relocated the
ExtLBAForce
setting toProcessDisk
, setting it initially to zero. I think this is the right layer of abstraction for it.LBA_Get_Drive_Parameters
should only do what it is named after: getting drive parameters. Otherwise it is getting even more confusing.In this merge request I also restrict the disk size to 2TB. It was modulo 2TB before, leading to a 3TB disk becoming a 1TB disk.
It also includes other minor changes (should be reviewed).
Greetings, Bernd