Changeset 656 for trunk/kernel/syscalls/sys_display.c
- Timestamp:
- Dec 6, 2019, 12:07:51 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_display.c
r640 r656 300 300 xptr_t mapper_xp; 301 301 mapper_t * mapper_ptr; 302 xptr_t page_xp; 302 303 303 304 char kbuf[CONFIG_VFS_MAX_PATH_LENGTH]; … … 315 316 __FUNCTION__ ); 316 317 #endif 317 this->errno = ENFILE; 318 return -1; 319 } 320 318 this->errno = EINVAL; 319 return -1; 320 } 321 322 // check nbytes 323 if( nbytes >= 4096 ) 324 { 325 326 #if DEBUG_SYSCALLS_ERROR 327 printk("\n[ERROR] in %s for MAPPER : nbytes cannot be larger than 4096\n", 328 __FUNCTION__ ); 329 #endif 330 this->errno = EINVAL; 331 return -1; 332 } 333 321 334 // copy pathname in kernel space 322 335 hal_strcpy_from_uspace( XPTR( local_cxy , kbuf ), … … 366 379 mapper_xp = XPTR( inode_cxy , mapper_ptr ); 367 380 368 // display mapper369 error = mapper_display_page( mapper_xp , page_id , nbytes);370 371 if( error)381 // get extended pointer on target page 382 page_xp = mapper_remote_get_page( mapper_xp , page_id ); 383 384 if( page_xp == XPTR_NULL ) 372 385 { 373 386 374 387 #if DEBUG_SYSCALLS_ERROR 375 printk("\n[ERROR] in %s for MAPPER : cannot displaypage %d\n",388 printk("\n[ERROR] in %s for MAPPER : cannot get page %d\n", 376 389 __FUNCTION__ , page_id ); 377 390 #endif … … 379 392 return -1; 380 393 } 394 395 // display mapper 396 mapper_display_page( mapper_xp , page_xp , nbytes ); 397 381 398 382 399 break; … … 463 480 uint32_t page = (uint32_t)arg0; 464 481 465 fatfs_display_fat( page , entries );482 fatfs_display_fat( page , 0 , entries ); 466 483 } 467 484
Note: See TracChangeset
for help on using the changeset viewer.