Changeset bb154c6 in mainline for uspace/srv/sysman/units/unit_tgt.c


Ignore:
Timestamp:
2019-08-03T08:15:25Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
09a8006
Parents:
6006f35
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-04-15 15:14:58)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-03 08:15:25)
Message:

Add skeleton for configuration files loading

  • Create content of /cfg directory,
  • create sample configuration file,
  • refactored polymorphism.

Conflicts:

boot/Makefile

File:
1 edited

Legend:

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

    r6006f35 rbb154c6  
    11#include <errno.h>
    22
    3 #include "unit_tgt.h"
     3#include "unit.h"
    44
    55static void unit_tgt_init(unit_t *unit)
    66{
    7         // TODO
     7        unit_tgt_t *u_tgt = CAST_TGT(unit);
     8        assert(u_tgt);
     9        /* Nothing more to do */
     10}
     11
     12static void unit_tgt_destroy(unit_t *unit)
     13{
     14        unit_tgt_t *u_tgt = CAST_TGT(unit);
     15        assert(u_tgt);
     16        /* Nothing more to do */
     17}
     18
     19static int unit_tgt_load(unit_t *unit, ini_configuration_t *ini_conf,
     20    text_parse_t *text_parse)
     21{
     22        unit_tgt_t *u_tgt = CAST_TGT(unit);
     23        assert(u_tgt);
     24
     25        return EOK;
    826}
    927
    1028static int unit_tgt_start(unit_t *unit)
    1129{
    12         //TODO
     30        unit_tgt_t *u_tgt = CAST_TGT(unit);
     31        assert(u_tgt);
     32
    1333        return EOK;
    1434}
    1535
    16 static void unit_tgt_destroy(unit_t *unit)
    17 {
    18         //TODO
    19 }
     36DEFINE_UNIT_VMT(unit_tgt)
    2037
    21 
    22 DEFINE_UNIT_OPS(unit_tgt)
    23 
Note: See TracChangeset for help on using the changeset viewer.