Changeset 9532981 in mainline for uspace/srv/sysman/test/mock_unit.c


Ignore:
Timestamp:
2019-08-07T09:35:37Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
db34424
Parents:
af92309
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-11-02 23:10:51)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-07 09:35:37)
Message:

sysman: Rename dependency to edge (more generic)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/sysman/test/mock_unit.c

    raf92309 r9532981  
    2929#include <assert.h>
    3030
    31 #include "../dep.h"
     31#include "../edge.h"
    3232
    3333#include "mock_unit.h"
     
    7676}
    7777
    78 void mock_add_dependency(unit_t *dependant, unit_t *dependency)
     78void mock_add_edge(unit_t *input, unit_t *output)
    7979{
    80         int rc = dep_add_dependency(dependant, dependency);
     80        int rc = edge_connect(input, output);
    8181        assert(rc == EOK);
    8282
    83         link_t *link = list_last(&dependant->dependencies);
    84         unit_dependency_t *dep =
    85             list_get_instance(link, unit_dependency_t, dependencies);
    86         dep->state = DEP_VALID;
     83        link_t *link = list_last(&input->edges_out);
     84        unit_edge_t *e =
     85            list_get_instance(link, unit_edge_t, edges_out);
     86        e->commited = true;
    8787}
    8888
Note: See TracChangeset for help on using the changeset viewer.