Rev 2787 | Rev 3425 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2787 | Rev 3424 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | #include <sysinfo.h> |
31 | #include <sysinfo.h> |
32 | #include <async.h> |
32 | #include <async.h> |
33 | #include <as.h> |
33 | #include <as.h> |
34 | #include <align.h> |
34 | #include <align.h> |
35 | #include <errno.h> |
35 | #include <errno.h> |
- | 36 | #include <stdio.h> |
|
36 | 37 | ||
37 | #include "fb.h" |
38 | #include "fb.h" |
38 | #include "sysio.h" |
- | |
39 | #include "ega.h" |
39 | #include "ega.h" |
40 | #include "main.h" |
40 | #include "main.h" |
41 | 41 | ||
- | 42 | #define NAME "fb" |
|
- | 43 | ||
42 | void receive_comm_area(ipc_callid_t callid, ipc_call_t *call, void **area) |
44 | void receive_comm_area(ipc_callid_t callid, ipc_call_t *call, void **area) |
43 | { |
45 | { |
44 | void *dest; |
46 | void *dest; |
45 | 47 | ||
46 | dest = as_get_mappable_page(IPC_GET_ARG2(*call)); |
48 | dest = as_get_mappable_page(IPC_GET_ARG2(*call)); |
Line 51... | Line 53... | ||
51 | } |
53 | } |
52 | } |
54 | } |
53 | 55 | ||
54 | int main(int argc, char *argv[]) |
56 | int main(int argc, char *argv[]) |
55 | { |
57 | { |
- | 58 | printf(NAME ": HelenOS Framebuffer service\n"); |
|
- | 59 | ||
56 | ipcarg_t phonead; |
60 | ipcarg_t phonead; |
57 | int initialized = 0; |
61 | int initialized = 0; |
58 | 62 | ||
59 | #ifdef FB_ENABLED |
63 | #ifdef FB_ENABLED |
60 | if (sysinfo_value("fb.kind") == 1) { |
64 | if (sysinfo_value("fb.kind") == 1) { |
Line 68... | Line 72... | ||
68 | initialized = 1; |
72 | initialized = 1; |
69 | } |
73 | } |
70 | #endif |
74 | #endif |
71 | 75 | ||
72 | if (!initialized) |
76 | if (!initialized) |
73 | sysio_init(); |
77 | return -1; |
74 | 78 | ||
75 | if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0) |
79 | if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0) |
76 | return -1; |
80 | return -1; |
77 | 81 | ||
- | 82 | printf(NAME ": Accepting connections\n"); |
|
78 | async_manager(); |
83 | async_manager(); |
79 | /* Never reached */ |
84 | /* Never reached */ |
80 | return 0; |
85 | return 0; |
81 | } |
86 | } |