Rev 2678 | Rev 3672 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2678 | Rev 3084 | ||
---|---|---|---|
Line 44... | Line 44... | ||
44 | #include <unistd.h> |
44 | #include <unistd.h> |
45 | #include <async.h> |
45 | #include <async.h> |
46 | #include <libadt/fifo.h> |
46 | #include <libadt/fifo.h> |
47 | #include <screenbuffer.h> |
47 | #include <screenbuffer.h> |
48 | #include <sys/mman.h> |
48 | #include <sys/mman.h> |
- | 49 | #include <stdio.h> |
|
49 | 50 | ||
50 | #include "gcons.h" |
51 | #include "gcons.h" |
51 | 52 | ||
52 | #define MAX_KEYREQUESTS_BUFFERED 32 |
53 | #define MAX_KEYREQUESTS_BUFFERED 32 |
53 | 54 | ||
54 | #define NAME "CONSOLE" |
55 | #define NAME "console" |
55 | 56 | ||
56 | /** Index of currently used virtual console. |
57 | /** Index of currently used virtual console. |
57 | */ |
58 | */ |
58 | int active_console = 0; |
59 | int active_console = 0; |
59 | 60 | ||
Line 472... | Line 473... | ||
472 | } |
473 | } |
473 | } |
474 | } |
474 | 475 | ||
475 | int main(int argc, char *argv[]) |
476 | int main(int argc, char *argv[]) |
476 | { |
477 | { |
- | 478 | printf(NAME ": HelenOS Console service\n"); |
|
- | 479 | ||
477 | ipcarg_t phonehash; |
480 | ipcarg_t phonehash; |
478 | int kbd_phone; |
481 | int kbd_phone; |
479 | int i; |
482 | int i; |
480 | 483 | ||
481 | async_set_client_connection(client_connection); |
484 | async_set_client_connection(client_connection); |
Line 548... | Line 551... | ||
548 | curs_goto(0, 0); |
551 | curs_goto(0, 0); |
549 | curs_visibility( |
552 | curs_visibility( |
550 | connections[active_console].screenbuffer.is_cursor_visible); |
553 | connections[active_console].screenbuffer.is_cursor_visible); |
551 | 554 | ||
552 | /* Register at NS */ |
555 | /* Register at NS */ |
553 | if (ipc_connect_to_me(PHONE_NS, SERVICE_CONSOLE, 0, 0, &phonehash) != 0) { |
556 | if (ipc_connect_to_me(PHONE_NS, SERVICE_CONSOLE, 0, 0, &phonehash) != 0) |
554 | return -1; |
557 | return -1; |
555 | } |
- | |
556 | 558 | ||
- | 559 | // FIXME: avoid connectiong to itself, keep using klog |
|
- | 560 | // printf(NAME ": Accepting connections\n"); |
|
557 | async_manager(); |
561 | async_manager(); |
558 | 562 | ||
559 | return 0; |
563 | return 0; |
560 | } |
564 | } |
561 | 565 |