- Timestamp:
- Jul 22, 2015, 2:31:33 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_fat32/fat32.c
r639 r650 1093 1093 { 1094 1094 // allocate a cache node if miss 1095 child = (fat_cache_node_t*)_malloc( sizeof(fat_cache_node_t));1095 child = _allocate_one_cache_node( NULL ); 1096 1096 node->children[index] = child; 1097 1097 } … … 1269 1269 { 1270 1270 // allocate a cache node if miss 1271 child = (fat_cache_node_t*)_malloc( sizeof(fat_cache_node_t));1271 child = _allocate_one_cache_node( NULL ); 1272 1272 node->children[index] = child; 1273 1273 } … … 2760 2760 // allocate and initialise the Inode-Tree root 2761 2761 fat_inode_t* inode = _malloc( sizeof(fat_inode_t) ); 2762 fat_cache_node_t* cache = _ malloc( sizeof(fat_cache_node_t));2762 fat_cache_node_t* cache = _allocate_one_cache_node( NULL ); 2763 2763 2764 2764 inode->parent = NULL; // no parent … … 2772 2772 inode->levels = 1; // one level cache 2773 2773 inode->is_dir = 1; // it's a directory 2774 _strcpy( inode->name , "/" ); 2775 2776 for ( n = 0 ; n < 64 ; n ++ ) cache->children[n] = NULL; 2774 _strcpy( inode->name , "/" ); 2777 2775 2778 2776 _fat.inode_tree_root = inode; … … 2785 2783 2786 2784 // initialise fat_cache root 2787 fat_cache_node_t* fat_cache_root = _malloc( sizeof(fat_cache_node_t) ); 2788 _fat.fat_cache_root = fat_cache_root; 2785 _fat.fat_cache_root = _allocate_one_cache_node( NULL ); 2789 2786 _fat.fat_cache_levels = _get_levels_from_size( _fat.fat_sectors << 9 ); 2790 for ( n = 0 ; n < 64 ; n++ ) _fat.fat_cache_root->children[n] = NULL;2791 2792 2787 } // end if kernel_mode 2793 2788
Note: See TracChangeset
for help on using the changeset viewer.