Changeset a02e383 in mainline
- Timestamp:
- 2009-03-12T17:48:13Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 099aa78
- Parents:
- 67a88c3
- Location:
- kernel/generic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/console/kconsole.h
r67a88c3 ra02e383 93 93 extern void kconsole_init(void); 94 94 extern void kconsole_notify_init(void); 95 extern bool kconsole_check_poll(void); 95 96 extern void kconsole(char *prompt, char *msg, bool kcon); 96 97 extern void kconsole_thread(void *data); -
kernel/generic/src/console/kconsole.c
r67a88c3 ra02e383 296 296 } 297 297 298 static char *clever_readline(const char *prompt, chardev_t *input)298 static char *clever_readline(const char *prompt, indev_t *input) 299 299 { 300 300 static int histposition = 0; … … 457 457 } 458 458 459 bool kconsole_check_poll(void) 460 { 461 return check_poll(stdin); 462 } 463 459 464 /** Kernel console prompt. 460 465 * … … 470 475 count_t len; 471 476 char *cmdline; 472 477 473 478 if (!stdin) { 474 479 LOG("No stdin for kernel console"); … … 481 486 if (kcon) 482 487 _getc(stdin); 488 else 489 printf("Type \"exit\" to leave the console.\n"); 483 490 484 491 while (true) { … … 488 495 continue; 489 496 497 if ((!kcon) && (len == 4) && (strncmp(cmdline, "exit", 4) == 0)) 498 break; 499 490 500 cmd_info = parse_cmdline(cmdline, len); 491 501 if (!cmd_info) 492 502 continue; 493 494 if ((!kcon)495 && (strncmp(cmd_info->name, "exit", min(strlen(cmd_info->name), 5)) == 0))496 break;497 503 498 504 (void) cmd_info->func(cmd_info->argv);
Note:
See TracChangeset
for help on using the changeset viewer.