Changeset 670 for trunk/kernel/syscalls/sys_display.c
- Timestamp:
- Nov 19, 2020, 11:45:52 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_display.c
r664 r670 58 58 else if( type == DISPLAY_FAT ) return "FAT"; 59 59 else if( type == DISPLAY_SOCKET ) return "SOCKET"; 60 else if( type == DISPLAY_FD ) return "FD"; 61 else if( type == DISPLAY_WINDOWS ) return "WINDOWS"; 60 62 else return "undefined"; 61 63 } … … 500 502 501 503 #if DEBUG_SYSCALLS_ERROR 502 printk("\n[ERROR] in %s SOCKET : pid %x not found\n", __FUNCTION__ , pid );504 printk("\n[ERROR] in %s for SOCKET : pid %x not found\n", __FUNCTION__ , pid ); 503 505 #endif 504 506 this->errno = EINVAL; … … 513 515 514 516 #if DEBUG_SYSCALLS_ERROR 515 printk("\n[ERROR] in %s SOCKET : fdid %d not found\n", __FUNCTION__ , fdid );517 printk("\n[ERROR] in %s for SOCKET : fdid %d not found\n", __FUNCTION__ , fdid ); 516 518 #endif 517 519 this->errno = EINVAL; … … 528 530 // display socket descriptor on TXT0 529 531 socket_display( XPTR( file_cxy , socket ), NULL ); 532 533 break; 534 } 535 //////////////// 536 case DISPLAY_FD: 537 { 538 pid_t pid = (pid_t)arg0; 539 540 // get extended pointer on owner process descriptor 541 xptr_t owner_xp = cluster_get_owner_process_from_pid( pid ); 542 543 if( owner_xp == XPTR_NULL ) 544 { 545 546 #if DEBUG_SYSCALLS_ERROR 547 printk("\n[ERROR] in %s for FD : pid %x not found\n", __FUNCTION__ , pid ); 548 #endif 549 this->errno = EINVAL; 550 return -1; 551 } 552 553 // display fd_array on TXT0 554 process_fd_display( owner_xp ); 555 556 break; 557 } 558 ///////////////////// 559 case DISPLAY_WINDOWS: 560 { 561 pid_t pid = (pid_t)arg0; 562 563 if( pid != 0 ) // only one target process 564 { 565 // get extended pointer on owner process descriptor 566 xptr_t owner_xp = cluster_get_owner_process_from_pid( pid ); 567 568 if( owner_xp == XPTR_NULL ) 569 { 570 571 #if DEBUG_SYSCALLS_ERROR 572 printk("\n[ERROR] in %s for FD : pid %x not found\n", __FUNCTION__ , pid ); 573 #endif 574 this->errno = EINVAL; 575 return -1; 576 } 577 } 578 579 // display windows state for one, or for all processes 580 dev_fbf_display_windows( pid ); 530 581 531 582 break;
Note: See TracChangeset
for help on using the changeset viewer.