Subversion Repositories HelenOS

Rev

Rev 3150 | Rev 3674 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3150 Rev 3403
Line 35... Line 35...
35
#include <errno.h>
35
#include <errno.h>
36
#include <stdio.h>
36
#include <stdio.h>
37
 
37
 
38
#include "fb.h"
38
#include "fb.h"
39
#include "ega.h"
39
#include "ega.h"
-
 
40
#include "msim.h"
40
#include "main.h"
41
#include "main.h"
41
 
42
 
42
#define NAME "fb"
43
#define NAME "fb"
43
 
44
 
44
void receive_comm_area(ipc_callid_t callid, ipc_call_t *call, void **area)
45
void receive_comm_area(ipc_callid_t callid, ipc_call_t *call, void **area)
Line 56... Line 57...
56
int main(int argc, char *argv[])
57
int main(int argc, char *argv[])
57
{
58
{
58
    printf(NAME ": HelenOS Framebuffer service\n");
59
    printf(NAME ": HelenOS Framebuffer service\n");
59
   
60
   
60
    ipcarg_t phonead;
61
    ipcarg_t phonead;
61
    int initialized = 0;
62
    bool initialized = false;
62
 
63
 
63
#ifdef FB_ENABLED
64
#ifdef FB_ENABLED
64
    if (sysinfo_value("fb.kind") == 1) {
65
    if (sysinfo_value("fb.kind") == 1) {
65
        if (fb_init() == 0)
66
        if (fb_init() == 0)
66
            initialized = 1;
67
            initialized = true;
67
    }
68
    }
68
#endif
69
#endif
69
#ifdef EGA_ENABLED
70
#ifdef EGA_ENABLED
70
    if (!initialized && sysinfo_value("fb.kind") == 2) {
71
    if ((!initialized) && (sysinfo_value("fb.kind") == 2)) {
71
        if (ega_init() == 0)
72
        if (ega_init() == 0)
72
            initialized = 1;
73
            initialized = true;
-
 
74
    }
-
 
75
#endif
-
 
76
#ifdef MSIM_ENABLED
-
 
77
    if ((!initialized) && (sysinfo_value("fb.kind") == 3)) {
-
 
78
        if (msim_init() == 0)
-
 
79
            initialized = true;
73
    }
80
    }
74
#endif
81
#endif
75
 
82
 
76
    if (!initialized)
83
    if (!initialized)
77
        return -1;
84
        return -1;