Changeset 0132630 in mainline for generic/src/console/cmd.c
- Timestamp:
- 2006-01-03T21:55:31Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b524c5e0
- Parents:
- 93e90c7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/console/cmd.c
r93e90c7 r0132630 46 46 #include <debug.h> 47 47 #include <symtab.h> 48 48 #include <cpu.h> 49 49 #include <mm/tlb.h> 50 50 #include <arch/mm/tlb.h> 51 51 #include <mm/frame.h> 52 #include <main/version.h> 52 53 53 54 /** Data and methods for 'help' command. */ … … 119 120 .argv = set4_argv 120 121 }; 121 122 123 122 124 123 /** Data and methods for 'call0' command. */ … … 233 232 }; 234 233 235 /** Data and methods for ' ptlb' command. */236 static int cmd_ ptlb(cmd_arg_t *argv);237 cmd_info_t ptlb_info = {238 .name = " ptlb",234 /** Data and methods for 'tlb' command. */ 235 static int cmd_tlb(cmd_arg_t *argv); 236 cmd_info_t tlb_info = { 237 .name = "tlb", 239 238 .description = "Print TLB of current processor.", 240 239 .help = NULL, 241 .func = cmd_ ptlb,240 .func = cmd_tlb, 242 241 .argc = 0, 243 242 .argv = NULL … … 263 262 }; 264 263 265 266 264 static cmd_info_t zone_info = { 267 265 .name = "zone", … … 272 270 }; 273 271 272 /** Data and methods for 'cpus' command. */ 273 static int cmd_cpus(cmd_arg_t *argv); 274 cmd_info_t cpus_info = { 275 .name = "cpus", 276 .description = "List all processors.", 277 .help = NULL, 278 .func = cmd_cpus, 279 .argc = 0, 280 .argv = NULL 281 }; 282 283 /** Data and methods for 'version' command. */ 284 static int cmd_version(cmd_arg_t *argv); 285 cmd_info_t version_info = { 286 .name = "version", 287 .description = "Print version information.", 288 .help = NULL, 289 .func = cmd_version, 290 .argc = 0, 291 .argv = NULL 292 }; 293 294 274 295 275 296 … … 328 349 panic("could not register command %s\n", halt_info.name); 329 350 330 cmd_initialize(& ptlb_info);331 if (!cmd_register(& ptlb_info))332 panic("could not register command %s\n", ptlb_info.name);351 cmd_initialize(&tlb_info); 352 if (!cmd_register(&tlb_info)) 353 panic("could not register command %s\n", tlb_info.name); 333 354 334 355 cmd_initialize(&zones_info); … … 340 361 panic("could not register command %s\n", zone_info.name); 341 362 363 cmd_initialize(&cpus_info); 364 if (!cmd_register(&cpus_info)) 365 panic("could not register command %s\n", cpus_info.name); 366 367 cmd_initialize(&version_info); 368 if (!cmd_register(&version_info)) 369 panic("could not register command %s\n", version_info.name); 370 371 342 372 343 373 } … … 539 569 * @return Always returns 1. 540 570 */ 541 int cmd_ ptlb(cmd_arg_t *argv)571 int cmd_tlb(cmd_arg_t *argv) 542 572 { 543 573 tlb_print(); … … 577 607 } 578 608 579 580 609 int cmd_zones(cmd_arg_t * argv) { 581 610 printf("Zones listing not implemented\n"); 582 611 return 1; 583 612 } 613 584 614 int cmd_zone(cmd_arg_t * argv) { 585 615 printf("Zone details not implemented\n"); … … 587 617 } 588 618 619 /** Command for listing processors. 620 * 621 * @param argv Ignored. 622 * 623 * return Always 1. 624 */ 625 int cmd_cpus(cmd_arg_t *argv) 626 { 627 cpu_list(); 628 return 1; 629 } 630 631 /** Command for printing kernel version. 632 * 633 * @param argv Ignored. 634 * 635 * return Always 1. 636 */ 637 int cmd_version(cmd_arg_t *argv) 638 { 639 version_print(); 640 return 1; 641 }
Note:
See TracChangeset
for help on using the changeset viewer.