1/* 2 * Copyright (c) 2003 Poul-Henning Kamp. 3 * Copyright (c) 1995 Jason R. Thorpe. 4 * Copyright (c) 1990, 1993 5 * The Regents of the University of California. All rights reserved. 6 * All rights reserved. 7 * Copyright (c) 1988 University of Utah. 8 * --- 36 unchanged lines hidden (view full) --- 45 * Moffett Field, CA 94035 46 * 47 * from: Utah $Hdr: cd.c 1.6 90/11/28$ 48 * @(#)cd.c 8.2 (Berkeley) 11/16/93 49 * $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ 50 */ 51 52#include <sys/cdefs.h> |
53__FBSDID("$FreeBSD: head/sys/geom/geom_ccd.c 133314 2004-08-08 06:49:07Z phk $"); |
54 55#include <sys/param.h> 56#include <sys/systm.h> 57#include <sys/kernel.h> 58#include <sys/module.h> 59#include <sys/bio.h> 60#include <sys/malloc.h> 61#include <geom/geom.h> --- 651 unchanged lines hidden (view full) --- 713 for (i = 0; i < *nprovider; i++) { 714 sprintf(buf, "provider%d", i); 715 pp = gctl_get_provider(req, buf); 716 if (pp == NULL) 717 return; 718 } 719 720 gp = g_new_geomf(mp, "ccd%d", *unit); |
721 sc = g_malloc(sizeof *sc, M_WAITOK | M_ZERO); 722 gp->softc = sc; 723 sc->sc_ndisks = *nprovider; 724 725 /* Allocate space for the component info. */ 726 sc->sc_cinfo = g_malloc(sc->sc_ndisks * sizeof(struct ccdcinfo), 727 M_WAITOK | M_ZERO); 728 --- 126 unchanged lines hidden (view full) --- 855 gctl_error(req, "unknown verb"); 856 } 857} 858 859static struct g_class g_ccd_class = { 860 .name = "CCD", 861 .ctlreq = g_ccd_config, 862 .destroy_geom = g_ccd_destroy_geom, |
863 .start = g_ccd_start, 864 .orphan = g_ccd_orphan, 865 .access = g_ccd_access, |
866}; 867 868DECLARE_GEOM_CLASS(g_ccd_class, g_ccd); |