Changeset 20cc877 in mainline for kernel/generic/src/console/cmd.c
- Timestamp:
- 2009-04-03T07:57:36Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d6c8ff6
- Parents:
- 68ad9d2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/cmd.c
r68ad9d2 r20cc877 514 514 515 515 link_t *cur; 516 size_t len = 0;516 count_t len = 0; 517 517 for (cur = cmd_head.next; cur != &cmd_head; cur = cur->next) { 518 518 cmd_info_t *hlp; … … 520 520 521 521 spinlock_lock(&hlp->lock); 522 if (str_ size(hlp->name) > len)523 len = str_ size(hlp->name);522 if (str_length(hlp->name) > len) 523 len = str_length(hlp->name); 524 524 spinlock_unlock(&hlp->lock); 525 525 } … … 583 583 { 584 584 link_t *cur; 585 585 586 586 spinlock_lock(&cmd_lock); 587 587 … … 591 591 hlp = list_get_instance(cur, cmd_info_t, link); 592 592 spinlock_lock(&hlp->lock); 593 594 if (str ncmp(hlp->name, (const char *) argv->buffer, str_size(hlp->name)) == 0) {593 594 if (str_lcmp(hlp->name, (const char *) argv->buffer, str_length(hlp->name)) == 0) { 595 595 printf("%s - %s\n", hlp->name, hlp->description); 596 596 if (hlp->help) … … 599 599 break; 600 600 } 601 601 602 602 spinlock_unlock(&hlp->lock); 603 603 } 604 604 605 605 spinlock_unlock(&cmd_lock); 606 606 607 607 return 1; 608 608 } … … 970 970 int cmd_tests(cmd_arg_t *argv) 971 971 { 972 size_t len = 0;972 count_t len = 0; 973 973 test_t *test; 974 974 for (test = tests; test->name != NULL; test++) { 975 if (str_ size(test->name) > len)976 len = str_ size(test->name);975 if (str_length(test->name) > len) 976 len = str_length(test->name); 977 977 } 978 978 … … 1097 1097 test_t *test; 1098 1098 1099 if (str cmp((char *) argv->buffer, "*") == 0) {1099 if (str_cmp((char *) argv->buffer, "*") == 0) { 1100 1100 for (test = tests; test->name != NULL; test++) { 1101 1101 if (test->safe) { … … 1109 1109 1110 1110 for (test = tests; test->name != NULL; test++) { 1111 if (str cmp(test->name, (char *) argv->buffer) == 0) {1111 if (str_cmp(test->name, (char *) argv->buffer) == 0) { 1112 1112 fnd = true; 1113 1113 run_test(test); … … 1137 1137 1138 1138 for (test = tests; test->name != NULL; test++) { 1139 if (str cmp(test->name, (char *) argv->buffer) == 0) {1139 if (str_cmp(test->name, (char *) argv->buffer) == 0) { 1140 1140 fnd = true; 1141 1141
Note:
See TracChangeset
for help on using the changeset viewer.