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