Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/sysinst If we can not fit a planned partition, retr...



details:   https://anonhg.NetBSD.org/src/rev/ddd85ba5c2a2
branches:  trunk
changeset: 453070:ddd85ba5c2a2
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Aug 01 17:50:16 2019 +0000

description:
If we can not fit a planned partition, retry with a bit more slope
in size.

diffstat:

 usr.sbin/sysinst/bsddisklabel.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 2f45093f378b -r ddd85ba5c2a2 usr.sbin/sysinst/bsddisklabel.c
--- a/usr.sbin/sysinst/bsddisklabel.c   Thu Aug 01 17:49:12 2019 +0000
+++ b/usr.sbin/sysinst/bsddisklabel.c   Thu Aug 01 17:50:16 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bsddisklabel.c,v 1.25 2019/08/01 17:49:12 martin Exp $ */
+/*     $NetBSD: bsddisklabel.c,v 1.26 2019/08/01 17:50:16 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1424,8 +1424,12 @@
                        continue;
 
                size_t cnt = wanted->parts->pscheme->get_free_spaces(
-                   wanted->parts, &space, 1, want->size-2*align, align, from,
+                   wanted->parts, &space, 1, want->size-align, align, from,
                    -1);
+               if (cnt == 0)
+                       cnt = wanted->parts->pscheme->get_free_spaces(
+                           wanted->parts, &space, 1,
+                           want->size-5*align, align, from, -1);
 
                if (cnt == 0)
                        continue;       /* no free space for this partition */



Home | Main Index | Thread Index | Old Index