apm.h revision 179747
18876Srgrimes/*-
24Srgrimes * Copyright (c) 2007 Marcel Moolenaar
34Srgrimes * All rights reserved.
44Srgrimes *
58876Srgrimes * Redistribution and use in source and binary forms, with or without
64Srgrimes * modification, are permitted provided that the following conditions
74Srgrimes * are met:
84Srgrimes *
94Srgrimes * 1. Redistributions of source code must retain the above copyright
104Srgrimes *    notice, this list of conditions and the following disclaimer.
118876Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
128876Srgrimes *    notice, this list of conditions and the following disclaimer in the
134Srgrimes *    documentation and/or other materials provided with the distribution.
144Srgrimes *
158876Srgrimes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
164Srgrimes * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
178876Srgrimes * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
184Srgrimes * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
194Srgrimes * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
204Srgrimes * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
214Srgrimes * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
228876Srgrimes * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
234Srgrimes * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
244Srgrimes * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
254Srgrimes *
2650477Speter * $FreeBSD: head/sys/sys/apm.h 179747 2008-06-12 04:37:37Z marcel $
274Srgrimes */
28623Srgrimes
294Srgrimes#ifndef _SYS_APM_H_
304Srgrimes#define	_SYS_APM_H_
314Srgrimes
324Srgrimes/* Driver Descriptor Record. */
334Srgrimesstruct apm_ddr {
342056Swollman	uint16_t	ddr_sig;
3533296Sbde#define	APM_DDR_SIG		0x4552
3676166Smarkm	uint16_t	ddr_blksize;
3776166Smarkm	uint32_t	ddr_blkcount;
3812734Sbde};
3912662Sdg
4012662Sdg#define	APM_ENT_NAMELEN		32
4112662Sdg#define	APM_ENT_TYPELEN		32
4212734Sbde
432056Swollman/* Partition Map Entry Record. */
444Srgrimesstruct apm_ent {
454Srgrimes	uint16_t	ent_sig;
464Srgrimes#define	APM_ENT_SIG		0x504d
474Srgrimes	uint16_t	_pad_;
484Srgrimes	uint32_t	ent_pmblkcnt;
494Srgrimes	uint32_t	ent_start;
5012515Sphk	uint32_t	ent_size;
514Srgrimes	char		ent_name[APM_ENT_NAMELEN];
524Srgrimes	char		ent_type[APM_ENT_TYPELEN];
5312720Sphk};
5412515Sphk
5512515Sphk#define	APM_ENT_TYPE_SELF		"Apple_partition_map"
5612515Sphk#define	APM_ENT_TYPE_UNUSED		"Apple_Free"
574Srgrimes
5812515Sphk#define	APM_ENT_TYPE_FREEBSD		"FreeBSD"
5912515Sphk#define	APM_ENT_TYPE_FREEBSD_SWAP	"FreeBSD-swap"
6012515Sphk#define	APM_ENT_TYPE_FREEBSD_UFS	"FreeBSD-UFS"
6112515Sphk#define	APM_ENT_TYPE_FREEBSD_VINUM	"FreeBSD-Vinum"
6212515Sphk#define	APM_ENT_TYPE_FREEBSD_ZFS	"FreeBSD-ZFS"
6312515Sphk
6412515Sphk#define	APM_ENT_TYPE_APPLE_HFS		"Apple_HFS"
6512515Sphk
6612515Sphk#endif /* _SYS_APM_H_ */
6712515Sphk