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 --- 20 unchanged lines hidden (view full) --- 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 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: head/sys/geom/geom_dev.c 219950 2011-03-24 08:37:48Z mav $"); |
38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/malloc.h> 42#include <sys/kernel.h> 43#include <sys/conf.h> 44#include <sys/bio.h> 45#include <sys/lock.h> --- 238 unchanged lines hidden (view full) --- 284 set_dumper(NULL); 285 error = 0; 286 break; 287 } 288 kd.offset = 0; 289 kd.length = OFF_MAX; 290 i = sizeof kd; 291 error = g_io_getattr("GEOM::kerneldump", cp, &i, &kd); |
292 if (!error) { 293 error = set_dumper(&kd.di); 294 if (!error) 295 dev->si_flags |= SI_DUMPDEV; 296 } |
297 break; 298 case DIOCGFLUSH: 299 error = g_io_flush(cp); 300 break; 301 case DIOCGDELETE: 302 offset = ((off_t *)data)[0]; 303 length = ((off_t *)data)[1]; 304 if ((offset % cp->provider->sectorsize) != 0 || --- 159 unchanged lines hidden --- |