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