Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst Skip unwanted (zero sized) partitions.
details: https://anonhg.NetBSD.org/src/rev/ad546f81f3a2
branches: trunk
changeset: 464768:ad546f81f3a2
user: martin <martin%NetBSD.org@localhost>
date: Mon Oct 21 16:10:54 2019 +0000
description:
Skip unwanted (zero sized) partitions.
diffstat:
usr.sbin/sysinst/bsddisklabel.c | 4 +++-
usr.sbin/sysinst/disks.c | 5 ++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 299cc68ca0e1 -r ad546f81f3a2 usr.sbin/sysinst/bsddisklabel.c
--- a/usr.sbin/sysinst/bsddisklabel.c Mon Oct 21 16:09:59 2019 +0000
+++ b/usr.sbin/sysinst/bsddisklabel.c Mon Oct 21 16:10:54 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bsddisklabel.c,v 1.27 2019/08/28 15:19:05 martin Exp $ */
+/* $NetBSD: bsddisklabel.c,v 1.28 2019/10/21 16:10:54 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -1278,6 +1278,8 @@
for (i = 0; i < wanted->num; i++) {
if (wanted->infos[i].cur_part_id != NO_PART)
continue;
+ if (wanted->infos[i].size <= 0)
+ continue;
if (t.start == infos[i].start) {
wanted->infos[i].cur_part_id = pno;
wanted->infos[i].cur_start = infos[i].start;
diff -r 299cc68ca0e1 -r ad546f81f3a2 usr.sbin/sysinst/disks.c
--- a/usr.sbin/sysinst/disks.c Mon Oct 21 16:09:59 2019 +0000
+++ b/usr.sbin/sysinst/disks.c Mon Oct 21 16:10:54 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disks.c,v 1.52 2019/10/21 14:07:42 martin Exp $ */
+/* $NetBSD: disks.c,v 1.53 2019/10/21 16:10:54 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -1290,6 +1290,9 @@
const struct part_usage_info *ptn = &install->infos[i];
+ if (ptn->size == 0)
+ continue;
+
if (ptn->type != PT_swap &&
(ptn->instflags & PUIINST_MOUNT) == 0)
continue;
Home |
Main Index |
Thread Index |
Old Index