summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-02-26 23:11:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-02-26 23:11:58 +0000
commite2c63c296f65c8d711f9e7d00c027d70fb2d6caa (patch)
treef94c0c0cd92edfdd30c5303a6672d08c512ab19e /sys/arch/sparc
parentb23d90dda0b0cbcbc55eb94009168c538e625a7a (diff)
when we build a vendor label for writing, clear the memory supplied by the
buffer cache first, so that all sorts of gibble doesn't end up on the disk. ok kettenis (for the sparc/sparc64 ones, at least)
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/sparc/disksubr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/sparc/sparc/disksubr.c b/sys/arch/sparc/sparc/disksubr.c
index 94aa419edf0..6513768187b 100644
--- a/sys/arch/sparc/sparc/disksubr.c
+++ b/sys/arch/sparc/sparc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.82 2009/08/13 15:23:11 deraadt Exp $ */
+/* $OpenBSD: disksubr.c,v 1.83 2010/02/26 23:11:57 deraadt Exp $ */
/* $NetBSD: disksubr.c,v 1.16 1996/04/28 20:25:59 thorpej Exp $ */
/*
@@ -406,6 +406,7 @@ disklabel_bsd_to_sun(struct disklabel *lp, struct sun_disklabel *sl)
return (EINVAL);
/* Format conversion. */
+ bzero(sl, sizeof(*sl));
memcpy(sl->sl_text, lp->d_packname, sizeof(lp->d_packname));
sl->sl_rpm = lp->d_rpm;
sl->sl_pcylinders = lp->d_ncylinders + lp->d_acylinders; /* XXX */