[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS: cvs.openbsd.org: src



CVSROOT:	/cvs
Module name:	src
Changes by:	krw_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org	2006/11/19 13:17:12

Modified files:
	sbin/fdisk     : disk.c 

Log message:
Try DIOCGPDINFO before DIOCGDINFO when trying to determine the 'label'
geometry for a unit. DIOCGPDINFO avoids using the on-disk label or the
cached copy of it and returns a 'spoofed' label that retains the
geometry info placed in the label by the driver. Unfortunately
DIOCGPDINFO is not universally implemented, though sd and wd do.

This is what disklabel(8) does when it wants geometry so this makes
fdisk a bit more consistant with disklabel.

This fixes 'fdisk -i' and 'reinit' when trying to install from a
miniroot on, e.g., landisk. i.e. no need to zero out the disklabel
before doing 'fdisk -i'.

'get it in snaps' deraadt@