Changeset 442 for trunk/user/ksh
- Timestamp:
- May 16, 2018, 4:13:12 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user/ksh/ksh.c
r441 r442 238 238 if( strcmp( argv[1] , "vmm" ) == 0 ) 239 239 { 240 if( argc != 3)241 { 242 printf(" usage: display vmm pid\n");240 if( argc != 4 ) 241 { 242 printf(" usage: display vmm cxy pid\n"); 243 243 return; 244 244 } 245 245 246 pid = atoi(argv[2]); 247 248 if( display_vmm( pid ) ) 249 { 250 printf(" error: illegal arguments pid = %x\n", pid ); 246 cxy = atoi(argv[2]); 247 pid = atoi(argv[3]); 248 249 if( display_vmm( cxy , pid ) ) 250 { 251 printf(" error: no process %x in cluster %x\n", pid , cxy ); 251 252 } 252 253 } … … 338 339 if( pid == 0 ) 339 340 { 340 printf(" error: ilegal pid format\n" );341 printf(" error: PID cannot be 0\n" ); 341 342 } 342 343 … … 582 583 { 583 584 cmd_rm(argc, argv); 585 } 586 587 /////////////////////////////////////////////// 588 static void cmd_trace( int argc , char **argv ) 589 { 590 unsigned int cxy; 591 unsigned int lid; 592 593 if (argc != 3) 594 { 595 printf(" usage: trace cxy lid \n"); 596 return; 597 } 598 599 cxy = atoi(argv[1]); 600 lid = atoi(argv[2]); 601 602 if( trace( 1 , cxy , lid ) ) 603 { 604 printf(" error: core[%x,%d] not found\n", cxy, lid ); 605 } 606 } 607 608 /////////////////////////////////////////////// 609 static void cmd_untrace( int argc , char **argv ) 610 { 611 unsigned int cxy; 612 unsigned int lid; 613 614 if (argc != 3) 615 { 616 printf(" usage: untrace cxy lid \n"); 617 return; 618 } 619 620 cxy = atoi(argv[1]); 621 lid = atoi(argv[2]); 622 623 if( trace( 0 , cxy , lid ) ) 624 { 625 printf(" error: core[%x,%d] not found\n", cxy, lid ); 626 } 584 627 } 585 628 … … 605 648 { "rm", "remove a file from file system", cmd_rm }, 606 649 { "rmdir", "remove a directory from file system", cmd_rmdir }, 650 { "trace", "activate trace for a given core", cmd_trace }, 651 { "untrace", "desactivate trace for a given core", cmd_untrace }, 607 652 { NULL, NULL, NULL } 608 653 }; … … 702 747 703 748 // @@@ 704 // parse("load /bin/user/ sort.elf");749 // parse("load /bin/user/hello.elf"); 705 750 // @@@ 706 751
Note: See TracChangeset
for help on using the changeset viewer.