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