Changeset 673 for trunk/kernel/fs/fatfs.c
- Timestamp:
- Nov 19, 2020, 11:54:16 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/fs/fatfs.c
r657 r673 1098 1098 error_t error; 1099 1099 1100 assert( (searched_page_id > first_page_id) ,1100 assert( __FUNCTION__, (searched_page_id > first_page_id) , 1101 1101 "searched_page_id must be larger than first_page_id\n"); 1102 1102 … … 1239 1239 1240 1240 // check arguments 1241 assert( (mapper_xp != XPTR_NULL) , "mapper pointer is NULL\n" );1242 assert( (name != NULL ) , "child name is undefined\n" );1241 assert( __FUNCTION__, (mapper_xp != XPTR_NULL) , "mapper pointer is NULL\n" ); 1242 assert( __FUNCTION__, (name != NULL ) , "child name is undefined\n" ); 1243 1243 1244 1244 #if DEBUG_FATFS_SCAN_DIRECTORY … … 1882 1882 1883 1883 // check arguments 1884 assert( (parent_inode_xp != XPTR_NULL) , "parent_inode_xp argument is NULL\n" );1885 assert( (dentry_ptr != NULL) , "dentry_ptr argument is NULL\n" );1884 assert( __FUNCTION__, (parent_inode_xp != XPTR_NULL) , "parent_inode_xp argument is NULL\n" ); 1885 assert( __FUNCTION__, (dentry_ptr != NULL) , "dentry_ptr argument is NULL\n" ); 1886 1886 1887 1887 // get directory inode cluster and local pointer … … 2153 2153 else if (i == 11) // ATTR 2154 2154 { 2155 if (type == INODE_TYPE_DIR) buf[i] = 0x10;2155 if (type == FILE_TYPE_DIR) buf[i] = 0x10; 2156 2156 else buf[i] = 0x20; 2157 2157 } … … 2236 2236 2237 2237 // check arguments 2238 assert( (parent_inode_xp != XPTR_NULL) , "parent_inode_xp argument is NULL\n" );2239 assert( (dentry_ptr != NULL) , "dentry_ptr argument is NULL\n" );2238 assert( __FUNCTION__, (parent_inode_xp != XPTR_NULL) , "parent_inode_xp argument is NULL\n" ); 2239 assert( __FUNCTION__, (dentry_ptr != NULL) , "dentry_ptr argument is NULL\n" ); 2240 2240 2241 2241 // get directory inode cluster and local pointer … … 2344 2344 2345 2345 // check for LFN entry 2346 assert( (fatfs_get_remote_record( DIR_ATTR, base_xp + offset ) == ATTR_LONG_NAME_MASK ),2346 assert( __FUNCTION__, (fatfs_get_remote_record( DIR_ATTR, base_xp + offset ) == ATTR_LONG_NAME_MASK ), 2347 2347 "this directory entry must be a LFN\n"); 2348 2348 … … 2395 2395 2396 2396 // check arguments 2397 assert( (parent_inode_xp != XPTR_NULL) , "parent_inode_xp is NULL\n" );2398 assert( (dentry_ptr != NULL ) , "dentry_ptr is NULL\n" );2397 assert( __FUNCTION__, (parent_inode_xp != XPTR_NULL) , "parent_inode_xp is NULL\n" ); 2398 assert( __FUNCTION__, (dentry_ptr != NULL ) , "dentry_ptr is NULL\n" ); 2399 2399 2400 2400 // get parent inode cluster and local pointer … … 2445 2445 2446 2446 // update the child inode "type", "size", and "extend" fields 2447 vfs_ inode_type_t type = (is_dir) ? INODE_TYPE_DIR : INODE_TYPE_FILE;2447 vfs_file_type_t type = (is_dir) ? FILE_TYPE_DIR : FILE_TYPE_REG; 2448 2448 2449 2449 hal_remote_s32( XPTR( child_cxy , &child_inode_ptr->type ) , type ); … … 2486 2486 2487 2487 // check arguments 2488 assert( (parent_inode_xp != XPTR_NULL) , "parent_inode_xp argument is NULL\n" );2489 assert( (dentry_ptr != NULL) , "dentry_ptr argument NULL\n" );2488 assert( __FUNCTION__, (parent_inode_xp != XPTR_NULL) , "parent_inode_xp argument is NULL\n" ); 2489 assert( __FUNCTION__, (dentry_ptr != NULL) , "dentry_ptr argument NULL\n" ); 2490 2490 2491 2491 // get child inode cluster and local pointer … … 2574 2574 2575 2575 // check arguments 2576 assert( (parent_inode_xp != XPTR_NULL) , "parent_inode_xp argument is NULL\n" );2577 assert( (dentry_ptr != NULL) , "dentry_ptr argument is NULL\n" );2576 assert( __FUNCTION__, (parent_inode_xp != XPTR_NULL) , "parent_inode_xp argument is NULL\n" ); 2577 assert( __FUNCTION__, (dentry_ptr != NULL) , "dentry_ptr argument is NULL\n" ); 2578 2578 2579 2579 // get parent directory cluster ans local pointer … … 2680 2680 2681 2681 // check mapper pointer 2682 assert( (mapper != NULL) , "mapper is NULL\n");2682 assert( __FUNCTION__, (mapper != NULL) , "mapper is NULL\n"); 2683 2683 2684 2684 // TODO handle the detailed flag 2685 assert( (detailed == false), "detailed argument not supported/n");2685 assert( __FUNCTION__, (detailed == false), "detailed argument not supported/n"); 2686 2686 2687 2687 char cname[CONFIG_VFS_MAX_NAME_LENGTH]; // name extracted from each dentry … … 2829 2829 2830 2830 // check inode pointer and cluster index 2831 assert( (inode_xp != XPTR_NULL) , "inode pointer undefined\n" );2831 assert( __FUNCTION__, (inode_xp != XPTR_NULL) , "inode pointer undefined\n" ); 2832 2832 2833 2833 #if DEBUG_FATFS_SYNC_INODE … … 2848 2848 mapper = hal_remote_lpt( XPTR( inode_cxy , &inode_ptr->mapper ) ); 2849 2849 2850 assert( (mapper != NULL) , "mapper pointer is NULL\n" );2850 assert( __FUNCTION__, (mapper != NULL) , "mapper pointer is NULL\n" ); 2851 2851 2852 2852 // get inode type and size … … 2854 2854 type = hal_remote_l32( XPTR( inode_cxy , &inode_ptr->type ) ); 2855 2855 2856 assert( (type == INODE_TYPE_FILE) , "inode is not a file\n" );2856 assert( __FUNCTION__, (type == FILE_TYPE_REG) , "inode is not a file\n" ); 2857 2857 2858 2858 // compute number of pages … … 3009 3009 3010 3010 // check inode pointer 3011 assert( (inode_xp != XPTR_NULL) , "inode pointer is NULL\n" );3011 assert( __FUNCTION__, (inode_xp != XPTR_NULL) , "inode pointer is NULL\n" ); 3012 3012 3013 3013 // get inode cluster and local pointer … … 3020 3020 3021 3021 // check first cluster index 3022 assert( (first_cluster_id != 0) , "inode extend is NULL\n" );3022 assert( __FUNCTION__, (first_cluster_id != 0) , "inode extend is NULL\n" ); 3023 3023 3024 3024 #if DEBUG_FATFS_RELEASE_INODE
Note: See TracChangeset
for help on using the changeset viewer.