Changeset b7fd2a0 in mainline for uspace/drv/root
- Timestamp:
- 2018-01-13T03:10:29Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- Location:
- uspace/drv/root
- Files:
-
- 2 edited
-
root/root.c (modified) (8 diffs)
-
virt/virt.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/root/root/root.c
r36f0738 rb7fd2a0 64 64 #define VIRTUAL_FUN_MATCH_SCORE 100 65 65 66 static int root_dev_add(ddf_dev_t *dev);67 static int root_fun_online(ddf_fun_t *fun);68 static int root_fun_offline(ddf_fun_t *fun);66 static errno_t root_dev_add(ddf_dev_t *dev); 67 static errno_t root_fun_online(ddf_fun_t *fun); 68 static errno_t root_fun_offline(ddf_fun_t *fun); 69 69 70 70 /** The root device driver's standard operations. */ … … 86 86 * @return EOK on success or an error code 87 87 */ 88 static int add_virtual_root_fun(ddf_dev_t *dev)88 static errno_t add_virtual_root_fun(ddf_dev_t *dev) 89 89 { 90 90 const char *name = VIRTUAL_FUN_NAME; 91 91 ddf_fun_t *fun; 92 int rc;92 errno_t rc; 93 93 94 94 ddf_msg(LVL_DEBUG, "Adding new function for virtual devices. " … … 127 127 * @return EOK on success or an error code 128 128 */ 129 static int add_platform_fun(ddf_dev_t *dev)129 static errno_t add_platform_fun(ddf_dev_t *dev) 130 130 { 131 131 char *match_id; … … 135 135 const char *name = PLATFORM_FUN_NAME; 136 136 ddf_fun_t *fun; 137 int rc;137 errno_t rc; 138 138 139 139 /* Get platform name from sysinfo. */ … … 201 201 * of HW and pseudo devices). 202 202 */ 203 static int root_dev_add(ddf_dev_t *dev)203 static errno_t root_dev_add(ddf_dev_t *dev) 204 204 { 205 205 ddf_msg(LVL_DEBUG, "root_dev_add, device handle=%" PRIun, … … 211 211 * vital for the system. 212 212 */ 213 int res = add_virtual_root_fun(dev);213 errno_t res = add_virtual_root_fun(dev); 214 214 if (res != EOK) 215 215 ddf_msg(LVL_WARN, "Failed to add virtual child."); … … 223 223 } 224 224 225 static int root_fun_online(ddf_fun_t *fun)225 static errno_t root_fun_online(ddf_fun_t *fun) 226 226 { 227 227 ddf_msg(LVL_DEBUG, "root_fun_online()"); … … 229 229 } 230 230 231 static int root_fun_offline(ddf_fun_t *fun)231 static errno_t root_fun_offline(ddf_fun_t *fun) 232 232 { 233 233 ddf_msg(LVL_DEBUG, "root_fun_offline()"); -
uspace/drv/root/virt/virt.c
r36f0738 rb7fd2a0 62 62 }; 63 63 64 static int virt_dev_add(ddf_dev_t *dev);65 static int virt_dev_remove(ddf_dev_t *dev);66 static int virt_fun_online(ddf_fun_t *fun);67 static int virt_fun_offline(ddf_fun_t *fun);64 static errno_t virt_dev_add(ddf_dev_t *dev); 65 static errno_t virt_dev_remove(ddf_dev_t *dev); 66 static errno_t virt_fun_online(ddf_fun_t *fun); 67 static errno_t virt_fun_offline(ddf_fun_t *fun); 68 68 69 69 static driver_ops_t virt_ops = { … … 100 100 * @return EOK on success or an error code. 101 101 */ 102 static int virt_add_fun(virt_t *virt, virtual_function_t *vfun)102 static errno_t virt_add_fun(virt_t *virt, virtual_function_t *vfun) 103 103 { 104 104 ddf_dev_t *vdev = virt->dev; 105 105 ddf_fun_t *fun; 106 106 virt_fun_t *rvfun; 107 int rc;107 errno_t rc; 108 108 109 109 ddf_msg(LVL_DEBUG, "Registering function `%s' (match \"%s\")", … … 148 148 } 149 149 150 static int virt_fun_remove(virt_fun_t *rvfun)151 { 152 int rc;150 static errno_t virt_fun_remove(virt_fun_t *rvfun) 151 { 152 errno_t rc; 153 153 const char *name = ddf_fun_get_name(rvfun->fun); 154 154 … … 172 172 173 173 174 static int virt_dev_add(ddf_dev_t *dev)174 static errno_t virt_dev_add(ddf_dev_t *dev) 175 175 { 176 176 virt_t *virt; … … 205 205 } 206 206 207 static int virt_dev_remove(ddf_dev_t *dev)207 static errno_t virt_dev_remove(ddf_dev_t *dev) 208 208 { 209 209 virt_t *virt = (virt_t *)ddf_dev_data_get(dev); 210 int rc;210 errno_t rc; 211 211 212 212 while (!list_empty(&virt->functions)) { … … 224 224 } 225 225 226 static int virt_fun_online(ddf_fun_t *fun)226 static errno_t virt_fun_online(ddf_fun_t *fun) 227 227 { 228 228 ddf_msg(LVL_DEBUG, "virt_fun_online()"); … … 230 230 } 231 231 232 static int virt_fun_offline(ddf_fun_t *fun)232 static errno_t virt_fun_offline(ddf_fun_t *fun) 233 233 { 234 234 ddf_msg(LVL_DEBUG, "virt_fun_offline()");
Note:
See TracChangeset
for help on using the changeset viewer.
