Changeset 297cb73 in mainline
- Timestamp:
- 2012-11-23T23:06:00Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4a5ba372
- Parents:
- ec85df0
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/console.c
rec85df0 r297cb73 367 367 data[size] = 0; 368 368 369 printf("%s", data); 369 switch (cmd) { 370 case KLOG_WRITE: 371 printf("%s", data); 372 break; 373 case KLOG_COMMAND: 374 for (unsigned int i = 0; i < size; i++) 375 indev_push_character(stdin, data[i]); 376 indev_push_character(stdin, '\n'); 377 break; 378 } 379 370 380 free(data); 371 } else 372 klog_update(NULL); 373 381 } 382 374 383 return size; 375 384 } -
uspace/app/klog/Makefile
rec85df0 r297cb73 29 29 30 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBCLUI_PREFIX)/libclui.a 32 EXTRA_CFLAGS = -I$(LIBCLUI_PREFIX) 31 33 BINARY = klog 32 34 -
uspace/app/klog/klog.c
rec85df0 r297cb73 48 48 #include <adt/list.h> 49 49 #include <adt/prodcons.h> 50 #include <tinput.h> 50 51 51 52 #define NAME "klog" … … 228 229 } 229 230 231 tinput_t *input = tinput_new(); 232 if (!input) { 233 fprintf(stderr, "%s: Could not create input\n", NAME); 234 return ENOMEM; 235 } 236 230 237 fibril_add_ready(fid); 231 238 event_unmask(EVENT_KLOG); 232 239 klog_update(); 233 240 234 task_retval(0); 235 async_manager(); 236 237 return 0; 241 tinput_set_prompt(input, "klog> "); 242 243 char *str; 244 while ((rc = tinput_read(input, &str)) == EOK) { 245 if (str_cmp(str, "") == 0) { 246 free(str); 247 continue; 248 } 249 250 klog_command(str, str_size(str)); 251 free(str); 252 } 253 254 if (rc == ENOENT) 255 rc = EOK; 256 257 return EOK; 238 258 } 239 259
Note:
See TracChangeset
for help on using the changeset viewer.