Changeset ebcb05a in mainline for uspace/srv/devman/devman.c
- Timestamp:
- 2011-04-01T19:00:51Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 969585f, ea53529
- Parents:
- bdbb6f6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/devman.c
rbdbb6f6 rebcb05a 148 148 149 149 log_msg(LVL_NOTE, "Driver `%s' was added to the list of available " 150 "drivers. \n", drv->name);150 "drivers.", drv->name); 151 151 } 152 152 … … 238 238 bool read_match_ids(const char *conf_path, match_id_list_t *ids) 239 239 { 240 log_msg(LVL_DEBUG, "read_match_ids(conf_path=\"%s\") \n", conf_path);240 log_msg(LVL_DEBUG, "read_match_ids(conf_path=\"%s\")", conf_path); 241 241 242 242 bool suc = false; … … 248 248 fd = open(conf_path, O_RDONLY); 249 249 if (fd < 0) { 250 log_msg(LVL_ERROR, "Unable to open `%s' for reading: %s. \n",250 log_msg(LVL_ERROR, "Unable to open `%s' for reading: %s.", 251 251 conf_path, str_error(fd)); 252 252 goto cleanup; … … 257 257 lseek(fd, 0, SEEK_SET); 258 258 if (len == 0) { 259 log_msg(LVL_ERROR, "Configuration file '%s' is empty. \n",259 log_msg(LVL_ERROR, "Configuration file '%s' is empty.", 260 260 conf_path); 261 261 goto cleanup; … … 265 265 if (buf == NULL) { 266 266 log_msg(LVL_ERROR, "Memory allocation failed when parsing file " 267 "'%s'. \n", conf_path);267 "'%s'.", conf_path); 268 268 goto cleanup; 269 269 } … … 271 271 ssize_t read_bytes = safe_read(fd, buf, len); 272 272 if (read_bytes <= 0) { 273 log_msg(LVL_ERROR, "Unable to read file '%s'. \n", conf_path);273 log_msg(LVL_ERROR, "Unable to read file '%s'.", conf_path); 274 274 goto cleanup; 275 275 } … … 309 309 bool get_driver_info(const char *base_path, const char *name, driver_t *drv) 310 310 { 311 log_msg(LVL_DEBUG, "get_driver_info(base_path=\"%s\", name=\"%s\") \n",311 log_msg(LVL_DEBUG, "get_driver_info(base_path=\"%s\", name=\"%s\")", 312 312 base_path, name); 313 313 … … 369 369 int lookup_available_drivers(driver_list_t *drivers_list, const char *dir_path) 370 370 { 371 log_msg(LVL_DEBUG, "lookup_available_drivers(dir=\"%s\") \n", dir_path);371 log_msg(LVL_DEBUG, "lookup_available_drivers(dir=\"%s\")", dir_path); 372 372 373 373 int drv_cnt = 0; … … 403 403 dev_node_t *dev; 404 404 405 log_msg(LVL_DEBUG, "create_root_nodes() \n");405 log_msg(LVL_DEBUG, "create_root_nodes()"); 406 406 407 407 fibril_rwlock_write_lock(&tree->rwlock); … … 488 488 void attach_driver(dev_node_t *dev, driver_t *drv) 489 489 { 490 log_msg(LVL_DEBUG, "attach_driver(dev=\"%s\",drv=\"%s\") \n",490 log_msg(LVL_DEBUG, "attach_driver(dev=\"%s\",drv=\"%s\")", 491 491 dev->pfun->pathname, drv->name); 492 492 … … 511 511 assert(fibril_mutex_is_locked(&drv->driver_mutex)); 512 512 513 log_msg(LVL_DEBUG, "start_driver(drv=\"%s\") \n", drv->name);513 log_msg(LVL_DEBUG, "start_driver(drv=\"%s\")", drv->name); 514 514 515 515 rc = task_spawnl(NULL, drv->binary_path, drv->binary_path, NULL); 516 516 if (rc != EOK) { 517 log_msg(LVL_ERROR, "Spawning driver `%s' (%s) failed: %s. \n",517 log_msg(LVL_ERROR, "Spawning driver `%s' (%s) failed: %s.", 518 518 drv->name, drv->binary_path, str_error(rc)); 519 519 return false; … … 578 578 int phone; 579 579 580 log_msg(LVL_DEBUG, "pass_devices_to_driver(driver=\"%s\") \n",580 log_msg(LVL_DEBUG, "pass_devices_to_driver(driver=\"%s\")", 581 581 driver->name); 582 582 … … 646 646 * immediately and possibly started here as well. 647 647 */ 648 log_msg(LVL_DEBUG, "Driver `%s' enters running state. \n", driver->name);648 log_msg(LVL_DEBUG, "Driver `%s' enters running state.", driver->name); 649 649 driver->state = DRIVER_RUNNING; 650 650 … … 663 663 void initialize_running_driver(driver_t *driver, dev_tree_t *tree) 664 664 { 665 log_msg(LVL_DEBUG, "initialize_running_driver(driver=\"%s\") \n",665 log_msg(LVL_DEBUG, "initialize_running_driver(driver=\"%s\")", 666 666 driver->name); 667 667 … … 754 754 * access any structures that would affect driver_t. 755 755 */ 756 log_msg(LVL_DEBUG, "add_device(drv=\"%s\", dev=\"%s\") \n",756 log_msg(LVL_DEBUG, "add_device(drv=\"%s\", dev=\"%s\")", 757 757 drv->name, dev->pfun->name); 758 758 … … 816 816 driver_t *drv = find_best_match_driver(drivers_list, dev); 817 817 if (drv == NULL) { 818 log_msg(LVL_ERROR, "No driver found for device `%s'. \n",818 log_msg(LVL_ERROR, "No driver found for device `%s'.", 819 819 dev->pfun->pathname); 820 820 return false; … … 854 854 bool init_device_tree(dev_tree_t *tree, driver_list_t *drivers_list) 855 855 { 856 log_msg(LVL_DEBUG, "init_device_tree() \n");856 log_msg(LVL_DEBUG, "init_device_tree()"); 857 857 858 858 tree->current_handle = 0; … … 1033 1033 fun->pathname = (char *) malloc(pathsize); 1034 1034 if (fun->pathname == NULL) { 1035 log_msg(LVL_ERROR, "Failed to allocate device path. \n");1035 log_msg(LVL_ERROR, "Failed to allocate device path."); 1036 1036 return false; 1037 1037 } … … 1064 1064 assert(fibril_rwlock_is_write_locked(&tree->rwlock)); 1065 1065 1066 log_msg(LVL_DEBUG, "insert_dev_node(dev=%p, pfun=%p [\"%s\"]) \n",1066 log_msg(LVL_DEBUG, "insert_dev_node(dev=%p, pfun=%p [\"%s\"])", 1067 1067 dev, pfun, pfun->pathname); 1068 1068
Note:
See TracChangeset
for help on using the changeset viewer.