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