Changeset 15f3c3f in mainline for uspace/srv/hid/console
- Timestamp:
- 2011-06-22T22:00:52Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 86ffa27f
- Parents:
- ef09a7a
- File:
-
- 1 edited
-
uspace/srv/hid/console/console.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/console/console.c
ref09a7a r15f3c3f 53 53 #include <sysinfo.h> 54 54 #include <event.h> 55 #include < devmap.h>55 #include <loc.h> 56 56 #include <fcntl.h> 57 57 #include <vfs/vfs.h> … … 81 81 size_t index; /**< Console index */ 82 82 size_t refcount; /**< Connection reference count */ 83 devmap_handle_t devmap_handle; /**< Device handle*/83 service_id_t service_id; /**< Service ID */ 84 84 keybuffer_t keybuffer; /**< Buffer for incoming keys. */ 85 85 screenbuffer_t scr; /**< Screenbuffer for saving screen … … 582 582 continue; 583 583 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)) { 585 585 cons = &consoles[i]; 586 586 break; … … 724 724 } 725 725 726 static async_sess_t *connect_input(const char * dev_path)726 static async_sess_t *connect_input(const char *svc_path) 727 727 { 728 728 async_sess_t *sess; 729 729 async_exch_t *exch; 730 devmap_handle_t handle;731 732 int rc = devmap_device_get_handle(dev_path, &handle, 0);730 service_id_t service_id; 731 732 int rc = loc_service_get_id(svc_path, &service_id, 0); 733 733 if (rc == EOK) { 734 sess = devmap_device_connect(EXCHANGE_ATOMIC, handle, 0);734 sess = loc_service_connect(EXCHANGE_ATOMIC, service_id, 0); 735 735 if (sess == NULL) { 736 736 printf("%s: Failed to connect to input server\n", NAME); … … 776 776 } 777 777 778 /* Register driver */779 int rc = devmap_driver_register(NAME, client_connection);778 /* Register server */ 779 int rc = loc_server_register(NAME, client_connection); 780 780 if (rc < 0) { 781 printf("%s: Unable to register driver (%d)\n", NAME, rc);781 printf("%s: Unable to register server (%d)\n", NAME, rc); 782 782 return false; 783 783 } … … 823 823 consoles[i].refcount = 0; 824 824 825 char vc[ DEVMAP_NAME_MAXLEN + 1];826 snprintf(vc, DEVMAP_NAME_MAXLEN, "%s/vc%zu", NAMESPACE, i);825 char vc[LOC_NAME_MAXLEN + 1]; 826 snprintf(vc, LOC_NAME_MAXLEN, "%s/vc%zu", NAMESPACE, i); 827 827 828 if ( devmap_device_register(vc, &consoles[i].devmap_handle) != EOK) {829 printf("%s: Unable to register device %s\n", NAME, vc);828 if (loc_service_register(vc, &consoles[i].service_id) != EOK) { 829 printf("%s: Unable to register service %s\n", NAME, vc); 830 830 return false; 831 831 }
Note:
See TracChangeset
for help on using the changeset viewer.
