From 093fd20263c83b8fbfb88a7cdb49236a80c9448a Mon Sep 17 00:00:00 2001 From: phk Date: Sat, 29 Apr 1995 04:00:57 +0000 Subject: 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... --- lib/libdisk/change.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'lib/libdisk/change.c') diff --git a/lib/libdisk/change.c b/lib/libdisk/change.c index b1db61c..76d28cf 100644 --- a/lib/libdisk/change.c +++ b/lib/libdisk/change.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id$ + * $Id: change.c,v 1.2 1995/04/29 01:55:18 phk Exp $ * */ @@ -42,3 +42,18 @@ Set_Bios_Geom(struct disk *disk, u_long cyl, u_long hd, u_long sect) disk->bios_sect = sect; Bios_Limit_Chunk(disk->chunks,1024*hd*sect); } + +void +All_FreeBSD(struct disk *d) +{ + struct chunk *c; + + again: + for (c=d->chunks->part;c;c=c->next) + if (c->type != unused) { + Delete_Chunk(d,c); + goto again; + } + c=d->chunks; + Create_Chunk(d,c->offset,c->size,freebsd,0,0); +} -- cgit v1.1