Changeset bbc28be in mainline for uspace/lib/drv/generic/driver.c
- Timestamp:
- 2010-12-03T12:59:13Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 70c85211
- Parents:
- 2e15ac40 (diff), da55d5b (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/drv/generic/driver.c
r2e15ac40 rbbc28be 48 48 #include <ctype.h> 49 49 #include <errno.h> 50 #include <inttypes.h> 50 51 51 52 #include <ipc/driver.h> … … 164 165 165 166 devman_handle_t dev_handle = IPC_GET_ARG1(*icall); 167 devman_handle_t parent_dev_handle = IPC_GET_ARG2(*icall); 168 166 169 device_t *dev = create_device(); 167 170 dev->handle = dev_handle; … … 171 174 172 175 add_to_devices_list(dev); 176 dev->parent = driver_get_device(&devices, parent_dev_handle); 177 173 178 res = driver->driver_ops->add_device(dev); 174 179 if (0 == res) { 175 printf("%s: new device with handle = %xwas added.\n",180 printf("%s: new device with handle=%" PRIun " was added.\n", 176 181 driver->name, dev_handle); 177 182 } else { 178 printf("%s: failed to add a new device with handle = % d.\n",183 printf("%s: failed to add a new device with handle = %" PRIun ".\n", 179 184 driver->name, dev_handle); 180 185 remove_from_devices_list(dev); … … 203 208 break; 204 209 default: 205 if (!(callid & IPC_CALLID_NOTIFICATION)) 206 ipc_answer_0(callid, ENOENT); 210 ipc_answer_0(callid, ENOENT); 207 211 } 208 212 } … … 226 230 if (dev == NULL) { 227 231 printf("%s: driver_connection_gen error - no device with handle" 228 " % xwas found.\n", driver->name, handle);232 " %" PRIun " was found.\n", driver->name, handle); 229 233 ipc_answer_0(iid, ENOENT); 230 234 return; … … 290 294 printf("%s: driver_connection_gen error - ", 291 295 driver->name); 292 printf("device with handle % dhas no interface "296 printf("device with handle %" PRIun " has no interface " 293 297 "with id %d.\n", handle, iface_idx); 294 298 ipc_answer_0(callid, ENOTSUP);
Note:
See TracChangeset
for help on using the changeset viewer.