Changeset dda2602 in mainline for uspace/srv/sysman/units/unit_svc.c
- Timestamp:
- 2019-08-03T09:41:07Z (5 years ago)
- Children:
- dd5c623
- Parents:
- c0e4fc50
- git-author:
- Michal Koutný <xm.koutny+hos@…> (2015-05-08 11:10:06)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-08-03 09:41:07)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/sysman/units/unit_svc.c
rc0e4fc50 rdda2602 39 39 40 40 static config_item_t unit_configuration[] = { 41 {"ExecStart", & config_parse_string, offsetof(unit_svc_t, exec_start), NULL},41 {"ExecStart", &util_parse_command, offsetof(unit_svc_t, exec_start), NULL}, 42 42 CONFIGURATION_ITEM_SENTINEL 43 43 }; … … 47 47 unit_svc_t *u_svc = CAST_SVC(unit); 48 48 assert(u_svc); 49 util_command_init(&u_svc->exec_start); 49 50 } 50 51 … … 54 55 unit_svc_t *u_svc = CAST_SVC(unit); 55 56 56 free(u_svc->exec_start);57 util_command_deinit(&u_svc->exec_start); 57 58 } 58 59 … … 84 85 assert(unit->state == STATE_STOPPED); 85 86 86 // TODO extend the simple implementation87 const char *args[] = {"warn", NULL};88 int rc = task_spawnv(NULL, NULL, u_svc->exec_start, args);87 int rc = task_spawnv(NULL, NULL, u_svc->exec_start.path, 88 u_svc->exec_start.argv); 89 sysman_log(LVL_DEBUG2, "task_spawn(%s, %s)", u_svc->exec_start.path, u_svc->exec_start.argv[0]); 89 90 if (rc != EOK) { 90 91 unit->state = STATE_FAILED; … … 101 102 unit->state = STATE_STARTED; 102 103 104 /* 105 * Workaround to see log output even after devman starts (and overrides 106 * kernel's frame buffer. It's here since devman is started as a 107 * service (however not all services are devman...). 108 */ 103 109 if (console_kcon()) { 104 110 sysman_log(LVL_DEBUG2, "%s: Kconsole grabbed.", __func__);
Note:
See TracChangeset
for help on using the changeset viewer.