1 | /*␊ |
2 | * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.␊ |
3 | *␊ |
4 | * ␊ |
5 | * This file contains Original Code and/or Modifications of Original Code␊ |
6 | * as defined in and that are subject to the Apple Public Source License␊ |
7 | * Version 2.0 (the 'License'). You may not use this file except in␊ |
8 | * compliance with the License. Please obtain a copy of the License at␊ |
9 | * http://www.opensource.apple.com/apsl/ and read it before using this␊ |
10 | * file.␊ |
11 | * ␊ |
12 | * The Original Code and all software distributed under the License are␊ |
13 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
16 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.␊ |
17 | * Please see the License for the specific language governing rights and␊ |
18 | * limitations under the License.␊ |
19 | * ␊ |
20 | * Copyright (c) 1997 Tobias Weingartner␊ |
21 | * All rights reserved.␊ |
22 | *␊ |
23 | * Redistribution and use in source and binary forms, with or without␊ |
24 | * modification, are permitted provided that the following conditions␊ |
25 | * are met:␊ |
26 | * 1. Redistributions of source code must retain the above copyright␊ |
27 | * notice, this list of conditions and the following disclaimer.␊ |
28 | * 2. Redistributions in binary form must reproduce the above copyright␊ |
29 | * notice, this list of conditions and the following disclaimer in the␊ |
30 | * documentation and/or other materials provided with the distribution.␊ |
31 | * 3. All advertising materials mentioning features or use of this software␊ |
32 | * must display the following acknowledgement:␊ |
33 | * This product includes software developed by Tobias Weingartner.␊ |
34 | * 4. The name of the author may not be used to endorse or promote products␊ |
35 | * derived from this software without specific prior written permission.␊ |
36 | *␊ |
37 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR␊ |
38 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES␊ |
39 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.␊ |
40 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,␊ |
41 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT␊ |
42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,␊ |
43 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY␊ |
44 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT␊ |
45 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF␊ |
46 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.␊ |
47 | */␊ |
48 | ␊ |
49 | #ifndef _PART_H␊ |
50 | #define _PART_H␊ |
51 | ␊ |
52 | /* Partition type */␊ |
53 | typedef struct _prt_t {␊ |
54 | ␉int shead, scyl, ssect;␊ |
55 | ␉int ehead, ecyl, esect;␊ |
56 | ␉int bs;␊ |
57 | ␉int ns;␊ |
58 | ␉unsigned char flag;␊ |
59 | ␉unsigned char id;␊ |
60 | } prt_t;␊ |
61 | ␊ |
62 | /* Prototypes */␊ |
63 | void␉PRT_printall __P((void));␊ |
64 | const char *PRT_ascii_id __P((int));␊ |
65 | void PRT_parse __P((disk_t *, void *, off_t, off_t, prt_t *, int));␊ |
66 | void PRT_make __P((prt_t *, off_t, off_t, void *));␊ |
67 | void PRT_print __P((int, prt_t *));␊ |
68 | ␊ |
69 | /* This does CHS -> bs/ns */␊ |
70 | void PRT_fix_BN __P((disk_t *, prt_t *, int));␊ |
71 | ␊ |
72 | /* This does bs/ns -> CHS */␊ |
73 | void PRT_fix_CHS __P((disk_t *, prt_t *, int));␊ |
74 | #endif /* _PART_H */␊ |
75 | ␊ |
76 | |