#ifndef MAIN_H #define MAIN_H #define false 0 #define true 1 #define SPACE_MBR_RECORD 32 /* 2048 */ /* Sectors*/ #define SPACE_VBR_RECORD 32 /*2048*/ /* Sectors*/ #define SIZE_FSCI_RECORD 1 /* Sectors*/ #define DEFAULT_ENTRY_SIZE 1 /* Sectors*/ #define SECTOR_SIZE 512 /* BYTES*/ #define NUMBER_OF_MBR_PARTITIONS 4 #define DEFAULT_FILE_SIZE 8 /* This is in sectors*/ #define DEFAULT_DATA_POINTER_SIZE 8 /* This is in sectors*/ #define DEFAULT_TABLE_SIZE 8 /*16*/ #define NUM_DATA_POINTERS 27 #include "std_singos/stdio.h" #include "std_singos/stdlib.h" #include "std_singos/string.h" #include "driver/disk.h" void dump_ax(input); void print_stack(argument); void print_newline(); typedef struct struct_partition_control partition_control; typedef struct File_System_Control_Information FSCI; typedef struct meta_information_format mif; typedef struct tag_record tag_record; typedef struct Parameter_Struct Parameter_Struct; typedef enum Service_Action { SERIVCE_LOAD_DISK = 1, SERVICE_FIND_ENTRY = 2, SERIVCE_READ_DATA = 3, SERIVCE_WRITE_DATA = 4, SERIVCE_WRITE_FS_INFO = 10, } Service_Action; struct File_System_Control_Information { char filesystem_information[256]; long master_table_index[2]; long this_partition_offset_on_disk[2]; long next_free_sector[2]; long next_uniqe_id[2]; /* both files and directories gets this. */ long next_sector_reuse_pointer[2]; long last_sector_index_on_partition[2]; long maximum_sectors_on_disk[2]; long sector_size_on_disk[2]; long not_used[48]; }; struct Parameter_Struct { char* path; char* new_path; unsigned int buffer_segment; unsigned int buffer_address; unsigned int buffer_size; unsigned int data_length; unsigned int byte_offset_into_file; short entry_kind; }; #include "implementation/lsfs.h" #endif