Changes in uspace/app/mkbd/main.c [b7fd2a0:e540424a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/mkbd/main.c
rb7fd2a0 re540424a 44 44 #include <devman.h> 45 45 #include <loc.h> 46 #include <usb/dev/hub.h> 46 47 #include <usbhid_iface.h> 47 48 #include <usb/dev/pipes.h> … … 60 61 static async_sess_t *dev_sess = NULL; 61 62 62 static errno_t initialize_report_parser(async_sess_t *dev_sess,63 static int initialize_report_parser(async_sess_t *dev_sess, 63 64 usb_hid_report_t **report) 64 65 { … … 67 68 return ENOMEM; 68 69 69 errno_t rc = usb_hid_report_init(*report);70 int rc = usb_hid_report_init(*report); 70 71 if (rc != EOK) { 71 72 usb_hid_report_deinit(*report); … … 131 132 132 133 uint8_t report_id; 133 errno_t rc = usb_hid_parse_report(report, buffer, size, &report_id);134 int rc = usb_hid_parse_report(report, buffer, size, &report_id); 134 135 if (rc != EOK) 135 136 return; … … 165 166 } 166 167 167 static errno_t wait_for_quit_fibril(void *arg)168 static int wait_for_quit_fibril(void *arg) 168 169 { 169 170 console_ctrl_t *con = console_init(stdin, stdout); … … 218 219 devman_handle_t dev_handle = 0; 219 220 220 errno_t rc = usb_resolve_device_handle(devpath, &dev_handle);221 int rc = usb_resolve_device_handle(devpath, NULL, NULL, &dev_handle); 221 222 if (rc != EOK) { 222 223 printf("Device not found or not of USB kind: %s.\n", … … 237 238 rc = devman_fun_get_path(dev_handle, path, MAX_PATH_LENGTH); 238 239 if (rc != EOK) { 239 printf(NAME ": failed to get path (handle %"240 PRIun "): %s.\n", dev_handle, str_error(errno));241 240 return ENOMEM; 242 241 } … … 264 263 uint8_t *event = (uint8_t *)malloc(size); 265 264 if (event == NULL) { 266 printf("Out of memory.\n");267 265 // TODO: hangup phone? 268 266 return ENOMEM;
Note:
See TracChangeset
for help on using the changeset viewer.