summaryrefslogtreecommitdiffstats
path: root/lib/libdisk/change.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-04-29 04:00:57 +0000
committerphk <phk@FreeBSD.org>1995-04-29 04:00:57 +0000
commit093fd20263c83b8fbfb88a7cdb49236a80c9448a (patch)
tree11c2e7145c25cef4f5bba439fe31fdbe93c53551 /lib/libdisk/change.c
parentf7bf327ed4f468193062d32f7b6bb2cc4b521e9b (diff)
downloadFreeBSD-src-093fd20263c83b8fbfb88a7cdb49236a80c9448a.zip
FreeBSD-src-093fd20263c83b8fbfb88a7cdb49236a80c9448a.tar.gz
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...
Diffstat (limited to 'lib/libdisk/change.c')
-rw-r--r--lib/libdisk/change.c17
1 files changed, 16 insertions, 1 deletions
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);
+}
OpenPOWER on IntegriCloud