Changes in uspace/app/init/init.c [1c635d6:a63d216] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/init/init.c
r1c635d6 ra63d216 172 172 va_start(ap, path); 173 173 task_id_t id; 174 task_wait_t wait; 175 int rc = task_spawn(&id, &wait, path, cnt, ap); 174 int rc = task_spawn(&id, path, cnt, ap); 176 175 va_end(ap); 177 176 … … 190 189 task_exit_t texit; 191 190 int retval; 192 rc = task_wait( &wait, &texit, &retval);191 rc = task_wait(id, &texit, &retval); 193 192 if (rc != EOK) { 194 193 printf("%s: Error waiting for %s (%s)\n", NAME, path, … … 254 253 255 254 task_id_t id; 256 task_wait_t wait; 257 int rc = task_spawnl(&id, &wait, app, app, winreg, NULL); 255 int rc = task_spawnl(&id, app, app, winreg, NULL); 258 256 if (rc != EOK) { 259 257 printf("%s: Error spawning %s %s (%s)\n", NAME, app, … … 264 262 task_exit_t texit; 265 263 int retval; 266 rc = task_wait( &wait, &texit, &retval);264 rc = task_wait(id, &texit, &retval); 267 265 if ((rc != EOK) || (texit != TASK_EXIT_NORMAL)) { 268 266 printf("%s: Error retrieving retval from %s (%s)\n", NAME, … … 274 272 } 275 273 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); 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 } 287 297 } else { 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); 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 } 296 304 } 297 305 } … … 356 364 gui_start("/app/vlaunch", HID_COMPOSITOR_SERVER); 357 365 gui_start("/app/vterm", HID_COMPOSITOR_SERVER); 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); 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 } 368 377 } 369 378
Note:
See TracChangeset
for help on using the changeset viewer.