From 43b3502499f593d85fcabe98e9c4ac1038ed2614 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sun, 17 May 2009 01:06:57 +0000 Subject: Initialize mountpoints[] when going past again:, since a smaller alloc table will have fewer mountpoints and the extras cause confusion. And any info from '/etc/fstab' that was loaded into mountpoints needs to be zapped too. Noticed by jim@ --- sbin/disklabel/editor.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sbin') diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index c42544a636c..3093058a0c1 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.209 2009/05/13 17:02:46 deraadt Exp $ */ +/* $OpenBSD: editor.c,v 1.210 2009/05/17 01:06:56 krw Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller @@ -17,7 +17,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: editor.c,v 1.209 2009/05/13 17:02:46 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: editor.c,v 1.210 2009/05/17 01:06:56 krw Exp $"; #endif /* not lint */ #include @@ -530,6 +530,10 @@ editor_allocspace(struct disklabel *lp_org) cylsecs = lp_org->d_secpercyl; again: lp = &label; + for (i=0; id_npartitions = MAXPARTITIONS; lastalloc = alloc_table[index].sz; -- cgit v1.2.3