geom_disk.c (112367) | geom_disk.c (112476) |
---|---|
1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 18 unchanged lines hidden (view full) --- 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * | 1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 18 unchanged lines hidden (view full) --- 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * |
35 * $FreeBSD: head/sys/geom/geom_disk.c 112367 2003-03-18 08:45:25Z phk $ | 35 * $FreeBSD: head/sys/geom/geom_disk.c 112476 2003-03-21 22:05:33Z phk $ |
36 */ 37 38#include "opt_geom.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/kernel.h> 43#include <sys/sysctl.h> --- 4 unchanged lines hidden (view full) --- 48#include <sys/malloc.h> 49#include <sys/sysctl.h> 50#include <sys/devicestat.h> 51#include <machine/md_var.h> 52 53#include <sys/lock.h> 54#include <sys/mutex.h> 55#include <geom/geom.h> | 36 */ 37 38#include "opt_geom.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/kernel.h> 43#include <sys/sysctl.h> --- 4 unchanged lines hidden (view full) --- 48#include <sys/malloc.h> 49#include <sys/sysctl.h> 50#include <sys/devicestat.h> 51#include <machine/md_var.h> 52 53#include <sys/lock.h> 54#include <sys/mutex.h> 55#include <geom/geom.h> |
56#include <geom/geom_int.h> |
|
56 57static struct mtx g_disk_done_mtx; 58 59static g_access_t g_disk_access; 60 61struct g_class g_disk_class = { 62 "DISK", 63 NULL, --- 183 unchanged lines hidden (view full) --- 247 if (g_handleattr_int(bp, "GEOM::fwsectors", dp->d_fwsectors)) 248 break; 249 else if (g_handleattr_int(bp, "GEOM::fwheads", dp->d_fwheads)) 250 break; 251 else if (g_handleattr_off_t(bp, "GEOM::frontstuff", 0)) 252 break; 253 else if (!strcmp(bp->bio_attribute, "GEOM::kerneldump")) 254 g_disk_kerneldump(bp, dp); | 57 58static struct mtx g_disk_done_mtx; 59 60static g_access_t g_disk_access; 61 62struct g_class g_disk_class = { 63 "DISK", 64 NULL, --- 183 unchanged lines hidden (view full) --- 248 if (g_handleattr_int(bp, "GEOM::fwsectors", dp->d_fwsectors)) 249 break; 250 else if (g_handleattr_int(bp, "GEOM::fwheads", dp->d_fwheads)) 251 break; 252 else if (g_handleattr_off_t(bp, "GEOM::frontstuff", 0)) 253 break; 254 else if (!strcmp(bp->bio_attribute, "GEOM::kerneldump")) 255 g_disk_kerneldump(bp, dp); |
255 else if ((dp->d_ioctl != NULL) && | 256 else if ((g_debugflags & G_F_DISKIOCTL) && 257 (dp->d_ioctl != NULL) && |
256 !strcmp(bp->bio_attribute, "GEOM::ioctl") && 257 bp->bio_length == sizeof *gio) { 258 gio = (struct g_ioctl *)bp->bio_data; 259 gio->dev = dp; 260 gio->func = (d_ioctl_t *)(dp->d_ioctl); 261 error = EDIRIOCTL; 262 } else 263 error = ENOIOCTL; --- 127 unchanged lines hidden --- | 258 !strcmp(bp->bio_attribute, "GEOM::ioctl") && 259 bp->bio_length == sizeof *gio) { 260 gio = (struct g_ioctl *)bp->bio_data; 261 gio->dev = dp; 262 gio->func = (d_ioctl_t *)(dp->d_ioctl); 263 error = EDIRIOCTL; 264 } else 265 error = ENOIOCTL; --- 127 unchanged lines hidden --- |