Let the right reset entry point jump to the currently wrong entry point
[openhackware.git] / src / libpart / libpart.h
bloba982b8f29f23e7bcad5405d01593ba1cc73ea30e
1 /*
2 * <libpart.h>
4 * Open Hack'Ware BIOS partitions management definitions
5 *
6 * Copyright (c) 2004-2005 Jocelyn Mayer
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License V2
10 * as published by the Free Software Foundation
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #if !defined (__OHW_LIBPART_H__)
23 #define __OHW_LIBPART_H__
25 /* LBA for IDE is 48 bits long.
26 * For now, I'll use 32 bits to store bloc nr
27 * and 32 bits to store offsets in blocs and will only handle LBA 28.
28 * So, I'll be affected with the well known 128 GB disk barrier bug...
31 struct part_t {
32 bloc_device_t *bd;
33 int partnum;
34 uint32_t start; /* Partition first bloc */
35 uint32_t size; /* Partition size, in blocs */
36 uint32_t spb;
37 uint32_t bps;
38 uint32_t flags;
40 uint32_t bloc_size; /* Bloc size (may be != bd->seclen) */
41 /* XXX: broken: to be reworked */
42 pos_t boot_start; /* Boot program start bloc & offset */
43 pos_t boot_size; /* Boot program size */
44 uint32_t boot_load; /* Boot program address load */
45 uint32_t boot_entry; /* Boot program entry point */
47 unsigned char *name;
48 inode_t *boot_file;
49 fs_t *fs;
51 void *private;
53 part_t *next;
54 part_t *bnext;
57 int part_register (bloc_device_t *bd, part_t *partition,
58 const unsigned char *name, int partnum);
59 void part_set_blocsize (bloc_device_t *bd, part_t *part, uint32_t blocsize);
60 void part_private_set (part_t *part, void *private);
61 void *part_private_get (part_t *part);
63 part_t *PREP_find_partition (bloc_device_t *bd);
64 part_t *Apple_probe_partitions (bloc_device_t *bd);
65 part_t *isofs_probe_partitions (bloc_device_t *bd);
67 #endif /* !defined (__OHW_LIBPART_H__) */