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