Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Memset disklabel area to zero before beginning when ...
details: https://anonhg.NetBSD.org/src/rev/88bb0ff0b98b
branches: trunk
changeset: 540502:88bb0ff0b98b
user: elric <elric%NetBSD.org@localhost>
date: Tue Dec 17 01:55:44 2002 +0000
description:
Memset disklabel area to zero before beginning when constructing default
labels. Problem noticed and tested by dan@.
diffstat:
sys/dev/dksubr.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (18 lines):
diff -r 23aa4d89d485 -r 88bb0ff0b98b sys/dev/dksubr.c
--- a/sys/dev/dksubr.c Tue Dec 17 01:17:44 2002 +0000
+++ b/sys/dev/dksubr.c Tue Dec 17 01:55:44 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dksubr.c,v 1.3 2002/10/12 22:43:25 elric Exp $ */
+/* $NetBSD: dksubr.c,v 1.4 2002/12/17 01:55:44 elric Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 1999, 2002 The NetBSD Foundation, Inc.
@@ -409,6 +409,8 @@
{
struct dk_geom *pdg = &dksc->sc_geom;
+ memset(lp, 0, sizeof(*lp));
+
lp->d_secperunit = dksc->sc_size;
lp->d_secsize = pdg->pdg_secsize;
lp->d_nsectors = pdg->pdg_nsectors;
Home |
Main Index |
Thread Index |
Old Index