Changeset ebcb05a in mainline for uspace/drv/isa/isa.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/drv/isa/isa.c
rbdbb6f6 rebcb05a 135 135 fd = open(conf_path, O_RDONLY); 136 136 if (fd < 0) { 137 ddf_msg(LVL_ERROR, "Unable to open %s \n", conf_path);137 ddf_msg(LVL_ERROR, "Unable to open %s", conf_path); 138 138 goto cleanup; 139 139 } … … 144 144 lseek(fd, 0, SEEK_SET); 145 145 if (len == 0) { 146 ddf_msg(LVL_ERROR, "Configuration file '%s' is empty. \n",146 ddf_msg(LVL_ERROR, "Configuration file '%s' is empty.", 147 147 conf_path); 148 148 goto cleanup; … … 151 151 buf = malloc(len + 1); 152 152 if (buf == NULL) { 153 ddf_msg(LVL_ERROR, "Memory allocation failed. \n");153 ddf_msg(LVL_ERROR, "Memory allocation failed."); 154 154 goto cleanup; 155 155 } 156 156 157 157 if (0 >= read(fd, buf, len)) { 158 ddf_msg(LVL_ERROR, "Unable to read file '%s'. \n", conf_path);158 ddf_msg(LVL_ERROR, "Unable to read file '%s'.", conf_path); 159 159 goto cleanup; 160 160 } … … 252 252 fun->hw_resources.count++; 253 253 254 ddf_msg(LVL_NOTE, "Added irq 0x%x to function %s \n", irq,254 ddf_msg(LVL_NOTE, "Added irq 0x%x to function %s", irq, 255 255 fun->fnode->name); 256 256 } … … 271 271 272 272 ddf_msg(LVL_NOTE, "Added io range (addr=0x%x, size=0x%x) to " 273 "function %s \n", (unsigned int) addr, (unsigned int) len,273 "function %s", (unsigned int) addr, (unsigned int) len, 274 274 fun->fnode->name); 275 275 } … … 332 332 if (val == end) { 333 333 ddf_msg(LVL_ERROR, "Cannot read match score for function " 334 "%s. \n", fun->fnode->name);334 "%s.", fun->fnode->name); 335 335 return; 336 336 } … … 339 339 get_match_id(&id, val); 340 340 if (id == NULL) { 341 ddf_msg(LVL_ERROR, "Cannot read match ID for function %s. \n",341 ddf_msg(LVL_ERROR, "Cannot read match ID for function %s.", 342 342 fun->fnode->name); 343 343 return; … … 345 345 346 346 ddf_msg(LVL_DEBUG, "Adding match id '%s' with score %d to " 347 "function %s \n", id, score, fun->fnode->name);347 "function %s", id, score, fun->fnode->name); 348 348 349 349 rc = ddf_fun_add_match_id(fun->fnode, id, score); 350 350 if (rc != EOK) { 351 ddf_msg(LVL_ERROR, "Failed adding match ID: %s \n",351 ddf_msg(LVL_ERROR, "Failed adding match ID: %s", 352 352 str_error(rc)); 353 353 } … … 379 379 !prop_parse(fun, line, "match", &fun_parse_match_id)) { 380 380 381 ddf_msg(LVL_ERROR, "Undefined device property at line '%s' \n",381 ddf_msg(LVL_ERROR, "Undefined device property at line '%s'", 382 382 line); 383 383 } … … 441 441 fun->fnode->ops = &isa_fun_ops; 442 442 443 ddf_msg(LVL_DEBUG, "Binding function %s. \n", fun->fnode->name);443 ddf_msg(LVL_DEBUG, "Binding function %s.", fun->fnode->name); 444 444 445 445 /* XXX Handle error */ … … 469 469 static int isa_add_device(ddf_dev_t *dev) 470 470 { 471 ddf_msg(LVL_DEBUG, "isa_add_device, device handle = %d \n",471 ddf_msg(LVL_DEBUG, "isa_add_device, device handle = %d", 472 472 (int) dev->handle); 473 473 474 474 /* Make the bus device more visible. Does not do anything. */ 475 ddf_msg(LVL_DEBUG, "Adding a 'ctl' function \n");475 ddf_msg(LVL_DEBUG, "Adding a 'ctl' function"); 476 476 477 477 ddf_fun_t *ctl = ddf_fun_create(dev, fun_exposed, "ctl"); 478 478 if (ctl == NULL) { 479 ddf_msg(LVL_ERROR, "Failed creating control function. \n");479 ddf_msg(LVL_ERROR, "Failed creating control function."); 480 480 return EXDEV; 481 481 } 482 482 483 483 if (ddf_fun_bind(ctl) != EOK) { 484 ddf_msg(LVL_ERROR, "Failed binding control function. \n");484 ddf_msg(LVL_ERROR, "Failed binding control function."); 485 485 return EXDEV; 486 486 } … … 488 488 /* Add functions as specified in the configuration file. */ 489 489 isa_functions_add(dev); 490 ddf_msg(LVL_NOTE, "Finished enumerating legacy functions \n");490 ddf_msg(LVL_NOTE, "Finished enumerating legacy functions"); 491 491 492 492 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.