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


Ignore:
Timestamp:
2010-04-23T21:42:26Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6c39a907
Parents:
38aaacc2 (diff), 80badbe (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

    r38aaacc2 rf4f866c  
    6060int main(int argc, char *argv[])
    6161{
    62         printf(NAME ": HelenOS Framebuffer service\n");
     62        printf("%s: HelenOS Framebuffer service\n", NAME);
    6363       
    64         ipcarg_t phonead;
    6564        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        }
    6675       
    6776#ifdef FB_ENABLED
    68         if (sysinfo_value("fb.kind") == 1) {
     77        if ((!initialized) && (fb_kind == 1)) {
    6978                if (fb_init() == 0)
    7079                        initialized = true;
     
    7281#endif
    7382#ifdef EGA_ENABLED
    74         if ((!initialized) && (sysinfo_value("fb.kind") == 2)) {
     83        if ((!initialized) && (fb_kind == 2)) {
    7584                if (ega_init() == 0)
    7685                        initialized = true;
     
    7887#endif
    7988#ifdef MSIM_ENABLED
    80         if ((!initialized) && (sysinfo_value("fb.kind") == 3)) {
     89        if ((!initialized) && (fb_kind == 3)) {
    8190                if (msim_init() == 0)
    8291                        initialized = true;
     
    8493#endif
    8594#ifdef SGCN_ENABLED
    86         if ((!initialized) && (sysinfo_value("fb.kind") == 4)) {
     95        if ((!initialized) && (fb_kind == 4)) {
    8796                if (sgcn_init() == 0)
    8897                        initialized = true;
     
    9099#endif
    91100#ifdef NIAGARA_ENABLED
    92         if ((!initialized) && (sysinfo_value("fb.kind") == 5)) {
     101        if ((!initialized) && (fb_kind == 5)) {
    93102                if (niagara_init() == 0)
    94103                        initialized = true;
     
    96105#endif
    97106#ifdef SKI_ENABLED
    98         if ((!initialized) && (sysinfo_value("fb") != true)) {
     107        if ((!initialized) && (!fb_present)) {
    99108                if (ski_init() == 0)
    100109                        initialized = true;
     
    105114                return -1;
    106115       
     116        ipcarg_t phonead;
    107117        if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0)
    108118                return -1;
    109119       
    110         printf(NAME ": Accepting connections\n");
     120        printf("%s: Accepting connections\n", NAME);
    111121        async_manager();
    112122       
Note: See TracChangeset for help on using the changeset viewer.