Changes in uspace/app/mkbd/main.c [7beb220:79ae36dd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/mkbd/main.c
r7beb220 r79ae36dd 43 43 #include <getopt.h> 44 44 #include <devman.h> 45 #include < loc.h>45 #include <devmap.h> 46 46 #include <usb/dev/hub.h> 47 47 #include <usb/hid/iface.h> … … 52 52 #include <usb/hid/hiddescriptor.h> 53 53 #include <usb/hid/usages/consumer.h> 54 #include <io/console.h>55 #include <io/keycode.h>56 54 #include <assert.h> 57 55 … … 170 168 } 171 169 172 static int wait_for_quit_fibril(void *arg)173 {174 console_ctrl_t *con = console_init(stdin, stdout);175 176 printf("Press <ESC> to quit the application.\n");177 178 while (1) {179 kbd_event_t ev;180 bool ok = console_get_kbd_event(con, &ev);181 if (!ok) {182 printf("Connection with console broken: %s.\n",183 str_error(errno));184 break;185 }186 187 if (ev.key == KC_ESCAPE) {188 break;189 }190 }191 192 console_done(con);193 194 exit(0);195 196 return EOK;197 }198 199 170 #define MAX_PATH_LENGTH 1024 200 171 … … 240 211 241 212 char path[MAX_PATH_LENGTH]; 242 rc = devman_ fun_get_path(dev_handle, path, MAX_PATH_LENGTH);213 rc = devman_get_device_path(dev_handle, path, MAX_PATH_LENGTH); 243 214 if (rc != EOK) { 244 215 return ENOMEM; … … 271 242 } 272 243 273 fid_t quit_fibril = fibril_create(wait_for_quit_fibril, NULL);274 if (quit_fibril == 0) {275 printf("Failed to start extra fibril.\n");276 return -1;277 }278 fibril_add_ready(quit_fibril);279 280 244 size_t actual_size; 281 245 int event_nr;
Note:
See TracChangeset
for help on using the changeset viewer.