geom_disk.c (b4b138c27f9f250fa0ce955de65761501559c328) | geom_disk.c (7da1ebfd74cbe823b3cfeb634781e510df6773a5) |
---|---|
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 --- 39 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> | 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 --- 39 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 --- |