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_slice.c 95038 2002-04-19 09:24:12Z phk $ |
36 */ 37 38 39#include <sys/param.h> 40#ifndef _KERNEL 41#include <stdio.h> 42#include <unistd.h> 43#include <stdlib.h> --- 124 unchanged lines hidden (view full) --- 168 t -= gsl->offset; 169 if (t < 0) 170 t = 0; 171 if (t > gsl->length) 172 t = gsl->length; 173 g_haveattr_off_t(bp, "GEOM::frontstuff", t); 174 return; 175 } |
176 if (!strcmp("GEOM::kerneldump", bp->bio_attribute)) { 177 struct g_kerneldump *gkd; 178 179 gkd = (struct g_kerneldump *)bp->bio_data; 180 gkd->offset += gsp->slices[index].offset; 181 if (gkd->length > gsp->slices[index].length) 182 gkd->length = gsp->slices[index].length; 183 /* now, pass it on downwards... */ 184 } |
185 bp2 = g_clone_bio(bp); 186 bp2->bio_done = g_std_done; 187 g_io_request(bp2, cp); 188 break; 189 default: 190 bp->bio_error = EOPNOTSUPP; 191 g_io_deliver(bp); 192 return; --- 116 unchanged lines hidden --- |