Rev 80 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | pj | 1 | /* |
2 | * Project: S.Ha.R.K. |
||
3 | * |
||
4 | * Coordinators: |
||
5 | * Giorgio Buttazzo <giorgio@sssup.it> |
||
6 | * Paolo Gai <pj@gandalf.sssup.it> |
||
7 | * |
||
8 | * Authors : |
||
9 | * Paolo Gai <pj@gandalf.sssup.it> |
||
10 | * Massimiliano Giorgi <massy@gandalf.sssup.it> |
||
11 | * Luca Abeni <luca@gandalf.sssup.it> |
||
12 | * (see the web pages for full authors list) |
||
13 | * |
||
14 | * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy) |
||
15 | * |
||
16 | * http://www.sssup.it |
||
17 | * http://retis.sssup.it |
||
18 | * http://shark.sssup.it |
||
19 | */ |
||
20 | |||
21 | |||
22 | /* |
||
23 | * Copyright (C) 1999 Massimiliano Giorgi |
||
24 | * |
||
25 | * This program is free software; you can redistribute it and/or modify |
||
26 | * it under the terms of the GNU General Public License as published by |
||
27 | * the Free Software Foundation; either version 2 of the License, or |
||
28 | * (at your option) any later version. |
||
29 | * |
||
30 | * This program is distributed in the hope that it will be useful, |
||
31 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
32 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
33 | * GNU General Public License for more details. |
||
34 | * |
||
35 | * You should have received a copy of the GNU General Public License |
||
36 | * along with this program; if not, write to the Free Software |
||
37 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
38 | * |
||
39 | */ |
||
40 | |||
41 | /* |
||
80 | pj | 42 | * CVS : $Id: lodsk.h,v 1.2 2003-03-13 13:43:13 pj Exp $ |
2 | pj | 43 | * |
44 | * File: $File$ |
||
80 | pj | 45 | * Revision: $Revision: 1.2 $ |
46 | * Last update: $Date: 2003-03-13 13:43:13 $ |
||
2 | pj | 47 | */ |
48 | |||
49 | #ifndef __LODSK_H__ |
||
50 | #define __LODSK_H__ |
||
51 | |||
52 | #include "glue.h" |
||
1689 | fabio | 53 | #include <arch/sys/cdefs.h> |
2 | pj | 54 | |
80 | pj | 55 | __BEGIN_DECLS |
56 | |||
2 | pj | 57 | #define MSDOS_LABEL_MAGIC 0xAA55 |
58 | |||
59 | struct phpartition { |
||
60 | __uint8_t boot_ind; |
||
61 | __uint8_t st_h; |
||
62 | __uint8_t st_s; |
||
63 | __uint8_t st_c; |
||
64 | __uint8_t sys_ind; |
||
65 | __uint8_t en_h; |
||
66 | __uint8_t en_s; |
||
67 | __uint8_t en_c; |
||
68 | __uint32_t rel_sect; |
||
69 | __uint32_t nr_sects; |
||
70 | } __attribute__((packed)); |
||
71 | |||
72 | struct partition { |
||
73 | __uint8_t boot_ind:1; |
||
74 | __uint8_t sys_ind; |
||
75 | __uint16_t st_cyl; |
||
76 | __uint8_t st_head; |
||
77 | __uint8_t st_sect; |
||
78 | __uint16_t en_cyl; |
||
79 | __uint8_t en_head; |
||
80 | __uint8_t en_sect; |
||
81 | __uint32_t rel_sect; |
||
82 | __uint32_t nr_sects; |
||
83 | }; |
||
84 | |||
85 | #define MAXLODSKNAME 8 |
||
86 | |||
87 | struct lodskinfo { |
||
88 | __uint8_t fs_ind; |
||
89 | __blkcnt_t start; |
||
90 | __blkcnt_t size; |
||
91 | }; |
||
92 | |||
93 | typedef int (*lodsk_callback_func)(int,struct lodskinfo*,void *); |
||
94 | |||
95 | int lodsk_scan(__dev_t device, lodsk_callback_func func, |
||
96 | void *data, int showinfo, char *lname); |
||
80 | pj | 97 | |
98 | __END_DECLS |
||
2 | pj | 99 | #endif |