Changeset 46c20c8 in mainline for uspace/srv/hid/fb/main.c


Ignore:
Timestamp:
2010-11-26T20:08:10Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
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.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    rfb150d78 r46c20c8  
    4141#include "ski.h"
    4242#include "sgcn.h"
     43#include "niagara.h"
    4344#include "main.h"
    4445
     
    5960int main(int argc, char *argv[])
    6061{
    61         printf(NAME ": HelenOS Framebuffer service\n");
     62        printf("%s: HelenOS Framebuffer service\n", NAME);
    6263       
    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        }
    6575       
    6676#ifdef FB_ENABLED
    67         if (sysinfo_value("fb.kind") == 1) {
     77        if ((!initialized) && (fb_kind == 1)) {
    6878                if (fb_init() == 0)
    6979                        initialized = true;
     
    7181#endif
    7282#ifdef EGA_ENABLED
    73         if ((!initialized) && (sysinfo_value("fb.kind") == 2)) {
     83        if ((!initialized) && (fb_kind == 2)) {
    7484                if (ega_init() == 0)
    7585                        initialized = true;
     
    7787#endif
    7888#ifdef MSIM_ENABLED
    79         if ((!initialized) && (sysinfo_value("fb.kind") == 3)) {
     89        if ((!initialized) && (fb_kind == 3)) {
    8090                if (msim_init() == 0)
    8191                        initialized = true;
     
    8393#endif
    8494#ifdef SGCN_ENABLED
    85         if ((!initialized) && (sysinfo_value("fb.kind") == 4)) {
     95        if ((!initialized) && (fb_kind == 4)) {
    8696                if (sgcn_init() == 0)
    8797                        initialized = true;
    8898        }
    8999#endif
     100#ifdef NIAGARA_ENABLED
     101        if ((!initialized) && (fb_kind == 5)) {
     102                if (niagara_init() == 0)
     103                        initialized = true;
     104        }
     105#endif
    90106#ifdef SKI_ENABLED
    91         if ((!initialized) && (sysinfo_value("fb") != true)) {
     107        if ((!initialized) && (fb_kind == 6)) {
    92108                if (ski_init() == 0)
    93109                        initialized = true;
     
    98114                return -1;
    99115       
     116        ipcarg_t phonead;
    100117        if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0)
    101118                return -1;
    102119       
    103         printf(NAME ": Accepting connections\n");
     120        printf("%s: Accepting connections\n", NAME);
    104121        async_manager();
    105122       
Note: See TracChangeset for help on using the changeset viewer.