Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst When deleting all partitions (e.g. before w...



details:   https://anonhg.NetBSD.org/src/rev/fbe12784fa63
branches:  trunk
changeset: 457655:fbe12784fa63
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Jul 10 16:35:11 2019 +0000

description:
When deleting all partitions (e.g. before we use the default partition
sizes) do not kill the geometry information in the internal disklabel
copy.

diffstat:

 usr.sbin/sysinst/disklabel.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 37618df68b6f -r fbe12784fa63 usr.sbin/sysinst/disklabel.c
--- a/usr.sbin/sysinst/disklabel.c      Wed Jul 10 16:23:55 2019 +0000
+++ b/usr.sbin/sysinst/disklabel.c      Wed Jul 10 16:35:11 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disklabel.c,v 1.5 2019/06/25 07:14:45 martin Exp $     */
+/*     $NetBSD: disklabel.c,v 1.6 2019/07/10 16:35:11 martin Exp $     */
 
 /*
  * Copyright 2018 The NetBSD Foundation, Inc.
@@ -358,7 +358,7 @@
            (struct disklabel_disk_partitions*)arg;
        daddr_t total_size = parts->l.d_partitions[RAW_PART].p_size;
 
-       memset(&parts->l, 0, sizeof(parts->l));
+       memset(&parts->l.d_partitions, 0, sizeof(parts->l.d_partitions));
        parts->dp.num_part = 0;
 
 #if RAW_PART > 2



Home | Main Index | Thread Index | Old Index