Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/dev/ccd.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/dev/ccd.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.102.2.1 retrieving revision 1.102.2.2 diff -u -p -r1.102.2.1 -r1.102.2.2 --- src/sys/dev/ccd.c 2005/04/06 11:57:27 1.102.2.1 +++ src/sys/dev/ccd.c 2006/02/20 15:26:49 1.102.2.2 @@ -1,4 +1,4 @@ -/* $NetBSD: ccd.c,v 1.102.2.1 2005/04/06 11:57:27 tron Exp $ */ +/* $NetBSD: ccd.c,v 1.102.2.2 2006/02/20 15:26:49 tron Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999 The NetBSD Foundation, Inc. @@ -125,7 +125,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.102.2.1 2005/04/06 11:57:27 tron Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.102.2.2 2006/02/20 15:26:49 tron Exp $"); #include #include @@ -222,9 +222,10 @@ const struct cdevsw ccd_cdevsw = { static void printiinfo(struct ccdiinfo *); #endif -/* Non-private for the benefit of libkvm. */ -struct ccd_softc *ccd_softc; -int numccd = 0; +/* Publically visible for the benefit of libkvm and ccdconfig(8). */ +struct ccd_softc *ccd_softc; +const int ccd_softc_elemsize = sizeof(struct ccd_softc); +int numccd = 0; /* * Called by main() during pseudo-device attachment. All we need @@ -243,7 +244,7 @@ ccdattach(int num) return; } - ccd_softc = (struct ccd_softc *)malloc(num * sizeof(struct ccd_softc), + ccd_softc = (struct ccd_softc *)malloc(num * ccd_softc_elemsize, M_DEVBUF, M_NOWAIT|M_ZERO); if (ccd_softc == NULL) { printf("WARNING: no memory for concatenated disks\n");