CVSROOT:        /cvs
Module name:    src
Changes by:     k...@cvs.openbsd.org    2011/06/20 13:10:41

Modified files:
        sbin/fdisk     : mbr.c 

Log message:
MBR_read() can be reading from a file as well as a raw partition.
And files can be smaller (e.g. 512 bytes like /usr/mdec/mbr) than
a disk sector (e.g. 4096 bytes on pirofti's external disk drive).

So relax the length test on the read() result to < DEV_BSIZE (the
amount of data we actually want) instead of < secsize (the minimum
size that read() will accept).

'fdisk -e' and 'fdisk -i' now work on devices with sector sizes
greater than DEV_BSIZE.

Reply via email to