Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Fix 32/64 bit int truncation issue.
details: https://anonhg.NetBSD.org/src/rev/61e2ef9f29ca
branches: trunk
changeset: 779451:61e2ef9f29ca
user: elric <elric%NetBSD.org@localhost>
date: Tue May 29 10:20:33 2012 +0000
description:
Fix 32/64 bit int truncation issue.
diffstat:
sys/dev/dksubr.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (29 lines):
diff -r 747917ff8fa4 -r 61e2ef9f29ca sys/dev/dksubr.c
--- a/sys/dev/dksubr.c Tue May 29 00:33:04 2012 +0000
+++ b/sys/dev/dksubr.c Tue May 29 10:20:33 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dksubr.c,v 1.44 2012/05/25 14:25:39 elric Exp $ */
+/* $NetBSD: dksubr.c,v 1.45 2012/05/29 10:20:33 elric Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.44 2012/05/25 14:25:39 elric Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dksubr.c,v 1.45 2012/05/29 10:20:33 elric Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -635,9 +635,7 @@
geom = prop_dictionary_create();
- prop_dictionary_set_uint64(geom, "sectors-per-unit",
- dksc->sc_geom.pdg_nsectors * dksc->sc_geom.pdg_ntracks *
- dksc->sc_geom.pdg_ncylinders);
+ prop_dictionary_set_uint64(geom, "sectors-per-unit", dksc->sc_size);
prop_dictionary_set_uint32(geom, "sector-size",
dksc->sc_geom.pdg_secsize);
Home |
Main Index |
Thread Index |
Old Index