grub2: bring back build of aros-side grub2 tools
[AROS.git] / rom / filesys / afs / afsblocks.h
blob802fe2e13796b3e6a76302157ff6da2c104fed9a
1 #ifndef AFSBLOCKS_H
2 #define AFSBLOCKS_H
4 /*
5 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
6 $Id$
7 */
9 #define T_SHORT 2
10 #define T_DATA 8
11 #define T_LIST 16
13 #define MAX_NAME_LENGTH 31
14 #define MAX_COMMENT_LENGTH 91
16 #define BLOCK_SIZE(volume) (volume->SizeBlock*4)
18 //all T_SHORT entries
19 #define BLK_PRIMARY_TYPE 0
20 #define BLK_CHECKSUM 5
21 #define BLK_TABLE_START 6
22 #define BLK_TABLE_END(volume) (volume->SizeBlock-51)
23 #define BLK_SECONDARY_TYPE(volume) (volume->SizeBlock-1)
25 // rootblock entries
26 #define BLK_TABLE_SIZE 3
27 #define BLK_BITMAP_VALID_FLAG(volume) (volume->SizeBlock-50)
28 #define BLK_BITMAP_POINTERS_START(volume) (volume->SizeBlock-49)
29 #define BLK_BITMAP_POINTERS_END(volume) (volume->SizeBlock-25)
30 #define BLK_BITMAP_EXTENSION(volume) (volume->SizeBlock-24)
31 #define BLK_ROOT_DAYS(volume) (volume->SizeBlock-23)
32 #define BLK_ROOT_MINS(volume) (volume->SizeBlock-22)
33 #define BLK_ROOT_TICKS(volume) (volume->SizeBlock-21)
34 #define BLK_DISKNAME_START(volume) (volume->SizeBlock-20)
35 #define BLK_DISKNAME_END(volume) (volume->SizeBlock-13)
36 #define BLK_VOLUME_DAYS(volume) (volume->SizeBlock-10)
37 #define BLK_VOLUME_MINS(volume) (volume->SizeBlock-9)
38 #define BLK_VOLUME_TICKS(volume) (volume->SizeBlock-8)
39 #define BLK_CREATION_DAYS(volume) (volume->SizeBlock-7)
40 #define BLK_CREATION_MINS(volume) (volume->SizeBlock-6)
41 #define BLK_CREATION_TICKS(volume) (volume->SizeBlock-5)
43 //file and directory entries
44 #define BLK_OWN_KEY 1
45 #define BLK_OWNER(volume) (volume->SizeBlock-49)
46 #define BLK_PROTECT(volume) (volume->SizeBlock-48)
47 #define BLK_COMMENT_START(volume) (volume->SizeBlock-46)
48 #define BLK_COMMENT_END(volume) (volume->SizeBlock-24)
49 #define BLK_DAYS(volume) (volume->SizeBlock-23)
50 #define BLK_MINS(volume) (volume->SizeBlock-22)
51 #define BLK_TICKS(volume) (volume->SizeBlock-21)
52 #define BLK_LINKCHAIN(volume) (volume->SizeBlock-10)
53 #define BLK_HASHCHAIN(volume) (volume->SizeBlock-4)
54 #define BLK_PARENT(volume) (volume->SizeBlock-3)
56 //directory entries
57 #define BLK_DIRECTORYNAME_START(volume) (volume->SizeBlock-20)
58 #define BLK_DIRECTORYNAME_END(volume) (volume->SizeBlock-13)
60 //file entries
61 #define BLK_BLOCK_COUNT 2
62 #define BLK_FIRST_DATA 4
63 #define BLK_BYTE_SIZE(volume) (volume->SizeBlock-47)
64 #define BLK_FILENAME_START(volume) (volume->SizeBlock-20)
65 #define BLK_FILENAME_END(volume) (volume->SizeBlock-13)
66 #define BLK_EXTENSION(volume) (volume->SizeBlock-2)
68 //data blocks OFS
69 #define BLK_HEADER_KEY 1
70 #define BLK_SEQUENCE_NUMBER 2
71 #define BLK_DATA_SIZE 3
72 #define BLK_NEXT_DATA 4
73 #define BLK_DATA_START 6
75 //hardlinks
76 #define BLK_HARDLINKNAME_START(volume) (volume->SizeBlock-20)
77 #define BLK_HARDLINKNAME_END(volume) (volume->SizeBlock-13)
78 #define BLK_ORIGINAL(volume) (volume->SizeBlock-11)
80 //softlinks
81 #define BLK_SYMBOLICNAME_START 6
82 #define BLK_SYMBOLICNAME_END(volume) (volume->SizeBlock-51)
83 #define BLK_SOFTLINKNAME_START(volume) (volume->SizeBlock-20)
84 #define BLK_SOFTLINKNAME_END(volume) (volume->SizeBlock-13)
86 #endif