65151c95f1
In particular the 'read' part plays 'hunt the disklabel' in order to get a label into a local buffer - from where it can be displayed/edited. The 'write' part makes a separate scan of the disk looking for places to write the label. The main changes are: - It can no longer write the first 8k of the mbr to the pbr (or v.v.) - All labels on the disk (that it can find) get updated during a write - With -A all the labels are displayed (inc. those deleted by -D) - Addition of -D which will delete (by one's complimenting dk_magic{2}) and existing labels before writing labels to the expected locations. - -v gives some verbose output to stderr, -vv more etc A better basis for processing incorrect endian labels, or labels from other architectures.
48 lines
1.2 KiB
Makefile
48 lines
1.2 KiB
Makefile
# $NetBSD: Makefile,v 1.58 2005/10/19 21:22:21 dsl Exp $
|
|
# @(#)Makefile 8.2 (Berkeley) 3/17/94
|
|
|
|
PROG= disklabel
|
|
SRCS= main.c dkcksum.c interact.c printlabel.c
|
|
MAN= disklabel.5 disklabel.8
|
|
.if (${HOSTPROG:U} == "")
|
|
DPADD+= ${LIBUTIL}
|
|
LDADD+= -lutil
|
|
.endif
|
|
|
|
# these have additional requirements on the alignment of a partition
|
|
.if (${MACHINE} == "sparc") || (${MACHINE} == "sparc64") \
|
|
|| (${MACHINE} == "sun3")
|
|
CPPFLAGS+= -DSTRICT_CYLINDER_ALIGNMENT
|
|
.endif
|
|
|
|
.if ( 0 \
|
|
|| ${MACHINE} == "acorn26" \
|
|
|| ${MACHINE} == "acorn32" \
|
|
|| ${MACHINE} == "amd64" \
|
|
|| ${MACHINE} == "arc" \
|
|
|| ${MACHINE} == "cats" \
|
|
|| ${MACHINE} == "cobalt" \
|
|
|| ${MACHINE} == "evbarm" \
|
|
|| ${MACHINE} == "hpcarm" \
|
|
|| ${MACHINE} == "hpcmips" \
|
|
|| ${MACHINE} == "i386" \
|
|
|| ${MACHINE} == "iyonix" \
|
|
|| ${MACHINE} == "macppc" \
|
|
|| ${MACHINE} == "netwinder" \
|
|
|| ${MACHINE} == "playstation2" \
|
|
|| ${MACHINE} == "prep" \
|
|
|| ${MACHINE} == "shark" \
|
|
)
|
|
# use MBR partition info
|
|
CPPFLAGS+= -DUSE_MBR
|
|
# recognize old MBR partition ID for a while
|
|
CPPFLAGS+= -DCOMPAT_386BSD_MBRPART
|
|
.endif
|
|
|
|
.if (${MACHINE} == "acorn32" || ${MACHINE} == "acorn26")
|
|
# Support FileCore boot block
|
|
CPPFLAGS+= -DUSE_ACORN
|
|
.endif
|
|
|
|
.include <bsd.prog.mk>
|