Changeset 9a66bc2 in mainline for uspace/srv/devman/main.c
- Timestamp:
- 2010-04-04T21:52:26Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8c06905
- Parents:
- 5cd136ab
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/main.c
r5cd136ab r9a66bc2 258 258 } 259 259 260 static void devman_forward(ipc_callid_t iid, ipc_call_t *icall, bool drv_to_parent) { 261 device_handle_t handle; 260 static void devman_forward(ipc_callid_t iid, ipc_call_t *icall, bool drv_to_parent) { 261 262 device_handle_t handle = IPC_GET_ARG2(*icall); 263 printf(NAME ": devman_forward - trying to forward connection to device with handle %x.\n", handle); 264 262 265 node_t *dev = find_dev_node(&device_tree, handle); 263 266 if (NULL == dev) { 267 printf(NAME ": devman_forward error - no device with handle %x was found.\n", handle); 264 268 ipc_answer_0(iid, ENOENT); 265 269 return; … … 269 273 270 274 if (drv_to_parent) { 271 driver = dev->parent->drv; 275 if (NULL != dev->parent) { 276 driver = dev->parent->drv; 277 } 272 278 } else { 273 279 driver = dev->drv; 274 280 } 275 281 276 if (NULL == driver) { 282 if (NULL == driver) { 283 printf(NAME ": devman_forward error - no driver to connect to.\n", handle); 277 284 ipc_answer_0(iid, ENOENT); 278 285 return; … … 286 293 } 287 294 295 if (driver->phone <= 0) { 296 printf(NAME ": devman_forward: cound not forward to driver %s (the driver's phone is %x).\n", driver->name, driver->phone); 297 return; 298 } 299 printf(NAME ": devman_forward: forward to driver %s with phone %d.\n", driver->name, driver->phone); 288 300 ipc_forward_fast(iid, driver->phone, method, dev->handle, 0, IPC_FF_NONE); 289 301 }
Note:
See TracChangeset
for help on using the changeset viewer.