Subversion Repositories HelenOS

Rev

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

Rev 4536 Rev 4549
Line 126... Line 126...
126
 
126
 
127
static void getvc(char *dev, char *app)
127
static void getvc(char *dev, char *app)
128
{
128
{
129
    char *argv[4];
129
    char *argv[4];
130
    char vc[MAX_DEVICE_NAME];
130
    char vc[MAX_DEVICE_NAME];
-
 
131
    int rc;
131
   
132
   
132
    snprintf(vc, MAX_DEVICE_NAME, "/dev/%s", dev);
133
    snprintf(vc, MAX_DEVICE_NAME, "/dev/%s", dev);
133
   
134
   
134
    printf(NAME ": Spawning getvc on %s\n", vc);
135
    printf(NAME ": Spawning getvc on %s\n", vc);
135
   
136
   
136
    dev_handle_t handle;
137
    dev_handle_t handle;
137
    devmap_device_get_handle(dev, &handle, IPC_FLAG_BLOCKING);
138
    rc = devmap_device_get_handle(dev, &handle, IPC_FLAG_BLOCKING);
138
   
139
   
139
    if (handle >= 0) {
140
    if (rc == EOK) {
140
        argv[0] = "/app/getvc";
141
        argv[0] = "/app/getvc";
141
        argv[1] = vc;
142
        argv[1] = vc;
142
        argv[2] = app;
143
        argv[2] = app;
143
        argv[3] = NULL;
144
        argv[3] = NULL;
144
       
145
       
145
        if (!task_spawn("/app/getvc", argv))
146
        if (!task_spawn("/app/getvc", argv))
146
            printf(NAME ": Error spawning getvc on %s\n", vc);
147
            printf(NAME ": Error spawning getvc on %s\n", vc);
147
    } else
148
    } else {
148
        printf(NAME ": Error waiting on %s\n", vc);
149
        printf(NAME ": Error waiting on %s\n", vc);
-
 
150
    }
149
}
151
}
150
 
152
 
151
int main(int argc, char *argv[])
153
int main(int argc, char *argv[])
152
{
154
{
153
    info_print();
155
    info_print();
Line 158... Line 160...
158
    }
160
    }
159
   
161
   
160
    spawn("/srv/devfs");
162
    spawn("/srv/devfs");
161
   
163
   
162
    if (!mount_devfs()) {
164
    if (!mount_devfs()) {
163
        return(NAME ": Exiting\n");
165
        printf(NAME ": Exiting\n");
164
        return -2;
166
        return -2;
165
    }
167
    }
166
   
168
   
167
    spawn("/srv/fb");
169
    spawn("/srv/fb");
168
    spawn("/srv/kbd");
170
    spawn("/srv/kbd");