Changeset 5559712 in mainline for uspace/srv/sysman/units/unit_cfg.c
- Timestamp:
- 2019-08-03T09:28:50Z (5 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/sysman/units/unit_cfg.c
r2dda1d4 r5559712 36 36 #include <stdlib.h> 37 37 #include <str.h> 38 #include <sysman/unit.h> 38 39 39 40 #include "configuration.h" … … 66 67 text_parse_init(&text_parse); 67 68 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) { 70 71 rc = EINVAL; 71 72 goto finish; … … 73 74 74 75 const char *unit_name = filename; 75 const char *unit_type_name = last_ dot+ 1;76 const char *unit_type_name = last_sep + 1; 76 77 77 78 unit_type_t unit_type = unit_type_name_to_type(unit_type_name); … … 195 196 unit_cfg_t *u_cfg = CAST_CFG(unit); 196 197 assert(u_cfg); 197 198 u_cfg->path = NULL; 199 } 200 201 198 } 202 199 203 200 static void unit_cfg_destroy(unit_t *unit) … … 243 240 } 244 241 242 static void unit_cfg_exposee_created(unit_t *unit) 243 { 244 /* Configuration has no exposees. */ 245 assert(false); 246 } 247 248 static void unit_cfg_fail(unit_t *unit) 249 { 250 /* Configuration cannot async fail. */ 251 assert(false); 252 } 253 245 254 DEFINE_UNIT_VMT(unit_cfg) 246 255
Note:
See TracChangeset
for help on using the changeset viewer.