Deleted Added
full compact
geom_io.c (108297) geom_io.c (109623)
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_io.c 108297 2002-12-26 21:02:50Z phk $
35 * $FreeBSD: head/sys/geom/geom_io.c 109623 2003-01-21 08:56:16Z alfred $
36 */
37
38
39#include <sys/param.h>
40#include <sys/stdint.h>
41#ifndef _KERNEL
42#include <stdio.h>
43#include <string.h>

--- 341 unchanged lines hidden (view full) ---

385 void *ptr;
386 int errorc;
387
388 bp = g_new_bio();
389 bp->bio_cmd = BIO_READ;
390 bp->bio_done = NULL;
391 bp->bio_offset = offset;
392 bp->bio_length = length;
36 */
37
38
39#include <sys/param.h>
40#include <sys/stdint.h>
41#ifndef _KERNEL
42#include <stdio.h>
43#include <string.h>

--- 341 unchanged lines hidden (view full) ---

385 void *ptr;
386 int errorc;
387
388 bp = g_new_bio();
389 bp->bio_cmd = BIO_READ;
390 bp->bio_done = NULL;
391 bp->bio_offset = offset;
392 bp->bio_length = length;
393 ptr = g_malloc(length, M_WAITOK);
393 ptr = g_malloc(length, 0);
394 bp->bio_data = ptr;
395 g_io_request(bp, cp);
396 errorc = biowait(bp, "gread");
397 if (error != NULL)
398 *error = errorc;
399 g_destroy_bio(bp);
400 if (errorc) {
401 g_free(ptr);

--- 22 unchanged lines hidden ---
394 bp->bio_data = ptr;
395 g_io_request(bp, cp);
396 errorc = biowait(bp, "gread");
397 if (error != NULL)
398 *error = errorc;
399 g_destroy_bio(bp);
400 if (errorc) {
401 g_free(ptr);

--- 22 unchanged lines hidden ---