From c810fc4ce2b1a86ccda999bf5fa65f27a4ac5a4c Mon Sep 17 00:00:00 2001 From: otto Date: Wed, 23 Apr 2014 11:49:25 +0000 Subject: [PATCH] don't clear label before readasciilabel(), it will not fill in some required fields like disk size, causing consistency check failures. with and ok krw@ --- sbin/disklabel/disklabel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index 495a36cda7e..a567876d0e8 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.c,v 1.193 2014/03/18 22:36:30 miod Exp $ */ +/* $OpenBSD: disklabel.c,v 1.194 2014/04/23 11:49:25 otto Exp $ */ /* * Copyright (c) 1987, 1993 @@ -838,7 +838,6 @@ edit(struct disklabel *lp, int f) ending_sector = DL_GETBEND(&label); starting_sector = DL_GETBSTART(&label); total_sectors = DL_GETDSIZE(&label); - memset(&label, 0, sizeof(label)); error = getasciilabel(fp, &label); DL_SETBEND(&label, ending_sector); DL_SETBSTART(&label, starting_sector); -- 2.20.1