libc: make stdio_impl.h an internal libc header
[unleashed/tickless.git] / include / sys / dktp / altsctr.h
blob7d8fc0b44bad677af46b1c28cbef52410fd5b765
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
28 /* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
29 /* All Rights Reserved */
32 * (c) Copyright INTERACTIVE Systems Corporation 1986, 1988, 1990
33 * All rights reserved.
36 #ifndef _SYS_DKTP_ALTSCTR_H
37 #define _SYS_DKTP_ALTSCTR_H
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
43 /* alternate sector partition information table */
44 struct alts_parttbl {
45 uint32_t alts_sanity; /* to validate correctness */
46 uint32_t alts_version; /* version number */
47 uint32_t alts_map_base; /* disk offset of alts_partmap */
48 uint32_t alts_map_len; /* byte length of alts_partmap */
49 uint32_t alts_ent_base; /* disk offset of alts_entry */
50 uint32_t alts_ent_used; /* number of alternate entries used */
51 uint32_t alts_ent_end; /* disk offset of top of alts_entry */
52 uint32_t alts_resv_base; /* disk offset of alts_reserved */
53 uint32_t alts_pad[5]; /* reserved fields */
56 /* alternate sector remap entry table */
57 struct alts_ent {
58 uint32_t bad_start; /* starting bad sector number */
59 uint32_t bad_end; /* ending bad sector number */
60 uint32_t good_start; /* starting alternate sector to use */
63 /* size of alternate partition table structure */
64 #define ALTS_PARTTBL_SIZE sizeof (struct alts_parttbl)
65 /* size of alternate entry table structure */
66 #define ALTS_ENT_SIZE sizeof (struct alts_ent)
68 /* definition for alternate sector partition sector map */
69 #define ALTS_GOOD 0 /* good alternate sectors */
70 #define ALTS_BAD 1 /* bad alternate sectors */
72 /* definition for alternate sector partition id */
73 #define ALTS_SANITY 0xaabbccdd /* magic number to validate alts_part */
74 #define ALTS_VERSION1 0x01 /* version of alts_parttbl */
76 #define ALTS_ENT_EMPTY -1 /* empty alternate entry */
77 #define ALTS_MAP_UP 1 /* search forward with increasing sect# */
78 #define ALTS_MAP_DOWN -1 /* search backward with decreasing sect# */
80 #ifdef __cplusplus
82 #endif
84 #endif /* _SYS_DKTP_ALTSCTR_H */