Save work
This commit is contained in:
1 parent
5c4f56ca68
commit
ace8772f3b
4 files changed
+3
-8
No files matched your search
BIN
Binary file not shown.
@@ -153,14 +153,7 @@ int dmu_install_vbr(char* disk_name) {
|
|||||||
|
|
||||||
int dmu_print_mtt(char *path) {
|
int dmu_print_mtt(char *path) {
|
||||||
Directory_Table *directory_table;
|
Directory_Table *directory_table;
|
||||||
if (strcmp(path, "/") != 0)
|
directory_table = lsfs_find_directory(path, false);
|
||||||
{
|
|
||||||
directory_table = lsfs_find_directory(path, false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
directory_table = &p_control.master_table;
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("\n|------------------------ Directory ------------------------|Control_bits|\n");
|
printf("\n|------------------------ Directory ------------------------|Control_bits|\n");
|
||||||
|
|
||||||
|
|||||||
@@ -188,6 +188,7 @@ Directory_Table* lsfs_find_directory(const char *path, bool drop_filename)
|
|||||||
{
|
{
|
||||||
|
|
||||||
Directory_Table *dir_table = calloc(1, sizeof(Directory_Table));
|
Directory_Table *dir_table = calloc(1, sizeof(Directory_Table));
|
||||||
|
printf("Table index: %lu \n",p_control.fsci.master_table_index );
|
||||||
read_data_from_disk(p_control.fsci.master_table_index, DEFAULT_TABLE_SIZE, dir_table);
|
read_data_from_disk(p_control.fsci.master_table_index, DEFAULT_TABLE_SIZE, dir_table);
|
||||||
lsfs_string_array split_path = lsfs_string_split_c(path, '/', false);
|
lsfs_string_array split_path = lsfs_string_split_c(path, '/', false);
|
||||||
|
|
||||||
@@ -206,6 +207,7 @@ Directory_Table* lsfs_find_directory(const char *path, bool drop_filename)
|
|||||||
if (strcmp(dir_table->entries[j].filename, split_path.strings[i].chars) == 0)
|
if (strcmp(dir_table->entries[j].filename, split_path.strings[i].chars) == 0)
|
||||||
{
|
{
|
||||||
int index_sector = dir_table->entries[j].data_pointer[0];
|
int index_sector = dir_table->entries[j].data_pointer[0];
|
||||||
|
printf("Table index: %lu \n",index_sector );
|
||||||
read_data_from_disk(index_sector, DEFAULT_TABLE_SIZE, dir_table);
|
read_data_from_disk(index_sector, DEFAULT_TABLE_SIZE, dir_table);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user