5 Copyright © 2003-2012, The AROS Development Team. All rights reserved.
9 #include <devices/trackdisk.h>
10 #include <dos/filehandler.h>
11 #include <utility/tagitem.h>
12 #include <exec/lists.h>
13 #include <exec/nodes.h>
14 #include <exec/types.h>
15 #include <exec/ports.h>
17 struct PartitionTableInfo
23 struct PartitionBlockDevice
26 struct IOExtTD
*ioreq
;
31 struct PartitionTableHandler
34 struct List list
; /* list of partitions */
35 void *handler
; /* the handler which handles this partition table */
36 void *data
; /* private field for the table */
39 struct PartitionHandle
42 struct PartitionHandle
*root
; /* root partition handle */
43 struct PartitionBlockDevice
*bd
; /* block device info */
45 struct PartitionTableHandler
*table
;
46 void *data
; /* a private field for the partition */
47 struct DriveGeometry dg
; /* geometry of whole partition */
48 struct DosEnvec de
; /* info about HD/partition including */
49 /* position within root->dg */
50 /* (de_Surfaces==root->dg.Heads,...!!!) */
60 /* partition table types */
61 #define PHPTT_UNKNOWN (0)
68 //nothing defined here ...
70 /* commands for DoPartition() */
72 /* Tags for partition tables */
73 #define PTT_TYPE (TAG_USER | 1L) /* ULONG - partition table type */
74 #define PTT_MAXLEADIN (TAG_USER | 3L) /* ULONG - maximum number of
75 reserved blocks that may be need to precede a partition for metadata */
76 #define PTT_RESERVED (TAG_USER | 32L) /* ULONG - number of reserved blocks at
77 begining of a partition table */
78 #define PTT_MAX_PARTITIONS (TAG_USER | 33L) /* ULONG - max number of partitions in table */
79 #define PTT_STARTBLOCK (TAG_USER | 34L) /* ULONG - Absolute number of starting block of this logical disk */
82 /* Tags for partitions */
83 #define PT_GEOMETRY (TAG_USER | 1L) /* struct DriveGeometry * - geometry of partition */
84 #define PT_DOSENVEC (TAG_USER | 2L) /* struct DosEnvec * - partition layout info */
85 #define PT_TYPE (TAG_USER | 3L) /* struct PartitionType * - type of partition */
86 #define PT_LEADIN (TAG_USER | 4L) /* ULONG - number of reserved blocks
87 preceding partition for metadata */
88 #define PT_POSITION (TAG_USER | 32L) /* ULONG - 1st partition, 2nd ... (Linux: hdX0, hdX1, ... */
89 #define PT_ACTIVE (TAG_USER | 33L) /* BOOL - MBR: set/get partition as active */
90 #define PT_NAME (TAG_USER | 34L) /* STRPTR - name of partition */
91 #define PT_BOOTABLE (TAG_USER | 35L) /* BOOL - partition is bootable */
92 #define PT_AUTOMOUNT (TAG_USER | 36L) /* BOOL - partition will be auto mounted */
93 #define PT_STARTBLOCK (TAG_USER | 37L) /* UQUAD - Number of partition's start block */
94 #define PT_ENDBLOCK (TAG_USER | 38L) /* UQUAD - Number of partition's end block */
96 /* Tags for filesystems */
97 #define FST_ID (TAG_USER | 1L) /* ULONG - filesystem ID */
98 #define FST_NAME (TAG_USER | 2L) /* STRPTR - filesystem name */
99 #define FST_FSENTRY (TAG_USER | 3L) /* struct FileSysEntry * - fill in FileSysEntry */
100 #define FST_VERSION (TAG_USER | 4L) /* ULONG - version number */
104 struct PartitionAttribute
110 /* are attributes readable/writeable */
111 #define PLAM_READ (1<<0)
112 #define PLAM_WRITE (1<<1)
114 /* Obsolete definitions. Don't use them in new code. */
115 #define PTTA_DONE TAG_DONE
116 #define PTTA_TYPE PTT_TYPE
117 #define PTTA_MAXLEADIN PTT_MAXLEADIN
118 #define PTTA_RESERVED PTT_RESERVED
119 #define PTTA_MAX_PARTITIONS PTT_MAX_PARTITIONS
121 #define PTA_DONE TAG_DONE
122 #define PTA_GEOMETRY PT_GEOMETRY
123 #define PTA_DOSENVEC PT_DOSENVEC
124 #define PTA_LEADIN PT_LEADIN
125 #define PTA_TYPE PT_TYPE
126 #define PTA_POSITION PT_POSITION
127 #define PTA_ACTIVE PT_ACTIVE
128 #define PTA_NAME PT_NAME
129 #define PTA_BOOTABLE PT_BOOTABLE
130 #define PTA_AUTOMOUNT PT_AUTOMOUNT
135 struct PartitionTableInfo
**tables
;
138 #endif /* PARTITION_H */