Changeset 593e023 in mainline for uspace/app/init/init.c
- Timestamp:
- 2014-08-12T17:14:32Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c3bdc92
- Parents:
- ce3efa0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/init/init.c
rce3efa0 r593e023 272 272 } 273 273 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 } 274 static void getterm(const char *svc, const char *app, bool msg) 275 { 276 if (msg) { 277 printf("%s: Spawning %s %s %s --msg --wait -- %s\n", NAME, 278 APP_GETTERM, svc, LOCFS_MOUNT_POINT, app); 279 280 int rc = task_spawnl(NULL, APP_GETTERM, APP_GETTERM, svc, 281 LOCFS_MOUNT_POINT, "--msg", "--wait", "--", app, NULL); 282 if (rc != EOK) 283 printf("%s: Error spawning %s %s %s --msg --wait -- %s\n", 284 NAME, APP_GETTERM, svc, LOCFS_MOUNT_POINT, app); 297 285 } 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 } 286 printf("%s: Spawning %s %s %s --wait -- %s\n", NAME, 287 APP_GETTERM, svc, LOCFS_MOUNT_POINT, app); 288 289 int rc = task_spawnl(NULL, APP_GETTERM, APP_GETTERM, svc, 290 LOCFS_MOUNT_POINT, "--wait", "--", app, NULL); 291 if (rc != EOK) 292 printf("%s: Error spawning %s %s %s --wait -- %s\n", 293 NAME, APP_GETTERM, svc, LOCFS_MOUNT_POINT, app); 304 294 } 305 295 } … … 364 354 gui_start("/app/vlaunch", HID_COMPOSITOR_SERVER); 365 355 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 } 356 } 357 358 rc = console(HID_INPUT, HID_OUTPUT); 359 if (rc == EOK) { 360 getterm("term/vc0", "/app/bdsh", true); 361 getterm("term/vc1", "/app/bdsh", false); 362 getterm("term/vc2", "/app/bdsh", false); 363 getterm("term/vc3", "/app/bdsh", false); 364 getterm("term/vc4", "/app/bdsh", false); 365 getterm("term/vc5", "/app/bdsh", false); 377 366 } 378 367
Note:
See TracChangeset
for help on using the changeset viewer.