You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.8 KiB

4 years ago
4 years ago
  1. #ifndef MAIN_H
  2. #define MAIN_H
  3. #define false 0
  4. #define true 1
  5. #define SPACE_MBR_RECORD 32 /* 2048 */ /* Sectors*/
  6. #define SPACE_VBR_RECORD 32 /*2048*/ /* Sectors*/
  7. #define SIZE_FSCI_RECORD 1 /* Sectors*/
  8. #define DEFAULT_ENTRY_SIZE 1 /* Sectors*/
  9. #define SECTOR_SIZE 512 /* BYTES*/
  10. #define NUMBER_OF_MBR_PARTITIONS 4
  11. #define DEFAULT_FILE_SIZE 8 /* This is in sectors*/
  12. #define DEFAULT_DATA_POINTER_SIZE 8 /* This is in sectors*/
  13. #define DEFAULT_TABLE_SIZE 8 /*16*/
  14. #define NUM_DATA_POINTERS 27
  15. #include "std_singos/stdio.h"
  16. #include "std_singos/stdlib.h"
  17. #include "std_singos/string.h"
  18. #include "driver/disk.h"
  19. void dump_ax(input);
  20. void print_stack(argument);
  21. void print_newline();
  22. typedef struct struct_partition_control partition_control;
  23. typedef struct File_System_Control_Information FSCI;
  24. typedef struct meta_information_format mif;
  25. typedef struct tag_record tag_record;
  26. typedef struct Parameter_Struct Parameter_Struct;
  27. typedef enum Service_Action
  28. {
  29. SERIVCE_LOAD_DISK = 1,
  30. SERVICE_FIND_ENTRY = 2,
  31. SERIVCE_READ_DATA = 3,
  32. SERIVCE_WRITE_DATA = 4,
  33. SERIVCE_WRITE_FS_INFO = 10,
  34. } Service_Action;
  35. struct File_System_Control_Information
  36. {
  37. char filesystem_information[256];
  38. long master_table_index[2];
  39. long this_partition_offset_on_disk[2];
  40. long next_free_sector[2];
  41. long next_uniqe_id[2]; /* both files and directories gets this. */
  42. long next_sector_reuse_pointer[2];
  43. long last_sector_index_on_partition[2];
  44. long maximum_sectors_on_disk[2];
  45. long sector_size_on_disk[2];
  46. long not_used[48];
  47. };
  48. struct Parameter_Struct
  49. {
  50. char* path;
  51. char* new_path;
  52. unsigned int buffer_segment;
  53. unsigned int buffer_address;
  54. unsigned int buffer_size;
  55. unsigned int data_length;
  56. unsigned int byte_offset_into_file;
  57. short entry_kind;
  58. };
  59. #include "implementation/lsfs.h"
  60. #endif