Changeset 07bd114e in mainline for generic/src/console/kconsole.c
- Timestamp:
- 2005-12-17T00:08:13Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2cf87e50
- Parents:
- c43fa55
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/console/kconsole.c
rc43fa55 r07bd114e 118 118 spinlock_lock(&hlp->lock); 119 119 } 120 121 if ((strncmp(hlp->name, cmd->name, strlen(cmd->name)) == 0)) { 120 if ((strncmp(hlp->name, 121 cmd->name, max(strlen(cmd->name), 122 strlen(hlp->name))) == 0)) { 122 123 /* The command is already there. */ 123 124 spinlock_unlock(&hlp->lock); … … 140 141 } 141 142 143 /** Print count times a character */ 142 144 static void rdln_print_c(char ch, int count) 143 145 { … … 147 149 } 148 150 151 /** Insert character to string */ 149 152 static void insert_char(char *str, char ch, int pos) 150 153 { … … 156 159 } 157 160 161 /** Try to find a command begenning with prefix */ 158 162 static const char * cmdtab_search_one(const char *name,link_t **startpos) 159 163 { … … 482 486 spinlock_lock(&hlp->lock); 483 487 484 if (strncmp(hlp->name, &cmdline[start], strlen(hlp->name)) == 0) { 488 if (strncmp(hlp->name, &cmdline[start], max(strlen(hlp->name), 489 end-start+1)) == 0) { 485 490 cmd = hlp; 486 491 break;
Note:
See TracChangeset
for help on using the changeset viewer.