Ignore:
File:
1 edited

Legend:

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

    r3193c05 rb3d513f  
    4141#include "ski.h"
    4242#include "sgcn.h"
    43 #include "niagara.h"
    4443#include "main.h"
    4544
     
    6059int main(int argc, char *argv[])
    6160{
    62         printf("%s: HelenOS Framebuffer service\n", NAME);
     61        printf(NAME ": HelenOS Framebuffer service\n");
    6362       
     63        ipcarg_t phonead;
    6464        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         }
    7565       
    7666#ifdef FB_ENABLED
    77         if ((!initialized) && (fb_kind == 1)) {
     67        if (sysinfo_value("fb.kind") == 1) {
    7868                if (fb_init() == 0)
    7969                        initialized = true;
     
    8171#endif
    8272#ifdef EGA_ENABLED
    83         if ((!initialized) && (fb_kind == 2)) {
     73        if ((!initialized) && (sysinfo_value("fb.kind") == 2)) {
    8474                if (ega_init() == 0)
    8575                        initialized = true;
     
    8777#endif
    8878#ifdef MSIM_ENABLED
    89         if ((!initialized) && (fb_kind == 3)) {
     79        if ((!initialized) && (sysinfo_value("fb.kind") == 3)) {
    9080                if (msim_init() == 0)
    9181                        initialized = true;
     
    9383#endif
    9484#ifdef SGCN_ENABLED
    95         if ((!initialized) && (fb_kind == 4)) {
     85        if ((!initialized) && (sysinfo_value("fb.kind") == 4)) {
    9686                if (sgcn_init() == 0)
    9787                        initialized = true;
    9888        }
    9989#endif
    100 #ifdef NIAGARA_ENABLED
    101         if ((!initialized) && (fb_kind == 5)) {
    102                 if (niagara_init() == 0)
    103                         initialized = true;
    104         }
    105 #endif
    10690#ifdef SKI_ENABLED
    107         if ((!initialized) && (fb_kind == 6)) {
     91        if ((!initialized) && (sysinfo_value("fb") != true)) {
    10892                if (ski_init() == 0)
    10993                        initialized = true;
     
    11498                return -1;
    11599       
    116         ipcarg_t phonead;
    117100        if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0)
    118101                return -1;
    119102       
    120         printf("%s: Accepting connections\n", NAME);
     103        printf(NAME ": Accepting connections\n");
    121104        async_manager();
    122105       
Note: See TracChangeset for help on using the changeset viewer.