Changeset 492 for trunk/kernel/fs/fatfs.c
- Timestamp:
- Aug 22, 2018, 11:55:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/fs/fatfs.c
r484 r492 259 259 uint32_t next_cluster_id; // content of current FAT slot 260 260 261 assert( (searched_page_index > 0) , __FUNCTION__ ,261 assert( (searched_page_index > 0) , 262 262 "no FAT access required for first page\n"); 263 263 … … 352 352 #endif 353 353 354 assert( (fatfs_ctx != NULL) , __FUNCTION__ ,354 assert( (fatfs_ctx != NULL) , 355 355 "cannot allocate memory for FATFS context\n" ); 356 356 … … 360 360 buffer = (uint8_t *)kmem_alloc( &req ); 361 361 362 assert( (buffer != NULL) , __FUNCTION__ ,362 assert( (buffer != NULL) , 363 363 "cannot allocate memory for 512 bytes buffer\n" ); 364 364 … … 367 367 error = dev_ioc_sync_read( buffer , 0 , 1 ); 368 368 369 assert( (error == 0) , __FUNCTION__ ,369 assert( (error == 0) , 370 370 "cannot access boot record\n" ); 371 371 … … 393 393 uint32_t sector_size = fatfs_get_record( BPB_BYTSPERSEC , buffer , 1 ); 394 394 395 assert( (sector_size == 512) , __FUNCTION__ ,395 assert( (sector_size == 512) , 396 396 "sector size must be 512 bytes\n" ); 397 397 … … 399 399 uint32_t nb_sectors = fatfs_get_record( BPB_SECPERCLUS , buffer , 1 ); 400 400 401 assert( (nb_sectors == 8) , __FUNCTION__ ,401 assert( (nb_sectors == 8) , 402 402 "cluster size must be 8 sectors\n" ); 403 403 … … 405 405 uint32_t nb_fats = fatfs_get_record( BPB_NUMFATS , buffer , 1 ); 406 406 407 assert( (nb_fats == 1) , __FUNCTION__ ,407 assert( (nb_fats == 1) , 408 408 "number of FAT copies must be 1\n" ); 409 409 … … 411 411 uint32_t fat_sectors = fatfs_get_record( BPB_FAT32_FATSZ32 , buffer , 1 ); 412 412 413 assert( ((fat_sectors & 0xF) == 0) , __FUNCTION__ ,413 assert( ((fat_sectors & 0xF) == 0) , 414 414 "FAT not multiple of 16 sectors\n"); 415 415 … … 417 417 uint32_t root_cluster = fatfs_get_record( BPB_FAT32_ROOTCLUS , buffer , 1 ); 418 418 419 assert( (root_cluster == 2) , __FUNCTION__ ,419 assert( (root_cluster == 2) , 420 420 "root cluster index must be 2\n"); 421 421 … … 431 431 mapper_t * fat_mapper = mapper_create( FS_TYPE_FATFS ); 432 432 433 assert( (fat_mapper != NULL) , __FUNCTION__ ,433 assert( (fat_mapper != NULL) , 434 434 "no memory for FAT mapper" ); 435 435 … … 632 632 mapper_t * mapper = parent_inode->mapper; 633 633 634 assert( (mapper != NULL) , __FUNCTION__ ,"parent mapper undefined\n");634 assert( (mapper != NULL) , "parent mapper undefined\n"); 635 635 636 636 char cname[CONFIG_VFS_MAX_NAME_LENGTH]; // name extracter from each directory entry … … 659 659 page = mapper_get_page( mapper , index ); 660 660 661 assert( (page != NULL) , __FUNCTION__ ,"bad parent mapper\n");661 assert( (page != NULL) , "bad parent mapper\n"); 662 662 663 663 // get page base
Note: See TracChangeset
for help on using the changeset viewer.