disk: remove special case for /usr in clampFSSize

The `/usr` case is now handled by the `EnsureDirectorySizes()` function.
This commit is contained in:
Achilleas Koutsou 2022-04-27 17:45:49 +02:00 committed by Tomáš Hozza
parent 275e60f199
commit 9920d798f5

View file

@ -468,12 +468,6 @@ func (pt *PartitionTable) FindMountable(mountpoint string) Mountable {
func clampFSSize(mountpoint string, size uint64) uint64 {
// set a minimum size of 1GB for all mountpoints
var minSize uint64 = 1073741824
if mountpoint == "/usr" {
// set a minimum size of 2GB for `/usr` mountpoint
// since this is current behaviour and the minimum
// required to create a bootable image
minSize = 2147483648
}
if minSize > size {
return minSize
}