Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/driver.c

    r0ca16307 r9f6c5ef0  
    4848#include <ctype.h>
    4949#include <errno.h>
     50#include <inttypes.h>
    5051
    5152#include <ipc/driver.h>
     
    177178        res = driver->driver_ops->add_device(dev);
    178179        if (0 == res) {
    179                 printf("%s: new device with handle = %x was added.\n",
     180                printf("%s: new device with handle=%" PRIun " was added.\n",
    180181                    driver->name, dev_handle);
    181182        } else {
    182                 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",
    183184                    driver->name, dev_handle);
    184185                remove_from_devices_list(dev);
     
    207208                        break;
    208209                default:
    209                         if (!(callid & IPC_CALLID_NOTIFICATION))
    210                                 ipc_answer_0(callid, ENOENT);
     210                        ipc_answer_0(callid, ENOENT);
    211211                }
    212212        }
     
    230230        if (dev == NULL) {
    231231                printf("%s: driver_connection_gen error - no device with handle"
    232                     " %x was found.\n", driver->name, handle);
     232                    " %" PRIun " was found.\n", driver->name, handle);
    233233                ipc_answer_0(iid, ENOENT);
    234234                return;
     
    294294                                printf("%s: driver_connection_gen error - ",
    295295                                    driver->name);
    296                                 printf("device with handle %d has no interface "
     296                                printf("device with handle %" PRIun " has no interface "
    297297                                    "with id %d.\n", handle, iface_idx);
    298298                                ipc_answer_0(callid, ENOTSUP);
     
    390390 */
    391391int child_device_register_wrapper(device_t *parent, const char *child_name,
    392     const char *child_match_id, int child_match_score)
     392    const char *child_match_id, int child_match_score,
     393    devman_handle_t *child_handle)
    393394{
    394395        device_t *child = NULL;
     
    418419                goto failure;
    419420
    420         goto leave;
     421        if (child_handle != NULL) {
     422                *child_handle = child->handle;
     423        }
     424        return EOK;
    421425
    422426failure:
     
    431435        }
    432436
    433 leave:
    434437        return rc;
    435438}
Note: See TracChangeset for help on using the changeset viewer.