Plan 9 from Bell Labs’s /usr/web/sources/patch/applied/diskgeometry-nochs/readme

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


When using libdisk functions with files, not real or partfs(8) disks, chs fields in the Disk structure are not filled. 
Later on, partitiongeometry() will try to calculate the cylinders with
	disk->c = disk->secs / (disk->h*disk->s)
which may result in a division by zero.
This patch just checks for empty chs.
.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.