1213136Spjd/*-
2213136Spjd * Copyright (c) 2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3213136Spjd * All rights reserved.
4213136Spjd *
5213136Spjd * Redistribution and use in source and binary forms, with or without
6213136Spjd * modification, are permitted provided that the following conditions
7213136Spjd * are met:
8213136Spjd * 1. Redistributions of source code must retain the above copyright
9213136Spjd *    notice, this list of conditions and the following disclaimer.
10213136Spjd * 2. Redistributions in binary form must reproduce the above copyright
11213136Spjd *    notice, this list of conditions and the following disclaimer in the
12213136Spjd *    documentation and/or other materials provided with the distribution.
13213136Spjd *
14213136Spjd * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
15213136Spjd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16213136Spjd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17213136Spjd * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
18213136Spjd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19213136Spjd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20213136Spjd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21213136Spjd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22213136Spjd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23213136Spjd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24213136Spjd * SUCH DAMAGE.
25213136Spjd *
26213136Spjd * $FreeBSD: stable/10/sys/boot/i386/common/drv.h 308915 2016-11-21 10:14:36Z avg $
27213136Spjd */
28213136Spjd
29213136Spjd#ifndef _DRV_H_
30213136Spjd#define _DRV_H_
31213136Spjd
32213136Spjdstruct dsk {
33213136Spjd	unsigned int drive;
34213136Spjd	unsigned int type;
35213136Spjd	unsigned int unit;
36213136Spjd	unsigned int slice;
37213136Spjd	int part;
38213136Spjd	daddr_t start;
39213136Spjd	int init;
40213136Spjd};
41213136Spjd
42213136Spjdint drvread(struct dsk *dskp, void *buf, daddr_t lba, unsigned nblk);
43308915Savg#if defined(GPT) || defined(ZFS)
44213136Spjdint drvwrite(struct dsk *dskp, void *buf, daddr_t lba, unsigned nblk);
45213136Spjduint64_t drvsize(struct dsk *dskp);
46308915Savg#endif	/* GPT || ZFS */
47213136Spjd
48213136Spjd#endif	/* !_DRV_H_ */
49