When allocating partitions via sysinstall, upon creating the 25th entry, a Signal 11 is generated. How-To-Repeat: Create 25 partitions in sysinstall.
Responsible Changed From-To: freebsd-bugs->murray sysinstall problems seem to go to murray
Responsible Changed From-To: murray->eric Eric is working on our installer tools now.
Responsible Changed From-To: eric->freebsd-qa assign idle sysinstall bugs to freebsd-qa, as suggested by murray
The following patch does two things, in addition to solving the problem above: 1. Do not allow the creation of more slices than allowed by the target architecture (4 on i386, 16 on PC98). 2. Advise the user, upon creation of the last slice, that they will waste space unless they use the maximum available size. Index: disks.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/sysinstall/disks.c,v retrieving revision 1.130 diff -u -p -r1.130 disks.c --- disks.c 2002/03/28 08:23:33 1.130 +++ disks.c 2002/04/09 04:45:34 @@ -54,8 +54,8 @@ enum size_units_t { UNIT_BLOCKS, UNIT_KI #define CHUNK_START_ROW 5 /* Where we keep track of MBR chunks */ -static struct chunk *chunk_info[16]; -static int current_chunk; +static struct chunk *chunk_info[NDOSPART + 1]; +static int current_chunk, num_chunks; static void diskPartitionNonInteractive(Device *dev); static u_char * bootalloc(char *name, size_t *size); @@ -64,22 +64,21 @@ static void record_chunks(Disk *d) { struct chunk *c1 = NULL; - int i = 0; int last_free = 0; if (!d->chunks) msgFatal("No chunk list found for %s!", d->name); - for (c1 = d->chunks->part; c1; c1 = c1->next) { + for (num_chunks = 0, c1 = d->chunks->part; c1 && num_chunks < NDOSPART; c1 = c1->next) { if (c1->type == unused && c1->size > last_free) { last_free = c1->size; - current_chunk = i; + current_chunk = num_chunks; } - chunk_info[i++] = c1; + chunk_info[num_chunks++] = c1; } - chunk_info[i] = NULL; - if (current_chunk >= i) - current_chunk = i - 1; + chunk_info[num_chunks] = NULL; + if (current_chunk >= num_chunks) + current_chunk = num_chunks - 1; } static int Total; @@ -410,14 +409,24 @@ diskPartition(Device *dev) int subtype; chunk_e partitiontype; #endif - snprintf(tmp, 20, "%lu", chunk_info[current_chunk]->size); - val = msgGetInput(tmp, "Please specify the size for new FreeBSD slice in blocks\n" - "or append a trailing `M' for megabytes (e.g. 20M)."); - if (val && (size = strtol(val, &cp, 0)) > 0) { - if (*cp && toupper(*cp) == 'M') - size *= ONE_MEG; - else if (*cp && toupper(*cp) == 'G') - size *= ONE_GIG; + size = -1; + if (current_chunk == (NDOSPART - 1) && + !msgYesNo("This is the last slice available. Would you like to\n" + "create it using the maximum available size, to avoid wasting\n" + "space?")) + size = chunk_info[current_chunk]->size; + else { + snprintf(tmp, 20, "%lu", chunk_info[current_chunk]->size); + val = msgGetInput(tmp, "Please specify the size for new FreeBSD slice in blocks\n" + "or append a trailing `M' for megabytes (e.g. 20M)."); + if (val && (size = strtol(val, &cp, 0)) > 0) { + if (*cp && toupper(*cp) == 'M') + size *= ONE_MEG; + else if (*cp && toupper(*cp) == 'G') + size *= ONE_GIG; + } + } + if (size > 0) { #ifdef PC98 Create_Chunk(d, chunk_info[current_chunk]->offset, size, freebsd, 3, -- || Seth Kingsley || sethk@meowfishies.com || || http://www.meowfishies.com/ | Meow ^_^ ||
Responsible Changed From-To: freebsd-qa->qa Use short names for mailing list to make searches using the web query form work with the shown responsible. This also makes open PRs show up in the summery mail.
This is still an issue on 7.0: sysinstall doesn't limit the number of partitions you can create but segfaults soon after too many have been created. -- Bruce
Responsible Changed From-To: freebsd-bugs->randi 11 years later, the bug still exists. Taking this. :)
Responsible Changed From-To: randi->freebsd-sysinstall back to mailing list.
sysinstall has been replaced by bsdinstall in FreeBSD 9.x. Closing.