Subversion Repositories HelenOS

Rev

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

Rev 4592 Rev 4621
Line 134... Line 134...
134
   
134
   
135
    if (!task_spawn(fname, argv))
135
    if (!task_spawn(fname, argv))
136
        printf(NAME ": Error spawning %s\n", fname);
136
        printf(NAME ": Error spawning %s\n", fname);
137
}
137
}
138
 
138
 
-
 
139
static void srv_start(char *fname)
-
 
140
{
-
 
141
    char *argv[2];
-
 
142
    task_id_t id;
-
 
143
    task_exit_t texit;
-
 
144
    int rc, retval;
-
 
145
   
-
 
146
    printf(NAME ": Starting %s\n", fname);
-
 
147
   
-
 
148
    argv[0] = fname;
-
 
149
    argv[1] = NULL;
-
 
150
   
-
 
151
    id = task_spawn(fname, argv);
-
 
152
    if (!id) {
-
 
153
        printf(NAME ": Error spawning %s\n", fname);
-
 
154
        return;
-
 
155
    }
-
 
156
 
-
 
157
    rc = task_wait(id, &texit, &retval);
-
 
158
    if (rc != EOK) {
-
 
159
        printf(NAME ": Error waiting for %s\n", fname);
-
 
160
        return;
-
 
161
    }
-
 
162
 
-
 
163
    if (texit != TASK_EXIT_NORMAL || retval != 0) {
-
 
164
        printf(NAME ": Server %s failed to start (returned %d)\n",
-
 
165
            fname, retval);
-
 
166
    }
-
 
167
}
-
 
168
 
139
static void getvc(char *dev, char *app)
169
static void getvc(char *dev, char *app)
140
{
170
{
141
    char *argv[4];
171
    char *argv[4];
142
    char vc[MAX_DEVICE_NAME];
172
    char vc[MAX_DEVICE_NAME];
143
    int rc;
173
    int rc;
Line 195... Line 225...
195
    spawn("/srv/fb");
225
    spawn("/srv/fb");
196
    spawn("/srv/kbd");
226
    spawn("/srv/kbd");
197
    spawn("/srv/console");
227
    spawn("/srv/console");
198
    spawn("/srv/fhc");
228
    spawn("/srv/fhc");
199
    spawn("/srv/obio");
229
    spawn("/srv/obio");
-
 
230
 
-
 
231
    /*
-
 
232
     * Start these synchronously so that mount_data() can be
-
 
233
     * non-blocking.
-
 
234
     */
200
    spawn("/srv/ata_bd");
235
    srv_start("/srv/ata_bd");
201
    spawn("/srv/gxe_bd");
236
    srv_start("/srv/gxe_bd");
202
   
237
   
203
    usleep(250000); // FIXME
-
 
204
    mount_data();
238
    mount_data();
205
   
239
   
206
    getvc("vc0", "/app/bdsh");
240
    getvc("vc0", "/app/bdsh");
207
    getvc("vc1", "/app/bdsh");
241
    getvc("vc1", "/app/bdsh");
208
    getvc("vc2", "/app/bdsh");
242
    getvc("vc2", "/app/bdsh");