Changes in uspace/srv/hid/console/console.c [b366a6f4:15f3c3f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/console/console.c
rb366a6f4 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 … … 357 357 console_serialize_end(); 358 358 359 if ( console_kcon()) {359 if (__SYSCALL0(SYS_DEBUG_ENABLE_CONSOLE)) { 360 360 prev_console = active_console; 361 361 active_console = kernel_console; … … 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; … … 711 711 console_serialize_start(); 712 712 continue; 713 case CONSOLE_KCON_ENABLE: 714 change_console(kernel_console); 715 break; 713 716 } 714 717 async_answer_3(callid, EOK, arg1, arg2, arg3); … … 721 724 } 722 725 723 static async_sess_t *connect_input(const char * dev_path)726 static async_sess_t *connect_input(const char *svc_path) 724 727 { 725 728 async_sess_t *sess; 726 729 async_exch_t *exch; 727 devmap_handle_t handle;728 729 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); 730 733 if (rc == EOK) { 731 sess = devmap_device_connect(EXCHANGE_ATOMIC, handle, 0);734 sess = loc_service_connect(EXCHANGE_ATOMIC, service_id, 0); 732 735 if (sess == NULL) { 733 736 printf("%s: Failed to connect to input server\n", NAME); … … 773 776 } 774 777 775 /* Register driver */776 int rc = devmap_driver_register(NAME, client_connection);778 /* Register server */ 779 int rc = loc_server_register(NAME, client_connection); 777 780 if (rc < 0) { 778 printf("%s: Unable to register driver (%d)\n", NAME, rc);781 printf("%s: Unable to register server (%d)\n", NAME, rc); 779 782 return false; 780 783 } … … 820 823 consoles[i].refcount = 0; 821 824 822 char vc[ DEVMAP_NAME_MAXLEN + 1];823 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); 824 827 825 if ( devmap_device_register(vc, &consoles[i].devmap_handle) != EOK) {826 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); 827 830 return false; 828 831 } 829 832 } 830 833 } 834 835 /* Disable kernel output to the console */ 836 __SYSCALL0(SYS_DEBUG_DISABLE_CONSOLE); 831 837 832 838 /* Initialize the screen */
Note:
See TracChangeset
for help on using the changeset viewer.