Changeset 5559712 in mainline for uspace/srv/sysman/units/unit_cfg.c


Ignore:
Timestamp:
2019-08-03T09:28:50Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
c0e4fc50
Parents:
2dda1d4
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-05-07 11:49:47)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-03 09:28:50)
Message:

sysman: Naive autostart instrumentation of locsrv

  • Add IPC_FLAG_AUTOSTART flag.
  • libsysman: sysman's broker and control API.
  • Simple implementation of service unit, exposee verification is missing.
  • Simple mapping of exposee to unit name in locsrv.
  • Temporary debug prints in locsrv.

Conflicts:

boot/Makefile.common
boot/arch/amd64/Makefile.inc
uspace/lib/c/include/ipc/services.h
uspace/srv/locsrv/locsrv.c

File:
1 edited

Legend:

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

    r2dda1d4 r5559712  
    3636#include <stdlib.h>
    3737#include <str.h>
     38#include <sysman/unit.h>
    3839
    3940#include "configuration.h"
     
    6667        text_parse_init(&text_parse);
    6768
    68         const char *last_dot = str_rchr(filename, '.');
    69         if (last_dot == NULL) {
     69        const char *last_sep = str_rchr(filename, UNIT_NAME_SEPARATOR);
     70        if (last_sep == NULL) {
    7071                rc = EINVAL;
    7172                goto finish;
     
    7374
    7475        const char *unit_name = filename;
    75         const char *unit_type_name = last_dot + 1;
     76        const char *unit_type_name = last_sep + 1;
    7677
    7778        unit_type_t unit_type = unit_type_name_to_type(unit_type_name);
     
    195196        unit_cfg_t *u_cfg = CAST_CFG(unit);
    196197        assert(u_cfg);
    197 
    198         u_cfg->path = NULL;
    199 }
    200 
    201 
     198}
    202199
    203200static void unit_cfg_destroy(unit_t *unit)
     
    243240}
    244241
     242static void unit_cfg_exposee_created(unit_t *unit)
     243{
     244        /* Configuration has no exposees. */
     245        assert(false);
     246}
     247
     248static void unit_cfg_fail(unit_t *unit)
     249{
     250        /* Configuration cannot async fail. */
     251        assert(false);
     252}
     253
    245254DEFINE_UNIT_VMT(unit_cfg)
    246255
Note: See TracChangeset for help on using the changeset viewer.