Changes in uspace/srv/hid/fb/main.c [eeb643d:d9fae235] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/fb/main.c
reeb643d rd9fae235 60 60 int main(int argc, char *argv[]) 61 61 { 62 printf( NAME ": HelenOS Framebuffer service\n");62 printf("%s: HelenOS Framebuffer service\n", NAME); 63 63 64 ipcarg_t phonead;65 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 } 66 75 67 76 #ifdef FB_ENABLED 68 if ( sysinfo_value("fb.kind") == 1) {77 if ((!initialized) && (fb_kind == 1)) { 69 78 if (fb_init() == 0) 70 79 initialized = true; … … 72 81 #endif 73 82 #ifdef EGA_ENABLED 74 if ((!initialized) && ( sysinfo_value("fb.kind")== 2)) {83 if ((!initialized) && (fb_kind == 2)) { 75 84 if (ega_init() == 0) 76 85 initialized = true; … … 78 87 #endif 79 88 #ifdef MSIM_ENABLED 80 if ((!initialized) && ( sysinfo_value("fb.kind")== 3)) {89 if ((!initialized) && (fb_kind == 3)) { 81 90 if (msim_init() == 0) 82 91 initialized = true; … … 84 93 #endif 85 94 #ifdef SGCN_ENABLED 86 if ((!initialized) && ( sysinfo_value("fb.kind")== 4)) {95 if ((!initialized) && (fb_kind == 4)) { 87 96 if (sgcn_init() == 0) 88 97 initialized = true; … … 90 99 #endif 91 100 #ifdef NIAGARA_ENABLED 92 if ((!initialized) && ( sysinfo_value("fb.kind")== 5)) {101 if ((!initialized) && (fb_kind == 5)) { 93 102 if (niagara_init() == 0) 94 103 initialized = true; … … 96 105 #endif 97 106 #ifdef SKI_ENABLED 98 if ((!initialized) && ( sysinfo_value("fb") != true)) {107 if ((!initialized) && (!fb_present)) { 99 108 if (ski_init() == 0) 100 109 initialized = true; … … 105 114 return -1; 106 115 116 ipcarg_t phonead; 107 117 if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0) 108 118 return -1; 109 119 110 printf( NAME ": Accepting connections\n");120 printf("%s: Accepting connections\n", NAME); 111 121 async_manager(); 112 122
Note:
See TracChangeset
for help on using the changeset viewer.