Changes in uspace/srv/devman/devman.c [8b1e15ac:df147c7] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/devman.c
r8b1e15ac rdf147c7 266 266 } 267 267 268 if (read(fd, buf, len) <= 0) { 268 ssize_t read_bytes = safe_read(fd, buf, len); 269 if (read_bytes <= 0) { 269 270 printf(NAME ": unable to read file '%s'.\n", conf_path); 270 271 goto cleanup; 271 272 } 272 buf[ len] = 0;273 buf[read_bytes] = 0; 273 274 274 275 suc = parse_match_ids(buf, ids); … … 1123 1124 fun_node_t *find_fun_node_by_path(dev_tree_t *tree, char *path) 1124 1125 { 1126 assert(path != NULL); 1127 1128 bool is_absolute = path[0] == '/'; 1129 if (!is_absolute) { 1130 return NULL; 1131 } 1132 1125 1133 fibril_rwlock_read_lock(&tree->rwlock); 1126 1134 … … 1132 1140 char *rel_path = path; 1133 1141 char *next_path_elem = NULL; 1134 bool cont = (rel_path[0] == '/');1142 bool cont = true; 1135 1143 1136 1144 while (cont && fun != NULL) { … … 1215 1223 if (info != NULL) { 1216 1224 memset(info, 0, sizeof(dev_class_info_t)); 1217 li st_initialize(&info->dev_classes);1218 li st_initialize(&info->devmap_link);1219 li st_initialize(&info->link);1225 link_initialize(&info->dev_classes); 1226 link_initialize(&info->devmap_link); 1227 link_initialize(&info->link); 1220 1228 } 1221 1229
Note:
See TracChangeset
for help on using the changeset viewer.