Changeset e2b762ec in mainline for kernel/generic/src/console/kconsole.c
- Timestamp:
- 2009-03-16T21:58:05Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f36c061
- Parents:
- d9167a1c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/kconsole.c
rd9167a1c re2b762ec 51 51 #include <func.h> 52 52 #include <string.h> 53 #include <symtab.h>54 53 #include <macros.h> 55 54 #include <sysinfo/sysinfo.h> 56 55 #include <ddi/device.h> 56 57 #ifdef CONFIG_SYMTAB 58 #include <symtab.h> 59 #endif 57 60 58 61 /** Simple kernel console. … … 259 262 static int cmdtab_compl(char *name) 260 263 { 261 static char output[ MAX_SYMBOL_NAME+ 1];264 static char output[/*MAX_SYMBOL_NAME*/128 + 1]; 262 265 link_t *startpos = NULL; 263 266 const char *foundtxt; … … 291 294 } 292 295 } 293 strncpy(name, output, MAX_SYMBOL_NAME);296 strncpy(name, output, 128/*MAX_SYMBOL_NAME*/); 294 297 return found; 295 296 298 } 297 299 … … 348 350 found = cmdtab_compl(tmp); 349 351 } else { /* Symtab completion */ 352 #ifdef CONFIG_SYMTAB 350 353 found = symtab_compl(tmp); 354 #else 355 found = 0; 356 #endif 351 357 } 352 358 … … 516 522 static int parse_int_arg(char *text, size_t len, unative_t *result) 517 523 { 518 static char symname[MAX_SYMBOL_NAME];519 524 uintptr_t symaddr; 520 525 bool isaddr = false; 521 526 bool isptr = false; 527 528 #ifdef CONFIG_SYMTAB 529 static char symname[MAX_SYMBOL_NAME]; 530 #endif 522 531 523 532 /* If we get a name, try to find it in symbol table */ … … 532 541 } 533 542 if (text[0] < '0' || text[0] > '9') { 543 #ifdef CONFIG_SYMTAB 534 544 strncpy(symname, text, min(len + 1, MAX_SYMBOL_NAME)); 535 545 symaddr = get_symbol_addr(symname); … … 543 553 return -1; 544 554 } 555 #else 556 symaddr = 0; 557 #endif 545 558 if (isaddr) 546 559 *result = (unative_t)symaddr;
Note:
See TracChangeset
for help on using the changeset viewer.