Changeset aa0faeca in mainline for uspace/srv/sysman/repo.c
- Timestamp:
- 2020-03-08T16:47:18Z (5 years ago)
- Children:
- a73aaec1
- Parents:
- 13b4504
- git-author:
- Matthieu Riolo <matthieu.riolo@…> (2020-03-06 18:10:45)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2020-03-08 16:47:18)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/sysman/repo.c
r13b4504 raa0faeca 278 278 } 279 279 280 static bool repo_clean_up_unit(ht_link_t *ht_link, void *arg) 281 { 282 unit_t *unit = hash_table_get_inst(ht_link, unit_t, units_by_name); 283 284 if (unit->conditions != UNIT_CONDITION_NONE) { 285 unit_log_condition(unit); 286 287 list_foreach_safe(unit->edges_in, current_link, iter) { 288 unit_edge_t *e = list_get_instance(current_link, unit_edge_t, edges_in); 289 edge_remove(&e); 290 } 291 292 list_foreach_safe(unit->edges_out, current_link, iter) { 293 unit_edge_t *e = list_get_instance(current_link, unit_edge_t, edges_out); 294 edge_remove(&e); 295 } 296 } 297 298 return true; 299 } 300 280 301 /** Resolve unresolved dependencies between any pair of units_by_name 281 302 * … … 289 310 bool has_error = false; 290 311 hash_table_apply(&units_by_name, &repo_resolve_unit, &has_error); 312 313 if (!has_error) { 314 //once all references have been built test if there are 315 //units which dont meet the conditions. If yes, remove the edges 316 hash_table_apply(&units_by_name, &repo_clean_up_unit, &has_error); 317 } 291 318 292 319 return has_error ? ENOENT : EOK;
Note:
See TracChangeset
for help on using the changeset viewer.