libparted 3.6
Loading...
Searching...
No Matches
amiga.h
Go to the documentation of this file.
1/*
2 util.h -- amiga partition table headers.
3 Copyright (C) 1998-2000, 2007, 2009-2014, 2019-2023 Free Software
4 Foundation, Inc.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
21 uint32_t pb_ID; /* Identifier 32 bit word : 'PART' */
22 uint32_t pb_SummedLongs; /* Size of the structure for checksums */
23 int32_t pb_ChkSum; /* Checksum of the structure */
24 uint32_t pb_HostID; /* SCSI Target ID of host, not really used */
25 uint32_t pb_Next; /* Block number of the next PartitionBlock */
26 uint32_t pb_Flags; /* Part Flags (NOMOUNT and BOOTABLE) */
27 uint32_t pb_Reserved1[2];
28 uint32_t pb_DevFlags; /* Preferred flags for OpenDevice */
29 uint8_t pb_DriveName[32]; /* Preferred DOS device name: BSTR form */
30 uint32_t pb_Reserved2[15];
31 uint32_t de_TableSize; /* Size of Environment vector */
32 uint32_t de_SizeBlock; /* Size of the blocks in 32 bit words, usually 128 */
33 uint32_t de_SecOrg; /* Not used; must be 0 */
34 uint32_t de_Surfaces; /* Number of heads (surfaces) */
35 uint32_t de_SectorPerBlock; /* Disk sectors per block, used with SizeBlock, usually 1 */
36 uint32_t de_BlocksPerTrack; /* Blocks per track. drive specific */
37 uint32_t de_Reserved; /* DOS reserved blocks at start of partition. */
38 uint32_t de_PreAlloc; /* DOS reserved blocks at end of partition */
39 uint32_t de_Interleave; /* Not used, usually 0 */
40 uint32_t de_LowCyl; /* First cylinder of the partition */
41 uint32_t de_HighCyl; /* Last cylinder of the partition */
42 uint32_t de_NumBuffers; /* Initial # DOS of buffers. */
43 uint32_t de_BufMemType; /* Type of mem to allocate for buffers */
44 uint32_t de_MaxTransfer; /* Max number of bytes to transfer at a time */
45 uint32_t de_Mask; /* Address Mask to block out certain memory */
46 int32_t de_BootPri; /* Boot priority for autoboot */
47 uint32_t de_DosType; /* Dostype of the file system */
48 uint32_t de_Baud; /* Baud rate for serial handler */
49 uint32_t de_Control; /* Control word for handler/filesystem */
50 uint32_t de_BootBlocks; /* Number of blocks containing boot code */
51 uint32_t pb_EReserved[12];
52};
53
54#define PART(pos) ((struct PartitionBlock *)(pos))
55
56#define PBFB_BOOTABLE 0 /* this partition is intended to be bootable */
57#define PBFF_BOOTABLE 1L /* (expected directories and files exist) */
58#define PBFB_NOMOUNT 1 /* do not mount this partition (e.g. manually */
59#define PBFF_NOMOUNT 2L /* mounted, but space reserved here) */
60
61struct PartitionBlock * amiga_find_part (PedGeometry *geom, struct PartitionBlock *part);
62
63struct AmigaIds {
64 uint32_t ID;
65 struct AmigaIds *next;
66};
67
68struct AmigaIds * _amiga_add_id (uint32_t id, struct AmigaIds *ids);
69void _amiga_free_ids (struct AmigaIds *ids);
70int _amiga_id_in_list (uint32_t id, struct AmigaIds *ids) _GL_ATTRIBUTE_PURE;
struct AmigaIds * _amiga_add_id(uint32_t id, struct AmigaIds *ids)
Definition: amiga.c:67
int _amiga_id_in_list(uint32_t id, struct AmigaIds *ids) _GL_ATTRIBUTE_PURE
Definition: amiga.c:90
struct PartitionBlock * amiga_find_part(PedGeometry *geom, struct PartitionBlock *part)
Definition: amiga.c:266
void _amiga_free_ids(struct AmigaIds *ids)
Definition: amiga.c:81
Definition: amiga.h:63
uint32_t ID
Definition: amiga.h:64
struct AmigaIds * next
Definition: amiga.h:65
Definition: amiga.h:20
uint32_t de_MaxTransfer
Definition: amiga.h:44
uint32_t de_Reserved
Definition: amiga.h:37
uint32_t de_Control
Definition: amiga.h:49
uint32_t de_Mask
Definition: amiga.h:45
uint32_t de_Interleave
Definition: amiga.h:39
uint32_t pb_ID
Definition: amiga.h:21
uint32_t de_BufMemType
Definition: amiga.h:43
uint32_t de_SecOrg
Definition: amiga.h:33
uint32_t de_SizeBlock
Definition: amiga.h:32
uint32_t de_BlocksPerTrack
Definition: amiga.h:36
uint32_t de_NumBuffers
Definition: amiga.h:42
uint32_t de_TableSize
Definition: amiga.h:31
int32_t de_BootPri
Definition: amiga.h:46
int32_t pb_ChkSum
Definition: amiga.h:23
uint32_t de_DosType
Definition: amiga.h:47
uint8_t pb_DriveName[32]
Definition: amiga.h:29
uint32_t pb_Next
Definition: amiga.h:25
uint32_t pb_Reserved1[2]
Definition: amiga.h:27
uint32_t de_Baud
Definition: amiga.h:48
uint32_t de_BootBlocks
Definition: amiga.h:50
uint32_t de_HighCyl
Definition: amiga.h:41
uint32_t pb_Reserved2[15]
Definition: amiga.h:30
uint32_t de_SectorPerBlock
Definition: amiga.h:35
uint32_t de_PreAlloc
Definition: amiga.h:38
uint32_t pb_EReserved[12]
Definition: amiga.h:51
uint32_t pb_Flags
Definition: amiga.h:26
uint32_t pb_DevFlags
Definition: amiga.h:28
uint32_t pb_SummedLongs
Definition: amiga.h:22
uint32_t de_Surfaces
Definition: amiga.h:34
uint32_t pb_HostID
Definition: amiga.h:24
uint32_t de_LowCyl
Definition: amiga.h:40
Geometry of the partition.
Definition: geom.h:35