Changeset 19a1800 in mainline for uspace/lib/usbvirt/src/main.c
- Timestamp:
- 2011-03-01T22:20:56Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e24e7b1
- Parents:
- 976f546 (diff), ac8285d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbvirt/src/main.c
r976f546 r19a1800 27 27 */ 28 28 29 /** @addtogroup libusbvirt usb29 /** @addtogroup libusbvirt 30 30 * @{ 31 31 */ … … 159 159 { 160 160 if (dev->vhcd_phone > 0) { 161 ipc_hangup(dev->vhcd_phone);161 async_hangup(dev->vhcd_phone); 162 162 } 163 163 … … 173 173 virtual_device_t *dev = find_device_by_id(0); 174 174 if (dev == NULL) { 175 ipc_answer_0(iid, EINVAL);175 async_answer_0(iid, EINVAL); 176 176 printf("Ooops\n"); 177 177 return; … … 183 183 /** Create necessary phones for communication with virtual HCD. 184 184 * This function wraps following calls: 185 * -# open <code>/dev/devices/\\virt\\usbhc for reading185 * -# open <code>/dev/devices/\\virt\\usbhc</code> for reading 186 186 * -# access phone of file opened in previous step 187 187 * -# create callback through just opened phone … … 203 203 } 204 204 205 const char *vhc_path = "/virt/usbhc ";205 const char *vhc_path = "/virt/usbhc/hc"; 206 206 int rc; 207 207 devman_handle_t handle; … … 220 220 } 221 221 222 sysarg_t phonehash; 223 rc = ipc_connect_to_me(hcd_phone, 0, 0, 0, &phonehash); 222 rc = async_connect_to_me(hcd_phone, 0, 0, 0, callback_connection); 224 223 if (rc != EOK) { 225 224 printf("ipc_connect_to_me() failed\n"); … … 232 231 virtual_device->vhcd_phone = hcd_phone; 233 232 virtual_device->id = 0; 234 235 async_new_connection(phonehash, 0, NULL, callback_connection);236 233 237 234 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.