Fix incorrect disk capacity nomenclature. #237
Merged
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.
I've always wondered, when you first view all the drives, why drives above 999GB appeared in their GB nomenclature instead of TB. For instance a 2TB drive would appear as 2000GB. Unlike in other places within nwipe that do a proper job of describing the capacity. It's just this one location in the program that is wrong.
This information was obtained by a call to a function in libparted. Maybe when libparted was written there was no such thing as a TByte drive ?? Who knows, so anyway it was far easier to use nwipes build in function called 'determine_C_B_nomenclature()' This provides us with the correct nomenclature that is a fixed number of digits (three) and prefixed with spaces so the length is always the same. In the GUI this gives a nice list when viewing multiple drives that appear in neat columns.
Below are some screenshots of the new layouts, note the following: