Changeset 88ad75f in mainline for uspace/srv/sysman/units/unit_cfg.c
- Timestamp:
- 2020-01-09T01:04:57Z (4 years ago)
- Children:
- 76c8209
- Parents:
- 0939097
- git-author:
- Matthieu Riolo <matthieu.riolo@…> (2020-01-05 19:24:23)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2020-01-09 01:04:57)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/sysman/units/unit_cfg.c
r0939097 r88ad75f 155 155 DIR *dir; 156 156 struct dirent *de; 157 errno_t rc; 157 158 158 159 dir = opendir(path); … … 167 168 while ((de = readdir(dir))) { 168 169 unit_t *unit = NULL; 169 errno_trc = cfg_parse_file(path, de->d_name, &unit);170 rc = cfg_parse_file(path, de->d_name, &unit); 170 171 if (rc != EOK) { 171 172 sysman_log(LVL_WARN, "Cannot load unit from file %s/%s", … … 179 180 180 181 assert(unit->repo_state == REPO_EMBRYO); 181 repo_add_unit(unit); 182 rc = repo_add_unit(unit); 183 if (rc != EOK) 184 goto error; 185 182 186 } 183 187 closedir(dir); 184 188 185 errno_t rc = repo_resolve_references(); 186 if (rc != EOK) { 187 repo_rollback(); 188 return rc; 189 } 189 rc = repo_resolve_references(); 190 if (rc != EOK) 191 goto error; 190 192 191 193 repo_commit(); 192 194 return EOK; 195 196 error: 197 repo_rollback(); 198 return rc; 193 199 } 194 200
Note:
See TracChangeset
for help on using the changeset viewer.