Changeset cd0684d in mainline for uspace/drv/rootvirt/rootvirt.c
- Timestamp:
- 2011-02-14T22:14:52Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 659ca07
- Parents:
- 97a62fe
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/rootvirt/rootvirt.c
r97a62fe rcd0684d 80 80 static int rootvirt_add_fun(device_t *vdev, virtual_function_t *vfun) 81 81 { 82 function_t *fun; 83 int rc; 84 82 85 printf(NAME ": registering function `%s' (match \"%s\")\n", 83 86 vfun->name, vfun->match_id); 84 87 85 int rc = register_function_wrapper(vdev, vfun->name, 86 vfun->match_id, 10); 87 88 if (rc == EOK) { 89 printf(NAME ": registered child device `%s'\n", 90 vfun->name); 91 } else { 92 printf(NAME ": failed to register child device `%s': %s\n", 93 vfun->name, str_error(rc)); 88 fun = ddf_fun_create(vdev, fun_inner, vfun->name); 89 if (fun == NULL) { 90 printf(NAME ": error creating function %s\n", vfun->name); 91 return ENOMEM; 94 92 } 95 93 96 return rc; 94 rc = ddf_fun_add_match_id(fun, vfun->match_id, 10); 95 if (rc != EOK) { 96 printf(NAME ": error adding match IDs to function %s\n", 97 vfun->name); 98 ddf_fun_destroy(fun); 99 return rc; 100 } 101 102 rc = ddf_fun_bind(fun); 103 if (rc != EOK) { 104 printf(NAME ": error binding function %s: %s\n", vfun->name, 105 str_error(rc)); 106 ddf_fun_destroy(fun); 107 return rc; 108 } 109 110 printf(NAME ": registered child device `%s'\n", vfun->name); 111 return EOK; 97 112 } 98 113
Note:
See TracChangeset
for help on using the changeset viewer.