diff options
author | jkh <jkh@FreeBSD.org> | 1995-05-21 10:16:10 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-05-21 10:16:10 +0000 |
commit | 1790211a555d1f2a1159842874e5b1b34a48852d (patch) | |
tree | ae3d7c7868579cd8723d2c1edf7f43915d58ed5a /usr.sbin/sade | |
parent | 22783db149dff65f498a64c678347fb2a35df805 (diff) | |
download | FreeBSD-src-1790211a555d1f2a1159842874e5b1b34a48852d.zip FreeBSD-src-1790211a555d1f2a1159842874e5b1b34a48852d.tar.gz |
Correct a display bug that Poul introduced with his last round
of optimizations. Add a check to make sure that root filesystems
are at least 20MB in size (this is just a thumbnail approximation,
and we can revise it later if necessary).
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r-- | usr.sbin/sade/label.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c index c76b629..0410186 100644 --- a/usr.sbin/sade/label.c +++ b/usr.sbin/sade/label.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: label.c,v 1.13 1995/05/21 01:56:02 phk Exp $ + * $Id: label.c,v 1.16 1995/05/21 06:12:43 phk Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -69,6 +69,8 @@ /* The smallest filesystem we're willing to create */ #define FS_MIN_SIZE 2048 +/* The smallest root filesystem we're willing to create */ +#define ROOT_MIN_SIZE 40960 /* 20MB */ /* All the chunks currently displayed on the screen */ static struct { @@ -210,6 +212,7 @@ get_mountpoint(struct chunk *old) val = msgGetInput(old && old->private ? ((PartInfo *)old->private)->mountpoint : NULL, "Please specify a mount point for the partition"); + clear(); if (!val) return NULL; @@ -261,6 +264,7 @@ get_partition_type(void) else if (!strcmp(selection, "Swap")) return PART_SWAP; } + clear(); return PART_NONE; } @@ -502,9 +506,15 @@ diskLabelEditor(char *str) } else p = NULL; - if ((flags & CHUNK_IS_ROOT) && !(label_chunk_info[here].c->flags & CHUNK_BSD_COMPAT)) { - msgConfirm("This region cannot be used for your root partition as\nthe FreeBSD boot code cannot deal with a root partition created in\nsuch a location. Please choose another location for your root\npartition and try again!"); - break; + if ((flags & CHUNK_IS_ROOT)) { + if (!(label_chunk_info[here].c->flags & CHUNK_BSD_COMPAT)) { + msgConfirm("This region cannot be used for your root partition as\nthe FreeBSD boot code cannot deal with a root partition created in\nsuch a location. Please choose another location for your root\npartition and try again!"); + break; + } + if (size < ROOT_MIN_SIZE) { + msgConfirm("This is too small a size for a root partition. For a variety of\nreasons, root partitions should be at least %dMB in size", ROOT_MIN_SIZE / 2048); + break; + } } tmp = Create_Chunk_DWIM(label_chunk_info[here].d, label_chunk_info[here].c, |