diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 1995-05-03 06:30:59 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1995-05-03 06:30:59 +0000 |
commit | fcdd2c3c7df0c8c6c5d4ad141ab5094bba6a72dd (patch) | |
tree | 85625b62bb713949dc08bb262bb93941e5c861bb /lib/libdisk/rules.c | |
parent | 8d34651b6c76da47148db090fc1423cc222798e5 (diff) | |
download | src-fcdd2c3c7df0c8c6c5d4ad141ab5094bba6a72dd.tar.gz src-fcdd2c3c7df0c8c6c5d4ad141ab5094bba6a72dd.zip |
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.
Notes
Notes:
svn path=/head/; revision=8233
Diffstat (limited to 'lib/libdisk/rules.c')
-rw-r--r-- | lib/libdisk/rules.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/lib/libdisk/rules.c b/lib/libdisk/rules.c index ef50415e15ba..04bdfd8c6de7 100644 --- a/lib/libdisk/rules.c +++ b/lib/libdisk/rules.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: rules.c,v 1.3 1995/04/29 07:21:12 phk Exp $ + * $Id: rules.c,v 1.4 1995/04/30 06:09:27 phk Exp $ * */ @@ -180,19 +180,31 @@ Rule_003(struct disk *d, struct chunk *c, char *msg) void Rule_004(struct disk *d, struct chunk *c, char *msg) { - int i; + int i=0,j=0,k=0; struct chunk *c1; if (c->type != freebsd) return; - for (i=0, c1=c->part; c1; c1=c1->next) { + for (c1=c->part; c1; c1=c1->next) { if (c1->type != part) continue; + if (c1->subtype == FS_SWAP) + j++; + if (c1->flags & CHUNK_IS_ROOT) + k++; i++; } if (i > 7) { sprintf(msg+strlen(msg), - "Max seven 'part' allowed as child of 'freebsd'\n"); + "Max seven 'part' per 'freebsd' chunk\n"); + } + if (j > 1) { + sprintf(msg+strlen(msg), + "Max one subtype=FS_SWAP child per 'freebsd' chunk\n"); + } + if (k > 1) { + sprintf(msg+strlen(msg), + "Max one CHUNK_IS_ROOT child per 'freebsd' chunk\n"); } } |