summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
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/sparc64
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/sparc64')
-rw-r--r--sys/arch/sparc64/sparc64/disksubr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/sparc64/sparc64/disksubr.c b/sys/arch/sparc64/sparc64/disksubr.c
index 50b1d0508f0..58d977d54e0 100644
--- a/sys/arch/sparc64/sparc64/disksubr.c
+++ b/sys/arch/sparc64/sparc64/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.57 2009/08/13 15:23:11 deraadt Exp $ */
+/* $OpenBSD: disksubr.c,v 1.58 2010/02/26 23:11:57 deraadt Exp $ */
/* $NetBSD: disksubr.c,v 1.13 2000/12/17 22:39:18 pk Exp $ */
/*
@@ -399,6 +399,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 */