head	1.12;
access;
symbols
	RELENG_2_1_6_1_RELEASE:1.11.4.1
	RELENG_2_1_6_RELEASE:1.11.4.1
	RELENG_2_1_5_RELEASE:1.11.4.1
	RELENG_2_1_0_RELEASE:1.11
	RELENG_2_1_0:1.11.0.4
	RELENG_2_1_0_BP:1.11
	RELENG_2_0_5_RELEASE:1.11
	RELENG_2_0_5:1.11.0.2
	RELENG_2_0_5_BP:1.11
	RELENG_2_0_5_ALPHA:1.11;
locks; strict;
comment	@# @;


1.12
date	96.04.26.19.27.39;	author jkh;	state dead;
branches;
next	1.11;

1.11
date	95.05.10.05.57.01;	author phk;	state Exp;
branches
	1.11.4.1;
next	1.10;

1.10
date	95.05.04.07.00.52;	author phk;	state Exp;
branches;
next	1.9;

1.9
date	95.05.03.06.30.47;	author phk;	state Exp;
branches;
next	1.8;

1.8
date	95.05.01.08.08.02;	author jkh;	state Exp;
branches;
next	1.7;

1.7
date	95.04.30.22.51.02;	author phk;	state Exp;
branches;
next	1.6;

1.6
date	95.04.30.06.19.32;	author phk;	state Exp;
branches;
next	1.5;

1.5
date	95.04.30.06.09.23;	author phk;	state Exp;
branches;
next	1.4;

1.4
date	95.04.29.07.21.09;	author phk;	state Exp;
branches;
next	1.3;

1.3
date	95.04.29.04.00.52;	author phk;	state Exp;
branches;
next	1.2;

1.2
date	95.04.29.01.55.15;	author phk;	state Exp;
branches;
next	1.1;

1.1
date	95.04.28.23.56.56;	author phk;	state Exp;
branches;
next	;

1.11.4.1
date	96.05.09.13.33.26;	author jkh;	state dead;
branches;
next	;


desc
@@


1.12
log
@Remove libdisk from the old location.
@
text
@LIB=	disk
SRCS=	blocks.c disklabel.c dkcksum.c chunk.c disk.c change.c \
	create_chunk.c rules.c write_disk.c data.c

CFLAGS+= 	-Wall -g
CLEANFILES+=	tmp.c tst01 tst01.o data.c
VPATH=		${.CURDIR}/../../sbin/disklabel
NOPROFILE=	yes
NOSHARED=	yes

.include <bsd.lib.mk>

BOOTS=/usr/mdec

data.c:	libdisk.h ${BOOTS}/boot1 ${BOOTS}/boot2
	file2c 'const unsigned char boot1[] = {' '};' \
                < ${BOOTS}/boot1 > tmp.c
	file2c 'const unsigned char boot2[] = {' '};' \
                < ${BOOTS}/boot2 >> tmp.c
	mv tmp.c data.c

tst01: tst01.o libdisk.a
	cc ${CFLAGS} -static tst01.o -o tst01 libdisk.a
@


1.11
log
@Create_Chunk_DWIM() is here, though it doesn't quite do what the name implies.
@
text
@@


1.11.4.1
log
@1. Merge latest sysinstall changes.
2. Nuke libdisk from here in preparation for a move to /usr/src/lib, as in
   -current.
3. Remove explicit references to libdisk in Makefile (which will probably
   be merged outright from the HEAD later, but this will do for now).
@
text
@@


1.10
log
@Make the partitions names even more sensible
CheckRules sets the CHUNK_ALIGN & CHUNK_PAST_1024 flags.
@
text
@d15 1
a15 1
data.c:
@


1.9
log
@Make the target for tst01 more sensible.
Remove bogus targets.
Allocate partition letters as follows:
	lowest offset "flags & CHUNK_IS_ROOT" gets 'a',
	lowest offset "subtype==FS_SWAP" gets 'b'
	the rest is allocated in offset order from this sequence "defghab".
This will generally make sense.
Added rules to complain if more than one CHUNK_IS_ROOT or more than one
FS_SWAP per FreeBSD chunk.
Set CHUNK_IS_ROOT on the 'a' partition in Open_Disk.
Run Fixup_Names in Open_Disk.
@
text
@d6 1
a6 1
CLEANFILES+=	tmp.c tst01 tst01.o
@


1.8
log
@Stick a more BSD-like Makefile here so that I can link to the library.
@
text
@d13 1
a13 13
# Custom weird and funky targets that we'll leave here.
test:	tst01
	cp tst01 /0
	./tst01 wd1

fd:	tst01
	-umount /dev/fd1
	-umount /mnt
	mount /dev/fd1 /mnt
	strip tst01
	gzip < tst01 > /mnt/stand/disklayout
	chmod 755 /mnt/stand/disklayout
	-umount /mnt
a14 1
BOOTS=/usr/mdec
d22 2
a23 2
tst01: tst01.o
	cc ${CFLAGS} -static tst01.o -o tst01 -L${.CURDIR} -ldisk
@


1.7
log
@Use the DIOCSYNCSLICE ioctl now. (use only with kernel from this morning).
Get the CHS's right.
Get the disklabels (more) right.
@
text
@d1 9
a9 4
.PATH:	/usr/src/sbin/disklabel
OBJS=	tst01.o blocks.o disklabel.o dkcksum.o chunk.o disk.o change.o \
	create_chunk.o rules.o write_disk.o data.o
CFLAGS+= -Wall -g
d11 1
a11 1
all:	tst01
d13 1
d28 1
a28 1
data.o:
d33 1
a33 2
	cc ${CFLAGS} -o data.o -c tmp.c
	rm -f tmp.c
d35 2
a36 6
tst01:	${OBJS}
	#cc ${CFLAGS} -DREADLINE -static -o tst01 ${OBJS} -lreadline -ltermcap 
	cc ${CFLAGS} -static -o tst01 ${OBJS}

clean:
	rm -f *.o *.core tst01 tmp.c
@


1.6
log
@Make the default case less scary :-)
@
text
@d28 1
d35 1
a35 1
	rm -f *.o *.core tst01
@


1.5
log
@Now we do writes too.
@
text
@d6 2
@


1.4
log
@Names are assigned when chunks are created.
Rules for only one fat & one extended in MBR.
@
text
@d3 1
a3 1
	create_chunk.o rules.o write_disk.o
d10 17
d28 2
a29 1
	cc ${CFLAGS} -static -o tst01 ${OBJS} -lreadline -ltermcap 
@


1.3
log
@Next Iteration, getting better.
Made an All_FreeBSD() function.
Added a cmd-line interface (lowest rank) to the tst01 program.
The tst01 program is harmless (worst it can do is coredump), but it
is instructive to run, you can see what the slice-code things of your
disk...
@
text
@d3 1
a3 1
	create_chunk.o rules.o
d8 1
a8 1
	./tst01 sd0 
@


1.2
log
@Sanitize and explain a little bit...  Implement the first rules...
@
text
@d4 1
a4 1
CFLAGS+= -Wall
d11 4
a14 1
	cc ${CFLAGS} -static -o tst01 ${OBJS}
@


1.1
log
@This is a revision 0.00 of the backend stuff for the fdisk/disklabel stuff
in the new sysinstall.  If you want to give a helping hand, then send email
to phk@@FreeBSD.ORG.  DO NOT COMMIT TO THIS DIRECTORY!
@
text
@d3 1
a3 1
	create_chunk.o
@
