|
|
| version 1.4, 2025/04/08 14:39:21 | version 1.5, 2025/04/08 16:46:11 |
|---|---|
| Line 24 | Line 24 |
| * along with FreeM. If not, see <https://www.gnu.org/licenses/>. | * along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
| * | * |
| * $Log$ | * $Log$ |
| * Revision 1.5 2025/04/08 16:46:11 snw | |
| * Add global file header and offsets | |
| * | |
| * Revision 1.4 2025/04/08 14:39:21 snw | * Revision 1.4 2025/04/08 14:39:21 snw |
| * Initial work on global handler refactor | * Initial work on global handler refactor |
| * | * |
| Line 38 | Line 41 |
| #if !defined(__FREEM_GLOBAL_BLTIN_H) | #if !defined(__FREEM_GLOBAL_BLTIN_H) |
| # define __FREEM_GLOBAL_BLTIN_H | # define __FREEM_GLOBAL_BLTIN_H |
| #include "version.h" | |
| #define GBL_FORMAT_VERSION 2 | |
| #define GBL_MAGIC "FRMGL" | |
| typedef struct global_header { | |
| char magic[5]; /* FRMGL */ | |
| int format_version; | |
| char host_triplet[40]; | |
| unsigned long block_size; | |
| unsigned long last_transaction_id; | |
| long created; | |
| long last_backup; | |
| } global_header; | |
| typedef struct global_handle { | typedef struct global_handle { |
| int fd; /* file descriptor */ | int fd; /* file descriptor */ |
| global_header header; | |
| long use_count; /* how many times has it been accessed? */ | long use_count; /* how many times has it been accessed? */ |
| long age; | long age; |
| short opened; | short opened; |
| short locked; | short locked; |
| unsigned long last_block; | unsigned long last_block; |
| short fast_path; | short fast_path; |
| char global_name[256]; | char global_name[256]; |