Changeset a805c24 in mainline for console/console.c
- Timestamp:
- 2006-06-02T16:37:09Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3756912
- Parents:
- b917098
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
console/console.c
rb917098 ra805c24 172 172 173 173 retval = 0; 174 c = IPC_GET_ARG1(call) - '0';174 c = IPC_GET_ARG1(call); 175 175 /* switch to another virtual console */ 176 176 177 177 conn = &connections[active_console]; 178 178 // if ((c >= KBD_KEY_F1) && (c < KBD_KEY_F1 + CONSOLE_COUNT)) { 179 if ((c >= 0) && (c < CONSOLE_COUNT)) { 180 /*FIXME: draw another console content from buffer */ 181 if (c == active_console) 182 break; 179 if ((c >= '0') && (c < '0' + CONSOLE_COUNT)) { 183 180 184 if (c == 0) {181 if (c == '0') { 185 182 /* switch to kernel console*/ 183 sync_send_2(fb_info.phone, FB_CURSOR_VISIBILITY, 0, 0, NULL, NULL); 184 nsend_call_2(fb_info.phone, FB_SET_STYLE, DEFAULT_FOREGROUND_COLOR, DEFAULT_BACKGROUND_COLOR); 185 nsend_call(fb_info.phone, FB_CLEAR, 0); 186 /* FIXME: restore kernel console */ 186 187 __SYSCALL0(SYS_DEBUG_ENABLE_CONSOLE); 188 break; 187 189 188 190 } else { 191 c = c - '1'; 192 if (c == active_console) 193 break; 189 194 active_console = c; 190 195 } 191 192 196 193 197 conn = &connections[active_console]; … … 331 335 ipc_call_sync_2(fb_info.phone, FB_GET_CSIZE, 0, 0, &(fb_info.rows), &(fb_info.cols)); 332 336 nsend_call_2(fb_info.phone, FB_SET_STYLE, DEFAULT_FOREGROUND_COLOR, DEFAULT_BACKGROUND_COLOR); 333 nsend_call(fb_info.phone, FB_C URSOR_VISIBILITY, 1);337 nsend_call(fb_info.phone, FB_CLEAR, 0); 334 338 335 339 /* Init virtual consoles */ … … 350 354 if ((interbuffer = mmap(NULL, sizeof(keyfield_t) * fb_info.cols * fb_info.rows , PROTO_READ|PROTO_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, 0 ,0 )) != NULL) { 351 355 if (ipc_call_sync_3(fb_info.phone, IPC_M_AS_AREA_SEND, (ipcarg_t)interbuffer, 0, AS_AREA_READ | AS_AREA_CACHEABLE, NULL, NULL, NULL) != 0) { 352 // ipc_call_async_3(fb_info.phone, FB_PUTCHAR, '?', 10, 10, NULL, NULL);353 356 munmap(interbuffer, sizeof(keyfield_t) * fb_info.cols * fb_info.rows); 354 357 interbuffer = NULL; 355 358 } 356 /* } else { 357 ipc_call_async_3(fb_info.phone, FB_PUTCHAR, '!', 10, 10, NULL, NULL); 358 */ 359 } 359 } 360 361 /* FIXME: save kernel console screen */ 360 362 361 363 async_new_connection(phonehash, 0, NULL, keyboard_events); 362 364 363 365 nsend_call_2(fb_info.phone, FB_CURSOR_GOTO, 0, 0); 366 nsend_call(fb_info.phone, FB_CURSOR_VISIBILITY, 1); 364 367 365 368 /* Register at NS */ … … 372 375 return 0; 373 376 } 377
Note:
See TracChangeset
for help on using the changeset viewer.