1 #ifndef DOS_DOSTAGS_H 2 #define DOS_DOSTAGS_H 3 4 /* 5 dos tag definitions (V50) 6 7 Copyright © 2002 The MorphOS Development Team, All Rights Reserved. 8 */ 9 10 #ifndef UTILITY_TAGITEM_H 11 # include <utility/tagitem.h> 12 #endif 13 14 15 #define SYS_Dummy (TAG_USER + 32) 16 #define SYS_Input (SYS_Dummy + 1) 17 #define SYS_Output (SYS_Dummy + 2) 18 #define SYS_Asynch (SYS_Dummy + 3) 19 #define SYS_UserShell (SYS_Dummy + 4) 20 #define SYS_CustomShell (SYS_Dummy + 5) 21 22 /*** V50 ***/ 23 24 #define SYS_FilterTags (SYS_Dummy + 6) /* filters the tags passed down to CreateNewProc(), default: TRUE */ 25 26 27 #define NP_Dummy (TAG_USER + 1000) 28 #define NP_Seglist (NP_Dummy + 1) 29 #define NP_FreeSeglist (NP_Dummy + 2) 30 #define NP_Entry (NP_Dummy + 3) 31 #define NP_Input (NP_Dummy + 4) 32 #define NP_Output (NP_Dummy + 5) 33 #define NP_CloseInput (NP_Dummy + 6) 34 #define NP_CloseOutput (NP_Dummy + 7) 35 #define NP_Error (NP_Dummy + 8) 36 #define NP_CloseError (NP_Dummy + 9) 37 #define NP_CurrentDir (NP_Dummy + 10) 38 #define NP_StackSize (NP_Dummy + 11) 39 #define NP_Name (NP_Dummy + 12) 40 #define NP_Priority (NP_Dummy + 13) 41 #define NP_ConsoleTask (NP_Dummy + 14) 42 #define NP_WindowPtr (NP_Dummy + 15) 43 #define NP_HomeDir (NP_Dummy + 16) 44 #define NP_CopyVars (NP_Dummy + 17) 45 #define NP_Cli (NP_Dummy + 18) 46 #define NP_Path (NP_Dummy + 19) 47 #define NP_CommandName (NP_Dummy + 20) 48 #define NP_Arguments (NP_Dummy + 21) 49 50 #define NP_NotifyOnDeath (NP_Dummy + 22) 51 #define NP_Synchronous (NP_Dummy + 23) 52 #define NP_ExitCode (NP_Dummy + 24) 53 #define NP_ExitData (NP_Dummy + 25) 54 55 /*** V50 ***/ 56 57 #define NP_SeglistArray (NP_Dummy + 26) 58 #define NP_UserData (NP_Dummy + 27) 59 #define NP_StartupMsg (NP_Dummy + 28) /* struct Message *, ReplyMsg'd at exit */ 60 #define NP_TaskMsgPort (NP_Dummy + 29) /* struct MsgPort **, create MsgPort, automagic delete */ 61 #define NP_TaskFlags (NP_Dummy + 30) /* UBYTE of initial task tc_Flags */ 62 63 #define NP_CodeType (NP_Dummy + 100) 64 #define NP_PPC_Arg1 (NP_Dummy + 101) 65 #define NP_PPC_Arg2 (NP_Dummy + 102) 66 #define NP_PPC_Arg3 (NP_Dummy + 103) 67 #define NP_PPC_Arg4 (NP_Dummy + 104) 68 #define NP_PPC_Arg5 (NP_Dummy + 105) 69 #define NP_PPC_Arg6 (NP_Dummy + 106) 70 #define NP_PPC_Arg7 (NP_Dummy + 107) 71 #define NP_PPC_Arg8 (NP_Dummy + 108) 72 #define NP_PPCStackSize (NP_Dummy + 109) 73 74 75 #define ADO_Dummy (TAG_USER + 2000) 76 #define ADO_FH_Mode (ADO_Dummy + 1) 77 78 #define ADO_DirLen (ADO_Dummy + 2) 79 #define ADO_CommNameLen (ADO_Dummy + 3) 80 #define ADO_CommFileLen (ADO_Dummy + 4) 81 #define ADO_PromptLen (ADO_Dummy + 5) 82 #define ADO_CLI_Dir (ADO_Dummy + 20) /* BSTR (fixed) */ 83 #define ADO_CLI_CommName (ADO_Dummy + 21) /* BSTR (fixed) */ 84 #define ADO_CLI_CommFile (ADO_Dummy + 22) /* BSTR (fixed) */ 85 #define ADO_CLI_Prompt (ADO_Dummy + 23) /* BSTR (fixed) */ 86 #define ADO_CLI_Result2 (ADO_Dummy + 24) /* LONG */ 87 #define ADO_CLI_ReturnCode (ADO_Dummy + 25) /* LONG */ 88 #define ADO_CLI_FailLevel (ADO_Dummy + 26) /* LONG */ 89 #define ADO_CLI_Interactive (ADO_Dummy + 27) /* LONG */ 90 #define ADO_CLI_Background (ADO_Dummy + 28) /* LONG */ 91 #define ADO_CLI_DefaultStack (ADO_Dummy + 29) /* LONG */ 92 93 /* DOS_DEVICENODE tags */ 94 95 #define ADO_DN_Name (ADO_Dummy + 30) /* BSTR */ 96 #define ADO_DN_MsgPort (ADO_Dummy + 31) /* struct MsgPort* */ 97 #define ADO_DN_Lock (ADO_Dummy + 32) /* BPTR */ 98 #define ADO_DN_Handler (ADO_Dummy + 33) /* BSTR */ 99 #define ADO_DN_Seglist (ADO_Dummy + 34) /* BPTR */ 100 #define ADO_DN_StackSize (ADO_Dummy + 35) /* ULONG Default: 4096 */ 101 #define ADO_DN_Priority (ADO_Dummy + 36) /* LONG */ 102 #define ADO_DN_Startup (ADO_Dummy + 37) /* BSTR */ 103 #define ADO_DN_GlobalVec (ADO_Dummy + 38) /* BPTR */ 104 /* 105 * Only for new devicenodes created by AllocDosObject() 106 */ 107 #define ADO_DN_SerialID (ADO_Dummy + 39) /* BPTR */ 108 /* 109 * Value < 0x100 as startup argument 110 */ 111 #define ADO_DN_StartupValue (ADO_Dummy + 40) /* ULONG */ 112 /* 113 * New (dos.lib 51.40+) tags 114 */ 115 #define ADO_DN_Flags (ADO_Dummy + 41) /* ULONG */ 116 #define ADO_DN_Status (ADO_Dummy + 42) /* ULONG */ 117 #define ADO_DN_ExitNotifyMsg (ADO_Dummy + 43) /* struct Msg* */ 118 119 /* Run handler only once, do not reload after exit */ 120 #define DNF_STARTONCE (1 << 0) 121 /* Free handler seglist after handler exit */ 122 #define DNF_UNLOADSEGLIST (1 << 1) 123 /* Remove doslist entry after handler exit */ 124 #define DNF_REMDOSLIST (1 << 2) 125 126 /* 127 * Do not depend on a positive result here to retrieve 128 * other ADO_FSSM tags. It's only here for information 129 * dump purposes. It doesn't mean that future DeviceNode's 130 * would keep it. 131 * Only useful for GetDosObjectAttr() 132 */ 133 #define ADO_FSSM (ADO_Dummy + 50) /* struct FileSysStartupMsg* */ 134 #define ADO_FSSM_Device (ADO_Dummy + 51) /* BSTR */ 135 #define ADO_FSSM_Unit (ADO_Dummy + 52) /* ULONG */ 136 #define ADO_FSSM_Flags (ADO_Dummy + 53) /* ULONG */ 137 138 /* 139 * Do not depend on a positive result here to retrieve 140 * other ADO_DE tags. It's only here for information 141 * dump purposes. It doesn't mean that future DeviceNode's 142 * would keep it. 143 * Only useful for GetDosObjectAttr() 144 */ 145 #define ADO_DE (ADO_Dummy + 60) /* struct DosEnvec* */ 146 #define ADO_DE_TableSize (ADO_Dummy + 61) /* ULONG Default: DE_BOOTBLOCKS */ 147 #define ADO_DE_SizeBlock (ADO_Dummy + 62) /* ULONG Default: 512 */ 148 #define ADO_DE_SecOrg (ADO_Dummy + 63) /* ULONG */ 149 #define ADO_DE_NumHeads (ADO_Dummy + 64) /* ULONG */ 150 #define ADO_DE_Surfaces ADO_DE_NumHeads 151 #define ADO_DE_SecsPerBlk (ADO_Dummy + 65) /* ULONG Default: 1 */ 152 #define ADO_DE_BlksPerTrack (ADO_Dummy + 66) /* ULONG */ 153 #define ADO_DE_ReservedBlks (ADO_Dummy + 67) /* ULONG */ 154 #define ADO_DE_PreFac (ADO_Dummy + 68) /* ULONG */ 155 #define ADO_DE_PreAlloc ADO_DE_PreFac 156 #define ADO_DE_Interleave (ADO_Dummy + 69) /* ULONG */ 157 #define ADO_DE_LowCyl (ADO_Dummy + 70) /* ULONG */ 158 #define ADO_DE_UpperCyl (ADO_Dummy + 71) /* ULONG */ 159 #define ADO_DE_HighCyl ADO_DE_UpperCyl 160 #define ADO_DE_NumBuffers (ADO_Dummy + 72) /* ULONG */ 161 #define ADO_DE_BufMemType (ADO_Dummy + 73) /* ULONG */ 162 #define ADO_DE_MaxTransfer (ADO_Dummy + 74) /* ULONG Default: 0xffffffff */ 163 #define ADO_DE_Mask (ADO_Dummy + 75) /* ULONG Default: 0xffffffff */ 164 #define ADO_DE_BootPri (ADO_Dummy + 76) /* LONG */ 165 #define ADO_DE_DosType (ADO_Dummy + 77) /* ULONG */ 166 #define ADO_DE_Baud (ADO_Dummy + 78) /* ULONG */ 167 #define ADO_DE_Control (ADO_Dummy + 79) /* BSTR */ 168 #define ADO_DE_BootBlocks (ADO_Dummy + 80) /* ULONG */ 169 170 /* 171 * Used by AllocDosObject's FSContext creation to find the 172 * right filesystem's seglist with the dostype through Query. 173 * So you either define a seglist by ADO_DN_Seglist or let 174 * dos search it by the DosType. 175 * 176 * Don't mix this up with ADO_DE_DosType 177 */ 178 #define ADO_FS_DosType (ADO_Dummy + 90) /* ULONG */ 179 180 #define ADO_VN_Name (ADO_Dummy + 100) /* BSTR */ 181 #define ADO_VN_MsgPort (ADO_Dummy + 101) /* struct MsgPort* */ 182 #define ADO_VN_Lock (ADO_Dummy + 102) /* BPTR */ 183 #define ADO_VN_LockList (ADO_Dummy + 103) /* struct Lock* */ 184 #define ADO_VN_Date (ADO_Dummy + 104) /* struct DateStamp* */ 185 #define ADO_VN_DiskType (ADO_Dummy + 105) /* ULONG */ 186 187 188 #define ADO_AN_Name (ADO_Dummy + 120) /* BSTR */ 189 #define ADO_AN_MsgPort (ADO_Dummy + 121) /* struct MsgPort* */ 190 #define ADO_AN_Lock (ADO_Dummy + 122) /* BPTR */ 191 #define ADO_AN_Type (ADO_Dummy + 123) /* ULONG */ 192 #define ADO_AN_AssignName (ADO_Dummy + 124) /* char* */ 193 #define ADO_AN_AssignList (ADO_Dummy + 125) /* struct AssignList* */ 194 195 196 197 /* GetDosObjectAttr() uses this to store variable size entries. 198 * 199 * BSTR 200 * 201 * To query size of the buffer required for the string, set 202 * dab_Ptr to NULL. After the call dab_Len will contain the 203 * required size, including the terminating 0. 204 * 205 * To get the string set dab_Ptr to point to buffer of dab_Len 206 * bytes. The resulting string is always 0-terminated, even 207 * if the string is truncated. 208 */ 209 struct DosAttrBuffer 210 { 211 APTR dab_Ptr; 212 ULONG dab_Len; 213 }; 214 215 216 /*** V50 ***/ 217 218 #define ADDS_Dummy (TAG_USER + 3000) 219 #define ADDS_Name (ADDS_Dummy + 1) /* Segment name */ 220 #define ADDS_Seglist (ADDS_Dummy + 2) /* Seglist for this segment */ 221 #define ADDS_Filename (ADDS_Dummy + 3) /* Name of the file to load when needed. Ignored if Seglist is given. */ 222 #define ADDS_Type (ADDS_Dummy + 4) /* Segment type */ 223 224 #define FNDS_Dummy (TAG_USER + 3100) 225 #define FNDS_Name (FNDS_Dummy + 1) /* Segment name */ 226 #define FNDS_From (FNDS_Dummy + 2) /* Segment to start from */ 227 #define FNDS_System (FNDS_Dummy + 3) /* Look for a system segment ? */ 228 #define FNDS_Load (FNDS_Dummy + 4) /* Load the seglist if needed ? (Default: TRUE) */ 229 #define FNDS_MatchPattern (FNDS_Dummy + 5) /* Pattern to match segment name against, from ParsePatternNoCase (dos 50.69) */ 230 231 /*** V51 ***/ 232 233 #define FSCONTEXTTAG_Dummy (TAG_USER + 3200) 234 /* 235 * Pass a custom handler seglist. This handler MUST be able 236 * to handle the fscontext filesystem extension 237 */ 238 #define FSCONTEXTTAG_SEGLIST (FSCONTEXTTAG_Dummy + 0x1) 239 #define FSCONTEXTTAG_PRIORITY (FSCONTEXTTAG_Dummy + 0x2) 240 #define FSCONTEXTTAG_STACKSIZE (FSCONTEXTTAG_Dummy + 0x3) 241 #define FSCONTEXTTAG_STARTUPSTRING (FSCONTEXTTAG_Dummy + 0x4) 242 #define FSCONTEXTTAG_STARTUPVALUE (FSCONTEXTTAG_Dummy + 0x5) 243 #define FSCONTEXTTAG_FSSM (FSCONTEXTTAG_Dummy + 0x6) 244 /* 245 * A matching filesystem is searched through query.library 246 */ 247 #define FSCONTEXTTAG_DOSTYPE (FSCONTEXTTAG_Dummy + 0x7) 248 249 #define FSCONTEXTINFOTAG_Dummy (TAG_USER + 3300) 250 #define FSCONTEXTINFOTAG_NAME (FSCONTEXTINFOTAG_Dummy + 0x1) 251 252 #define SEGLISTTAG_Dummy (TAG_USER + 3400) 253 /* 254 * return the ObjData object when it exists or NULL. 255 */ 256 #define SEGLISTTAG_OBJDATA (SEGLISTTAG_Dummy + 0x1) 257 /* 258 * return the seglist type, one of SEGLISTTYPE_*. 259 * 260 * V51.52 261 */ 262 #define SEGLISTTAG_SEGLISTTYPE (SEGLISTTAG_Dummy + 0x2) 263 264 #define SEGLISTTYPE_ELF 1 265 #define SEGLISTTYPE_POWERUP 2 266 #define SEGLISTTYPE_AMIGA 3 267 268 /* 269 * specify that segment index is the hunk number, starting from 0. 270 * 271 * V51.52 272 */ 273 #define SEGLISTTAG_DOS_SEGINDEX (SEGLISTTAG_Dummy + 0x3) 274 275 /* 276 * specify that the segment index is the elf segment number, 277 * starting from 1. 278 * 279 * V51.52 280 */ 281 #define SEGLISTTAG_ELF_SEGINDEX (SEGLISTTAG_Dummy + 0x4) 282 /* 283 * return segment start address for segment specified by 284 * either SEGLISTTAG_DOS_SEGINDEX or SEGLISTTAG_ELF_SEGINDEX. 285 * note that SEGLISTTAG_ELF_SEGINDEX segments might return a 286 * NULL pointer, so be prepared for this. 287 * 288 * V51.52 289 */ 290 #define SEGLISTTAG_SEGSTART (SEGLISTTAG_Dummy + 0x5) 291 /* 292 * return segment data size for segment specified by 293 * either SEGLISTTAG_DOS_SEGINDEX or SEGLISTTAG_ELF_SEGINDEX. 294 * 295 * V51.52 296 */ 297 #define SEGLISTTAG_SEGSIZE (SEGLISTTAG_Dummy + 0x6) 298 /* 299 * return ELF segment type (ELF SHT_*). Only applicable for ELF. 300 * 301 * V51.54 302 */ 303 #define SEGLISTTAG_ELF_SEGTYPE (SEGLISTTAG_Dummy + 0x7) 304 /* 305 * return ELF segment file offset. Only applicable for ELF. 306 * 307 * V51.54 308 */ 309 #define SEGLISTTAG_ELF_SEGOFFSET (SEGLISTTAG_Dummy + 0x8) 310 /* 311 * return ELF segment flags. Meaning depends on segment type. 312 * Refer to ELF documentation for details. Only applicable for ELF. 313 * 314 * V51.54 315 */ 316 #define SEGLISTTAG_ELF_SEGFLAGS (SEGLISTTAG_Dummy + 0x9) 317 /* 318 * return ELF segment alignment. 0 and 1 mean unaligned. 319 * Only applicable for ELF. 320 * 321 * V51.54 322 */ 323 #define SEGLISTTAG_ELF_SEGADDRALIGN (SEGLISTTAG_Dummy + 0xa) 324 /* 325 * return ELF segname name. Only applicable for ELF. 326 * 327 * V51.54 328 */ 329 #define SEGLISTTAG_ELF_SEGNAME (SEGLISTTAG_Dummy + 0xb) 330 331 332 /* 333 * QueryCLIDataTagList tags (V51.51) 334 */ 335 #define CLIDATATAG_Dummy (TAG_USER + 3500) 336 /* 337 * Return only CLI matching the given CLI number (returns 0 or 1 entries) 338 */ 339 #define CLIDATATAG_CLINumber (CLIDATATAG_Dummy + 0x1) 340 /* 341 * Return only CLIs matching the given command (0 to n entries possible) 342 */ 343 #define CLIDATATAG_CommandName (CLIDATATAG_Dummy + 0x2) 344 /* 345 * When ti_Data is TRUE, return results sorted by CLI number 346 * (default to FALSE) 347 */ 348 #define CLIDATATAG_Sorted (CLIDATATAG_Dummy + 0x3) 349 350 351 /* 352 * Examine64/ExNext64/ExamineFH64 tags 353 */ 354 #define EX64TAG_Dummy (TAG_USER + 3600) 355 /* 356 * Whether Examine64/ExNext64/ExamineFH64 should attempt to fill 357 * fib_PosixDate. fib_ActExtFlags will have FIBEXTF_POSIXDATE set if 358 * fib_PosixDate is actually available. 359 */ 360 #define EX64TAG_PosixDate (EX64TAG_Dummy + 0x1) 361 362 #endif /* DOS_DOSTAGS_H */