Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset db6e419 in mainline for uspace/srv/hid/console/console.c


Ignore:
Timestamp:
2011-08-16T18:53:00Z (10 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master
Children:
49160c4
Parents:
e0e922d (diff), 45058baa (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.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/console/console.c

    re0e922d rdb6e419  
    5353#include <sysinfo.h>
    5454#include <event.h>
    55 #include <devmap.h>
     55#include <loc.h>
    5656#include <fcntl.h>
    5757#include <vfs/vfs.h>
     
    8181        size_t index;             /**< Console index */
    8282        size_t refcount;          /**< Connection reference count */
    83         devmap_handle_t devmap_handle;  /**< Device handle */
     83        service_id_t service_id;  /**< Service ID */
    8484        keybuffer_t keybuffer;    /**< Buffer for incoming keys. */
    8585        screenbuffer_t scr;       /**< Screenbuffer for saving screen
     
    582582                        continue;
    583583               
    584                 if (consoles[i].devmap_handle == (devmap_handle_t) IPC_GET_ARG1(*icall)) {
     584                if (consoles[i].service_id == (service_id_t) IPC_GET_ARG1(*icall)) {
    585585                        cons = &consoles[i];
    586586                        break;
     
    721721}
    722722
    723 static async_sess_t *connect_input(const char *dev_path)
     723static async_sess_t *connect_input(const char *svc_path)
    724724{
    725725        async_sess_t *sess;
    726726        async_exch_t *exch;
    727         devmap_handle_t handle;
    728        
    729         int rc = devmap_device_get_handle(dev_path, &handle, 0);
     727        service_id_t service_id;
     728       
     729        int rc = loc_service_get_id(svc_path, &service_id, 0);
    730730        if (rc == EOK) {
    731                 sess = devmap_device_connect(EXCHANGE_ATOMIC, handle, 0);
     731                sess = loc_service_connect(EXCHANGE_ATOMIC, service_id, 0);
    732732                if (sess == NULL) {
    733733                        printf("%s: Failed to connect to input server\n", NAME);
     
    773773        }
    774774       
    775         /* Register driver */
    776         int rc = devmap_driver_register(NAME, client_connection);
     775        /* Register server */
     776        int rc = loc_server_register(NAME, client_connection);
    777777        if (rc < 0) {
    778                 printf("%s: Unable to register driver (%d)\n", NAME, rc);
     778                printf("%s: Unable to register server (%d)\n", NAME, rc);
    779779                return false;
    780780        }
     
    820820                        consoles[i].refcount = 0;
    821821                       
    822                         char vc[DEVMAP_NAME_MAXLEN + 1];
    823                         snprintf(vc, DEVMAP_NAME_MAXLEN, "%s/vc%zu", NAMESPACE, i);
     822                        char vc[LOC_NAME_MAXLEN + 1];
     823                        snprintf(vc, LOC_NAME_MAXLEN, "%s/vc%zu", NAMESPACE, i);
    824824                       
    825                         if (devmap_device_register(vc, &consoles[i].devmap_handle) != EOK) {
    826                                 printf("%s: Unable to register device %s\n", NAME, vc);
     825                        if (loc_service_register(vc, &consoles[i].service_id) != EOK) {
     826                                printf("%s: Unable to register service %s\n", NAME, vc);
    827827                                return false;
    828828                        }
Note: See TracChangeset for help on using the changeset viewer.