Changes in uspace/lib/drv/generic/driver.c [2a770a35:26fa82bc] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/driver.c
r2a770a35 r26fa82bc 47 47 #include <stdlib.h> 48 48 #include <str.h> 49 #include <str_error.h> 49 50 #include <ctype.h> 50 51 #include <errno.h> … … 273 274 274 275 res = driver->driver_ops->add_device(dev); 275 if (res == EOK) { 276 printf("%s: new device with handle=%" PRIun " was added.\n", 277 driver->name, dev_handle); 278 } else { 279 printf("%s: failed to add a new device with handle = %" PRIun ".\n", 280 driver->name, dev_handle); 276 if (res != EOK) 281 277 delete_device(dev); 282 }283 278 284 279 async_answer_0(iid, res); … … 408 403 get_remote_method(rem_iface, iface_method_idx); 409 404 if (iface_method_ptr == NULL) { 410 / / the interface has not such method405 /* The interface has not such method */ 411 406 printf("%s: driver_connection_gen error - " 412 407 "invalid interface method.", driver->name); … … 661 656 int ddf_driver_main(driver_t *drv) 662 657 { 658 int rc; 659 663 660 /* 664 661 * Remember the driver structure - driver_ops will be called by generic … … 674 671 675 672 /* 676 * Register driver by device manager with generic handler for incoming677 * connections.673 * Register driver with device manager using generic handler for 674 * incoming connections. 678 675 */ 679 devman_driver_register(driver->name, driver_connection); 680 676 rc = devman_driver_register(driver->name, driver_connection); 677 if (rc != EOK) { 678 printf("Error: Failed to register driver with device manager " 679 "(%s).\n", (rc == EEXISTS) ? "driver already started" : 680 str_error(rc)); 681 682 return 1; 683 } 684 685 /* Return success from the task since server has started. */ 686 rc = task_retval(0); 687 if (rc != EOK) 688 return 1; 689 681 690 async_manager(); 682 691
Note:
See TracChangeset
for help on using the changeset viewer.