Changeset 04803bf in mainline for uspace/srv/hid/fb/main.c
- Timestamp:
- 2011-03-21T22:00:17Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 143932e3
- Parents:
- b50b5af2 (diff), 7308e84 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 moved
-
uspace/srv/hid/fb/main.c (moved) (moved from uspace/srv/fb/main.c ) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/fb/main.c
rb50b5af2 r04803bf 27 27 */ 28 28 29 #include <ipc/ipc.h>30 29 #include <ipc/services.h> 30 #include <ipc/ns.h> 31 31 #include <sysinfo.h> 32 32 #include <async.h> … … 41 41 #include "ski.h" 42 42 #include "sgcn.h" 43 #include "niagara.h" 43 44 #include "main.h" 44 45 … … 50 51 51 52 dest = as_get_mappable_page(IPC_GET_ARG2(*call)); 52 if ( ipc_answer_1(callid, EOK, (sysarg_t) dest) == 0) {53 if (async_answer_1(callid, EOK, (sysarg_t) dest) == 0) { 53 54 if (*area) 54 55 as_area_destroy(*area); … … 59 60 int main(int argc, char *argv[]) 60 61 { 61 printf( NAME ": HelenOS Framebuffer service\n");62 printf("%s: HelenOS Framebuffer service\n", NAME); 62 63 63 ipcarg_t phonead;64 64 bool initialized = false; 65 sysarg_t fb_present; 66 sysarg_t fb_kind; 67 68 if (sysinfo_get_value("fb", &fb_present) != EOK) 69 fb_present = false; 70 71 if (sysinfo_get_value("fb.kind", &fb_kind) != EOK) { 72 printf("%s: Unable to detect framebuffer configuration\n", NAME); 73 return -1; 74 } 65 75 66 76 #ifdef FB_ENABLED 67 if ( sysinfo_value("fb.kind") == 1) {77 if ((!initialized) && (fb_kind == 1)) { 68 78 if (fb_init() == 0) 69 79 initialized = true; … … 71 81 #endif 72 82 #ifdef EGA_ENABLED 73 if ((!initialized) && ( sysinfo_value("fb.kind")== 2)) {83 if ((!initialized) && (fb_kind == 2)) { 74 84 if (ega_init() == 0) 75 85 initialized = true; … … 77 87 #endif 78 88 #ifdef MSIM_ENABLED 79 if ((!initialized) && ( sysinfo_value("fb.kind")== 3)) {89 if ((!initialized) && (fb_kind == 3)) { 80 90 if (msim_init() == 0) 81 91 initialized = true; … … 83 93 #endif 84 94 #ifdef SGCN_ENABLED 85 if ((!initialized) && ( sysinfo_value("fb.kind")== 4)) {95 if ((!initialized) && (fb_kind == 4)) { 86 96 if (sgcn_init() == 0) 87 97 initialized = true; 88 98 } 89 99 #endif 100 #ifdef NIAGARA_ENABLED 101 if ((!initialized) && (fb_kind == 5)) { 102 if (niagara_init() == 0) 103 initialized = true; 104 } 105 #endif 90 106 #ifdef SKI_ENABLED 91 if ((!initialized) && ( sysinfo_value("fb") != true)) {107 if ((!initialized) && (fb_kind == 6)) { 92 108 if (ski_init() == 0) 93 109 initialized = true; … … 98 114 return -1; 99 115 100 if ( ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0)116 if (service_register(SERVICE_VIDEO) != EOK) 101 117 return -1; 102 118 103 printf( NAME ": Accepting connections\n");119 printf("%s: Accepting connections\n", NAME); 104 120 async_manager(); 105 121
Note:
See TracChangeset
for help on using the changeset viewer.
