Changeset 46c20c8 in mainline for uspace/srv/hid/fb/main.c
- Timestamp:
- 2010-11-26T20:08:10Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 45df59a
- Parents:
- fb150d78 (diff), ffdd2b9 (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 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/fb/main.c
rfb150d78 r46c20c8 41 41 #include "ski.h" 42 42 #include "sgcn.h" 43 #include "niagara.h" 43 44 #include "main.h" 44 45 … … 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 116 ipcarg_t phonead; 100 117 if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0) 101 118 return -1; 102 119 103 printf( NAME ": Accepting connections\n");120 printf("%s: Accepting connections\n", NAME); 104 121 async_manager(); 105 122
Note:
See TracChangeset
for help on using the changeset viewer.