Changes in uspace/lib/drv/generic/driver.c [7e752b2:0d6915f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/driver.c
r7e752b2 r0d6915f 48 48 #include <ctype.h> 49 49 #include <errno.h> 50 #include <inttypes.h>51 50 52 51 #include <ipc/driver.h> … … 165 164 166 165 devman_handle_t dev_handle = IPC_GET_ARG1(*icall); 166 devman_handle_t parent_dev_handle = IPC_GET_ARG2(*icall); 167 167 168 device_t *dev = create_device(); 168 169 dev->handle = dev_handle; … … 172 173 173 174 add_to_devices_list(dev); 175 dev->parent = driver_get_device(&devices, parent_dev_handle); 176 174 177 res = driver->driver_ops->add_device(dev); 175 178 if (0 == res) { 176 printf("%s: new device with handle =%" PRIun "was added.\n",179 printf("%s: new device with handle = %x was added.\n", 177 180 driver->name, dev_handle); 178 181 } else { 179 printf("%s: failed to add a new device with handle = % " PRIun ".\n",182 printf("%s: failed to add a new device with handle = %d.\n", 180 183 driver->name, dev_handle); 181 184 remove_from_devices_list(dev); … … 204 207 break; 205 208 default: 206 ipc_answer_0(callid, ENOENT); 209 if (!(callid & IPC_CALLID_NOTIFICATION)) 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 " % " PRIun "was found.\n", driver->name, handle);232 " %x 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 % " PRIun "has no interface "296 printf("device with handle %d 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.