Changes in uspace/app/init/init.c [a63d216:1c635d6] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/init/init.c
ra63d216 r1c635d6 172 172 va_start(ap, path); 173 173 task_id_t id; 174 int rc = task_spawn(&id, path, cnt, ap); 174 task_wait_t wait; 175 int rc = task_spawn(&id, &wait, path, cnt, ap); 175 176 va_end(ap); 176 177 … … 189 190 task_exit_t texit; 190 191 int retval; 191 rc = task_wait( id, &texit, &retval);192 rc = task_wait(&wait, &texit, &retval); 192 193 if (rc != EOK) { 193 194 printf("%s: Error waiting for %s (%s)\n", NAME, path, … … 253 254 254 255 task_id_t id; 255 int rc = task_spawnl(&id, app, app, winreg, NULL); 256 task_wait_t wait; 257 int rc = task_spawnl(&id, &wait, app, app, winreg, NULL); 256 258 if (rc != EOK) { 257 259 printf("%s: Error spawning %s %s (%s)\n", NAME, app, … … 262 264 task_exit_t texit; 263 265 int retval; 264 rc = task_wait( id, &texit, &retval);266 rc = task_wait(&wait, &texit, &retval); 265 267 if ((rc != EOK) || (texit != TASK_EXIT_NORMAL)) { 266 268 printf("%s: Error retrieving retval from %s (%s)\n", NAME, … … 272 274 } 273 275 274 static void getterm(const char *svc, const char *app, bool wmsg) 275 { 276 char term[LOC_NAME_MAXLEN]; 277 snprintf(term, LOC_NAME_MAXLEN, "%s/%s", LOCFS_MOUNT_POINT, svc); 278 279 printf("%s: Spawning %s %s %s\n", NAME, APP_GETTERM, term, app); 280 281 /* Wait for the terminal service to be ready */ 282 service_id_t service_id; 283 int rc = loc_service_get_id(svc, &service_id, IPC_FLAG_BLOCKING); 284 if (rc != EOK) { 285 printf("%s: Error waiting on %s (%s)\n", NAME, term, 286 str_error(rc)); 287 return; 288 } 289 290 if (wmsg) { 291 rc = task_spawnl(NULL, APP_GETTERM, APP_GETTERM, "-w", term, 292 app, NULL); 293 if (rc != EOK) { 294 printf("%s: Error spawning %s -w %s %s (%s)\n", NAME, 295 APP_GETTERM, term, app, str_error(rc)); 296 } 276 static void getterm(const char *svc, const char *app, bool msg) 277 { 278 if (msg) { 279 printf("%s: Spawning %s %s %s --msg --wait -- %s\n", NAME, 280 APP_GETTERM, svc, LOCFS_MOUNT_POINT, app); 281 282 int rc = task_spawnl(NULL, NULL, APP_GETTERM, APP_GETTERM, svc, 283 LOCFS_MOUNT_POINT, "--msg", "--wait", "--", app, NULL); 284 if (rc != EOK) 285 printf("%s: Error spawning %s %s %s --msg --wait -- %s\n", 286 NAME, APP_GETTERM, svc, LOCFS_MOUNT_POINT, app); 297 287 } else { 298 rc = task_spawnl(NULL, APP_GETTERM, APP_GETTERM, term, app, 299 NULL); 300 if (rc != EOK) { 301 printf("%s: Error spawning %s %s %s (%s)\n", NAME, 302 APP_GETTERM, term, app, str_error(rc)); 303 } 288 printf("%s: Spawning %s %s %s --wait -- %s\n", NAME, 289 APP_GETTERM, svc, LOCFS_MOUNT_POINT, app); 290 291 int rc = task_spawnl(NULL, NULL, APP_GETTERM, APP_GETTERM, svc, 292 LOCFS_MOUNT_POINT, "--wait", "--", app, NULL); 293 if (rc != EOK) 294 printf("%s: Error spawning %s %s %s --wait -- %s\n", 295 NAME, APP_GETTERM, svc, LOCFS_MOUNT_POINT, app); 304 296 } 305 297 } … … 364 356 gui_start("/app/vlaunch", HID_COMPOSITOR_SERVER); 365 357 gui_start("/app/vterm", HID_COMPOSITOR_SERVER); 366 } else { 367 rc = console(HID_INPUT, HID_OUTPUT); 368 if (rc == EOK) { 369 getterm("term/vc0", "/app/bdsh", true); 370 getterm("term/vc1", "/app/bdsh", false); 371 getterm("term/vc2", "/app/bdsh", false); 372 getterm("term/vc3", "/app/bdsh", false); 373 getterm("term/vc4", "/app/bdsh", false); 374 getterm("term/vc5", "/app/bdsh", false); 375 getterm("term/vc6", "/app/klog", false); 376 } 358 } 359 360 rc = console(HID_INPUT, HID_OUTPUT); 361 if (rc == EOK) { 362 getterm("term/vc0", "/app/bdsh", true); 363 getterm("term/vc1", "/app/bdsh", false); 364 getterm("term/vc2", "/app/bdsh", false); 365 getterm("term/vc3", "/app/bdsh", false); 366 getterm("term/vc4", "/app/bdsh", false); 367 getterm("term/vc5", "/app/bdsh", false); 377 368 } 378 369
Note:
See TracChangeset
for help on using the changeset viewer.