Tweak image sizes for BD media

We used to have some arbitrary hard-coded sizes; tweak those to allow
for ~4% losses for spare sectors if people format media.
This commit is contained in:
Steve McIntyre 2023-07-12 17:54:44 +01:00
parent 25e6430341
commit 2964b68565
2 changed files with 5 additions and 4 deletions

1
debian/changelog vendored
View File

@ -6,6 +6,7 @@ debian-cd (3.2.2) UNRELEASED; urgency=medium
* Add a way to exclude named firmware packages from media, so we can
control which packages are included - see
tasks/$codename/firmware-exclude. Closes: #1032071
* Tweak sizes slightly for BD media.
-- Steve McIntyre <93sam@debian.org> Mon, 12 Jun 2023 08:36:50 +0100

View File

@ -768,12 +768,12 @@ sub get_disc_size {
$maxdiskblocks = int(8500 * $MB / $blocksize) - $reserved;
$diskdesc = "8.5GB DVD";
} elsif ($chosen_disk eq "BD") {
# Useable capacity, found by checking some disks
$maxdiskblocks = 11230000 - $reserved;
# Leave some space for potential formatting/spares on BD
$maxdiskblocks = int(24000 * $MB / $blocksize) - $reserved;
$diskdesc = "25GB BD";
} elsif ($chosen_disk eq "DLBD") {
# Useable capacity, found by checking some disks
$maxdiskblocks = 23652352 - $reserved;
# Leave some space for potential formatting/spares on BD
$maxdiskblocks = int(48000 * $MB / $blocksize) - $reserved;
$diskdesc = "50GB DLBD";
} elsif ($chosen_disk =~ /STICK(\d+)GB/) {
$maxdiskblocks = int($1 * $GB / $blocksize) - $reserved;