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