Changeset dda2602 in mainline for uspace/srv/sysman/units/unit_svc.c


Ignore:
Timestamp:
2019-08-03T09:41:07Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
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)
Message:

sysman: Create units to start up to compositor

  • add necessary units to support basic GUI (barber, vterm)
  • lacking autostart is compensated with explicit dependencies
  • IPC_FLAG_AUTOSTART in compositor and locsrv fix
  • paths to v* binaries
  • refactored job closure creation

Conflicts:

boot/Makefile.common
uspace/app/vlaunch/vlaunch.c
uspace/srv/hid/compositor/compositor.c
uspace/srv/locsrv/locsrv.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/sysman/units/unit_svc.c

    rc0e4fc50 rdda2602  
    3939
    4040static 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},
    4242        CONFIGURATION_ITEM_SENTINEL
    4343};
     
    4747        unit_svc_t *u_svc = CAST_SVC(unit);
    4848        assert(u_svc);
     49        util_command_init(&u_svc->exec_start);
    4950}
    5051
     
    5455        unit_svc_t *u_svc = CAST_SVC(unit);
    5556
    56         free(u_svc->exec_start);
     57        util_command_deinit(&u_svc->exec_start);
    5758}
    5859
     
    8485        assert(unit->state == STATE_STOPPED);
    8586
    86         // TODO extend the simple implementation
    87         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]);
    8990        if (rc != EOK) {
    9091                unit->state = STATE_FAILED;
     
    101102        unit->state = STATE_STARTED;
    102103
     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         */
    103109        if (console_kcon()) {
    104110                sysman_log(LVL_DEBUG2, "%s: Kconsole grabbed.", __func__);
Note: See TracChangeset for help on using the changeset viewer.