Changes in uspace/srv/hid/input/input.c [74017ce:a2afd8f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/input.c
r74017ce ra2afd8f 37 37 */ 38 38 39 #include <adt/list.h> 40 #include <stdbool.h> 41 #include <fibril_synch.h> 42 #include <ipc/services.h> 43 #include <ipc/input.h> 44 #include <config.h> 45 #include <stdio.h> 46 #include <stdlib.h> 47 #include <ns.h> 48 #include <async.h> 49 #include <errno.h> 39 50 #include <adt/fifo.h> 40 #include <adt/list.h>41 #include <async.h>42 #include <config.h>43 #include <errno.h>44 #include <fibril.h>45 #include <fibril_synch.h>46 #include <io/chardev.h>47 51 #include <io/console.h> 48 52 #include <io/keycode.h> 49 #include <ipc/services.h>50 #include <ipc/input.h>51 53 #include <loc.h> 52 #include <ns.h>53 #include <stdbool.h>54 #include <stdio.h>55 #include <stdlib.h>56 54 #include <str_error.h> 57 58 #include "input.h" 55 #include <char_dev_iface.h> 56 #include <fibril.h> 57 #include "layout.h" 59 58 #include "kbd.h" 60 59 #include "kbd_port.h" 61 60 #include "kbd_ctl.h" 62 #include "layout.h"63 61 #include "mouse.h" 64 62 #include "mouse_proto.h" 65 63 #include "serial.h" 64 #include "input.h" 66 65 67 66 #define NUM_LAYOUTS 4 … … 537 536 while (true) { 538 537 uint8_t data; 539 size_t nread; 540 541 chardev_read(sdev->chardev, &data, sizeof(data), &nread); 542 /* XXX Handle error */ 538 539 char_dev_read(sdev->sess, &data, sizeof(data)); 543 540 kbd_push_data(sdev->kdev, data); 544 541 } … … 555 552 { 556 553 bool match = false; 557 int rc;558 554 559 555 serial_dev_t *sdev = serial_dev_new(); … … 563 559 sdev->kdev->svc_id = service_id; 564 560 565 rc = loc_service_get_name(service_id, &sdev->kdev->svc_name);561 int rc = loc_service_get_name(service_id, &sdev->kdev->svc_name); 566 562 if (rc != EOK) 567 563 goto fail; … … 586 582 sdev->sess = loc_service_connect(service_id, INTERFACE_DDF, 587 583 IPC_FLAG_BLOCKING); 588 589 rc = chardev_open(sdev->sess, &sdev->chardev);590 if (rc != EOK) {591 async_hangup(sdev->sess);592 sdev->sess = NULL;593 list_remove(&sdev->link);594 goto fail;595 }596 584 597 585 fid_t fid = fibril_create(serial_consumer, sdev);
Note:
See TracChangeset
for help on using the changeset viewer.