2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
6 #include <proto/exec.h>
9 #include <resources/filesysres.h>
11 static void checkpatch(struct FileSysEntry
*fse
, UBYTE patchid
)
13 printf ("%c ", (fse
->fse_PatchFlags
& (1 << patchid
)) ? '*' : ' ');
16 int main(int argc
, char **argv
)
18 struct FileSysResource
*fsr
;
20 fsr
= OpenResource(FSRNAME
);
23 struct FileSysEntry
*fse
;
26 printf("FileSysResource at %p\n", fsr
);
27 printf("Creator: '%s'\n", fsr
->fsr_Creator
);
30 ForeachNode(&fsr
->fsr_FileSysEntries
, fse
)
35 printf("FileSysEntry %d at %p\n", cnt
++, fse
);
36 for (i
= 0; i
< 4; i
++)
38 dostype
[i
] = (fse
->fse_DosType
>> ((3 - i
) * 8)) & 0xff;
41 else if (dostype
[i
] < 32)
45 printf("DOSType : %08lx (%s)\n", (unsigned long)fse
->fse_DosType
, dostype
);
46 printf("Version : %08lx (%d.%d)\n", (unsigned long)fse
->fse_Version
, (int)(fse
->fse_Version
>> 16), (int)(fse
->fse_Version
& 0xffff));
47 printf("PatchFlags : %08lx\n", (unsigned long)fse
->fse_PatchFlags
);
48 checkpatch(fse
, FSEB_TYPE
);
49 printf("Type : %08lx\n", (unsigned long)fse
->fse_Type
);
50 checkpatch(fse
, FSEB_TASK
);
51 printf("Task : %p\n", (void *)fse
->fse_Task
);
52 checkpatch(fse
, FSEB_LOCK
);
53 printf("Lock : %p\n", (APTR
)fse
->fse_Lock
);
54 checkpatch(fse
, FSEB_HANDLER
);
55 printf("Handler : %p (%s)\n", (APTR
)fse
->fse_Handler
, AROS_BSTR_ADDR(fse
->fse_Handler
));
56 checkpatch(fse
, FSEB_STACKSIZE
);
57 printf("StackSize : %u\n", (unsigned int)fse
->fse_StackSize
);
58 checkpatch(fse
, FSEB_PRIORITY
);
59 printf("Priority : %d\n", (int)fse
->fse_Priority
);
60 checkpatch(fse
, FSEB_STARTUP
);
61 printf("Startup : %p\n", (APTR
)fse
->fse_Startup
);
62 checkpatch(fse
, FSEB_SEGLIST
);
63 printf("SegList : %p\n", (APTR
)fse
->fse_SegList
);
64 checkpatch(fse
, FSEB_GLOBALVEC
);
65 printf("GlobalVec : %ld\n", (long)fse
->fse_GlobalVec
);
69 printf("FileSystem.resource failed to open!\n");