HomeFreeBSD

Fix fdisk(8) to create 2TB partitions on disks larger than 2TB, rather than
rS258686Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

Fix fdisk(8) to create 2TB partitions on disks larger than 2TB, rather than
only being able to create 1TB partitions:
o) Use an unsigned 32-bit quantity to store the number of disk sectors.
o) Detect overflow of said 32-bit quantity and clamp to 2^32.
o) Rather than returning the disk sector count from get_params, return 0 on

success, since its return value is only ever compared to -1 to detect
failure.  This would cause returning 2^32 sectors to be interpreted as an
error.

Reviewed by: bde ("good for a quick fix")

Details

Provenance
jmallettAuthored on
Parents
rS258685: MFC r258135: x86: Allow users to change PSL_RF via ptrace(PT_SETREGS...)
Branches
Unknown
Tags
Unknown

Event Timeline