747375caa2
gotten bitten by mbrlabel trashing my incore disklabel to a point where the machine wasn't usable, so I reworked it: * only update the incore (and on-disk) label if `-f' is given. by default, the proposed disklabel will be printed but no changes will occur * add -q, to make the default operation a bit more quiet. * leave existing `used' in-core partition slots alone, and only add entries to the incore label if: - there's not an existing partition of the same size and offset (even of a different type) - there's a free partition slot (`unused', with size == 0) * use DIOCWDINFO instead of DIOCSDINFO, to update the incore as well as the on-disk label * use showpartitions() from ../disklabel/printlabel.c this should make mbrlabel a *lot* more useful.
12 lines
270 B
Makefile
12 lines
270 B
Makefile
# $NetBSD: Makefile,v 1.3 2000/12/24 13:57:37 lukem Exp $
|
|
|
|
DISKLABELPATH= ${.CURDIR}/../../sbin/disklabel
|
|
PROG= mbrlabel
|
|
SRCS= mbrlabel.c dkcksum.c printlabel.c
|
|
CPPFLAGS+= -I${DISKLABELPATH}
|
|
MAN= mbrlabel.8
|
|
LDADD+= -lutil
|
|
|
|
.PATH: ${DISKLABELPATH}
|
|
.include <bsd.prog.mk>
|