Ignore:
File:
1 edited

Legend:

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

    r0d6915f r7e752b2  
    4848#include <ctype.h>
    4949#include <errno.h>
     50#include <inttypes.h>
    5051
    5152#include <ipc/driver.h>
     
    164165       
    165166        devman_handle_t dev_handle =  IPC_GET_ARG1(*icall);
    166         devman_handle_t parent_dev_handle = IPC_GET_ARG2(*icall);
    167    
    168167        device_t *dev = create_device();
    169168        dev->handle = dev_handle;
     
    173172       
    174173        add_to_devices_list(dev);
    175         dev->parent = driver_get_device(&devices, parent_dev_handle);
    176        
    177174        res = driver->driver_ops->add_device(dev);
    178175        if (0 == res) {
    179                 printf("%s: new device with handle = %x was added.\n",
     176                printf("%s: new device with handle=%" PRIun " was added.\n",
    180177                    driver->name, dev_handle);
    181178        } else {
    182                 printf("%s: failed to add a new device with handle = %d.\n",
     179                printf("%s: failed to add a new device with handle = %" PRIun ".\n",
    183180                    driver->name, dev_handle);
    184181                remove_from_devices_list(dev);
     
    207204                        break;
    208205                default:
    209                         if (!(callid & IPC_CALLID_NOTIFICATION))
    210                                 ipc_answer_0(callid, ENOENT);
     206                        ipc_answer_0(callid, ENOENT);
    211207                }
    212208        }
     
    230226        if (dev == NULL) {
    231227                printf("%s: driver_connection_gen error - no device with handle"
    232                     " %x was found.\n", driver->name, handle);
     228                    " %" PRIun " was found.\n", driver->name, handle);
    233229                ipc_answer_0(iid, ENOENT);
    234230                return;
     
    294290                                printf("%s: driver_connection_gen error - ",
    295291                                    driver->name);
    296                                 printf("device with handle %d has no interface "
     292                                printf("device with handle %" PRIun " has no interface "
    297293                                    "with id %d.\n", handle, iface_idx);
    298294                                ipc_answer_0(callid, ENOTSUP);
Note: See TracChangeset for help on using the changeset viewer.