Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/fb/main.c

    rd9fae235 reeb643d  
    6060int main(int argc, char *argv[])
    6161{
    62         printf("%s: HelenOS Framebuffer service\n", NAME);
     62        printf(NAME ": HelenOS Framebuffer service\n");
    6363       
     64        ipcarg_t phonead;
    6465        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         }
    7566       
    7667#ifdef FB_ENABLED
    77         if ((!initialized) && (fb_kind == 1)) {
     68        if (sysinfo_value("fb.kind") == 1) {
    7869                if (fb_init() == 0)
    7970                        initialized = true;
     
    8172#endif
    8273#ifdef EGA_ENABLED
    83         if ((!initialized) && (fb_kind == 2)) {
     74        if ((!initialized) && (sysinfo_value("fb.kind") == 2)) {
    8475                if (ega_init() == 0)
    8576                        initialized = true;
     
    8778#endif
    8879#ifdef MSIM_ENABLED
    89         if ((!initialized) && (fb_kind == 3)) {
     80        if ((!initialized) && (sysinfo_value("fb.kind") == 3)) {
    9081                if (msim_init() == 0)
    9182                        initialized = true;
     
    9384#endif
    9485#ifdef SGCN_ENABLED
    95         if ((!initialized) && (fb_kind == 4)) {
     86        if ((!initialized) && (sysinfo_value("fb.kind") == 4)) {
    9687                if (sgcn_init() == 0)
    9788                        initialized = true;
     
    9990#endif
    10091#ifdef NIAGARA_ENABLED
    101         if ((!initialized) && (fb_kind == 5)) {
     92        if ((!initialized) && (sysinfo_value("fb.kind") == 5)) {
    10293                if (niagara_init() == 0)
    10394                        initialized = true;
     
    10596#endif
    10697#ifdef SKI_ENABLED
    107         if ((!initialized) && (!fb_present)) {
     98        if ((!initialized) && (sysinfo_value("fb") != true)) {
    10899                if (ski_init() == 0)
    109100                        initialized = true;
     
    114105                return -1;
    115106       
    116         ipcarg_t phonead;
    117107        if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0)
    118108                return -1;
    119109       
    120         printf("%s: Accepting connections\n", NAME);
     110        printf(NAME ": Accepting connections\n");
    121111        async_manager();
    122112       
Note: See TracChangeset for help on using the changeset viewer.