Changeset 626 for trunk/kernel/syscalls/sys_display.c
- Timestamp:
- Apr 29, 2019, 7:25:09 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_display.c
r625 r626 56 56 else if( type == DISPLAY_MAPPER ) return "MAPPER"; 57 57 else if( type == DISPLAY_BARRIER ) return "BARRIER"; 58 else if( type == DISPLAY_FAT ) return "FAT"; 58 59 else return "undefined"; 59 60 } … … 436 437 break; 437 438 } 439 ///////////////// 440 case DISPLAY_FAT: 441 { 442 uint32_t entries = (uint32_t)arg1; 443 444 if( entries > 4096 ) 445 { 446 447 #if DEBUG_SYSCALLS_ERROR 448 printk("\n[ERROR] in %s for FAT : nb_entries larger than 4096\n", 449 __FUNCTION__ ); 450 #endif 451 this->errno = EINVAL; 452 return -1; 453 } 454 455 if( entries == 0 ) // display fat context in cluster cxy 456 { 457 uint32_t cxy = (uint32_t)arg0; 458 459 if( cluster_is_undefined( cxy ) ) 460 { 461 462 #if DEBUG_SYSCALLS_ERROR 463 printk("\n[ERROR] in %s for FAT : illegal cxy argument %x\n", 464 __FUNCTION__ , cxy ); 465 #endif 466 this->errno = EINVAL; 467 return -1; 468 } 469 470 fatfs_display_ctx( cxy ); 471 } 472 else // display nb_entries in page 473 { 474 uint32_t page = (uint32_t)arg0; 475 476 fatfs_display_fat( page , entries ); 477 } 478 479 break; 480 } 438 481 //////// 439 482 default:
Note: See TracChangeset
for help on using the changeset viewer.