1 #ifndef DOS_FILEHANDLER_H
2 #define DOS_FILEHANDLER_H
5 Copyright © 1995-2008, The AROS Development Team. All rights reserved.
8 Constants for filehandlers.
12 # include <exec/ports.h>
15 # include <exec/types.h>
18 # include <dos/bptr.h>
23 #include <dos/dosextaros.h>
26 /* Disk environment array. The size of this structure is variable.
27 de_TableSize contains the size of the structure. This structure may
28 look different for different handlers. Most of the entries are in fact
29 ULONGs or LONGs, but because every entry must have the same size, we have
30 to use IPTRs instead. */
33 IPTR de_TableSize
; /* Size of this structure. Must be at least
34 11 (DE_NUMBUFFERS). */
35 IPTR de_SizeBlock
; /* Size in longwords of a block on the disk. */
36 IPTR de_SecOrg
; /* Unused. Must be 0 for now. */
37 IPTR de_Surfaces
; /* Number of heads/surfaces in drive. */
38 IPTR de_SectorPerBlock
; /* Unused. Must be 1 for now. */
39 IPTR de_BlocksPerTrack
; /* Number of blocks on a track. */
40 IPTR de_Reserved
; /* Number of reserved blocks at beginning of
42 IPTR de_PreAlloc
; /* Number of reserved blocks at end of volume. */
44 IPTR de_LowCyl
; /* First cylinder. */
45 IPTR de_HighCyl
; /* Last cylinder. */
46 IPTR de_NumBuffers
; /* Number of buffers for drive. */
47 IPTR de_BufMemType
; /* Type of memory for buffers. See <exec/memory.h>.
49 IPTR de_MaxTransfer
; /* How many bytes may be transferred together? */
50 IPTR de_Mask
; /* Memory address mask for DMA devices. */
51 SIPTR de_BootPri
; /* Priority of Autoboot. */
52 IPTR de_DosType
; /* Type of disk. See <dos/dos.h> for definitions.
54 IPTR de_Baud
; /* Baud rate to use. */
55 IPTR de_Control
; /* Control word. */
56 IPTR de_BootBlocks
; /* Size of bootblock. */
59 /* The following constants are longword offsets, which point into a filehandler
60 structure (like the one above). For more information about the meaning
61 of these constants see the structure above. */
62 #define DE_TABLESIZE 0
63 #define DE_SIZEBLOCK 1
64 #define DE_BLOCKSIZE 2
66 #define DE_SECSPERBLOCK 4
67 #define DE_BLKSPERTRACK 5
68 #define DE_RESERVEDBLKS 6
70 #define DE_INTERLEAVE 8
73 #define DE_UPPERCYL DE_HIGHCYL
74 #define DE_NUMBUFFERS 11
75 #define DE_BUFMEMTYPE 12
76 #define DE_MEMBUFTYPE DE_BUFMEMTYPE
77 #define DE_MAXTRANSFER 13
83 #define DE_BOOTBLOCKS 19
86 /* This is the message that is passed to a file handler during startup
87 in the DeviceNode->dn_Startup field. It is not used in AROS DOS handlers
88 as they are now Device based, and the information is passed in during
89 OpenDevice(), however this needs to be stored for late opening
91 struct FileSysStartupMsg
93 ULONG fssm_Unit
; /* Unit number of device used. */
94 BSTR fssm_Device
; /* Device name. */
95 BPTR fssm_Environ
; /* Pointer to disk environment array, like the one
97 ULONG fssm_Flags
; /* Flags to be passed to OpenDevice(). */
101 /* This is an unwound version of the DosList structure defined in
102 <dos/dosextens.h>. This is the version for a DOS "device" DLT_DEVICE.
103 It is essentially the same structure as DevInfo, defined in
106 For AROS this is notably different, as filehandlers are no longer
107 DOS tasks (ie Processes), some of the fields here have no purpose
108 and are ignored. The only fields retained are the dn_Next, dn_Type,
109 dn_Startup and dn_Handler fields. */
112 /* PRIVATE pointer to next entry. In AmigaOS this used to be a BPTR. */
113 struct DosList
* dn_Next
;
114 /* Type of this node. Has to be DLT_DEVICE. */
117 struct MsgPort
* dn_Task
; /* dol_Task field */
118 BPTR dn_Lock
; /* dol_Lock field */
120 BSTR dn_Handler
; /* Null-terminated device name for handler. */
121 ULONG dn_StackSize
; /* Initial stacksize for packet-handler task */
122 LONG dn_Priority
; /* Initial priority for packet-handler task */
123 BPTR dn_Startup
; /* (struct FileSysStartupMsg *) see above */
124 BPTR dn_SegList
; /* SegList (for packet handlers) */
125 BPTR dn_GlobalVec
; /* Ignored, historic */
129 /* Private extensions
130 * Should not be used in user land code.
135 struct DosListAROSExt dn_AROS
;
139 #endif /* DOS_FILEHANDLER_H */