Changeset 08d9c4e6 in mainline for uspace/srv/devman/devman.c
- Timestamp:
- 2010-02-15T21:04:59Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e85920d
- Parents:
- e2b9a993
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/devman.c
re2b9a993 r08d9c4e6 41 41 driver_t * create_driver() 42 42 { 43 printf(NAME ": create_driver\n"); 44 43 45 driver_t *res = malloc(sizeof(driver_t)); 44 46 if(res != NULL) { 45 clean_driver(res);47 init_driver(res); 46 48 } 47 49 return res; … … 102 104 bool read_match_ids(const char *conf_path, match_id_list_t *ids) 103 105 { 106 printf(NAME ": read_match_ids conf_path = %s.\n", conf_path); 107 104 108 bool suc = false; 105 109 char *buf = NULL; … … 150 154 bool get_driver_info(const char *base_path, const char *name, driver_t *drv) 151 155 { 156 printf(NAME ": get_driver_info base_path = %s, name = %s.\n", base_path, name); 157 152 158 assert(base_path != NULL && name != NULL && drv != NULL); 153 159 … … 160 166 goto cleanup; 161 167 } 168 169 printf(NAME ": get_driver_info - path to match id list = %s.\n", match_path); 162 170 163 171 if (!read_match_ids(match_path, &drv->match_ids)) { … … 208 216 int lookup_available_drivers(link_t *drivers_list, const char *dir_path) 209 217 { 218 printf(NAME ": lookup_available_drivers \n"); 219 210 220 int drv_cnt = 0; 211 221 DIR *dir = NULL; … … 213 223 214 224 dir = opendir(dir_path); 225 printf(NAME ": lookup_available_drivers has opened directory %s for driver search.\n", dir_path); 226 215 227 if (dir != NULL) { 216 228 driver_t *drv = create_driver(); 229 printf(NAME ": lookup_available_drivers has created driver structure.\n"); 217 230 while ((diren = readdir(dir))) { 218 231 if (get_driver_info(dir_path, diren->d_name, drv)) { 219 232 add_driver(drivers_list, drv); 233 drv_cnt++; 220 234 drv = create_driver(); 221 235 } … … 318 332 bool init_device_tree(dev_tree_t *tree, link_t *drivers_list) 319 333 { 334 printf(NAME ": init_device_tree."); 320 335 // create root node and add it to the device tree 321 336 if (NULL == (tree->root_node = create_root_node())) {
Note:
See TracChangeset
for help on using the changeset viewer.