Changeset cac458f in mainline for uspace/app
- Timestamp:
- 2011-06-22T01:59:39Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 41e2118
- Parents:
- 79506d6 (diff), f1fae414 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/app
- Files:
-
- 1 added
- 15 edited
-
edit/sheet.c (modified) (8 diffs)
-
edit/sheet.h (modified) (2 diffs)
-
init/init.c (modified) (1 diff)
-
klog/klog.c (modified) (1 diff)
-
mkbd/main.c (modified) (3 diffs)
-
ping/ping.c (modified) (1 diff)
-
sbi/src/compat.h (modified) (2 diffs)
-
sbi/src/list_t.h (modified) (1 diff)
-
tester/mm/common.c (modified) (1 diff)
-
trace/trace.c (modified) (2 diffs)
-
usbinfo/Makefile (modified) (3 diffs)
-
usbinfo/dump.c (modified) (1 diff)
-
usbinfo/hid.c (added)
-
usbinfo/main.c (modified) (4 diffs)
-
usbinfo/usbinfo.h (modified) (1 diff)
-
vuhid/Makefile (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/edit/sheet.c
r79506d6 rcac458f 75 75 return ENOMEM; 76 76 77 list_initialize(&sh->tags _head);77 list_initialize(&sh->tags); 78 78 79 79 return EOK; … … 97 97 char *ipp; 98 98 size_t sz; 99 link_t *link;100 99 tag_t *tag; 101 100 char *newp; … … 121 120 /* Adjust tags. */ 122 121 123 link = sh->tags_head.next; 124 while (link != &sh->tags_head) { 122 list_foreach(sh->tags, link) { 125 123 tag = list_get_instance(link, tag_t, link); 126 124 … … 129 127 else if (tag->b_off == pos->b_off && dir == dir_before) 130 128 tag->b_off += sz; 131 132 link = link->next;133 129 } 134 130 … … 150 146 char *spp; 151 147 size_t sz; 152 link_t *link;153 148 tag_t *tag; 154 149 char *newp; … … 162 157 163 158 /* Adjust tags. */ 164 link = sh->tags_head.next; 165 while (link != &sh->tags_head) { 159 list_foreach(sh->tags, link) { 166 160 tag = list_get_instance(link, tag_t, link); 167 161 … … 170 164 else if (tag->b_off >= spos->b_off) 171 165 tag->b_off = spos->b_off; 172 173 link = link->next;174 166 } 175 167 … … 328 320 tag->b_off = pt->b_off; 329 321 tag->sh = sh; 330 list_append(&tag->link, &sh->tags _head);322 list_append(&tag->link, &sh->tags); 331 323 } 332 324 -
uspace/app/edit/sheet.h
r79506d6 rcac458f 57 57 char *data; 58 58 59 li nk_t tags_head;59 list_t tags; 60 60 } sheet_t; 61 61 … … 91 91 /* Note: This structure is opaque for the user. */ 92 92 93 /** Link to list of all tags in the sheet (see sheet_t.tags _head) */93 /** Link to list of all tags in the sheet (see sheet_t.tags) */ 94 94 link_t link; 95 95 sheet_t *sh; -
uspace/app/init/init.c
r79506d6 rcac458f 275 275 srv_start("/srv/i8042"); 276 276 srv_start("/srv/s3c24ser"); 277 srv_start("/srv/adb_ms");278 srv_start("/srv/char_ms");279 277 srv_start("/srv/s3c24ts"); 280 278 281 279 spawn("/srv/fb"); 282 280 spawn("/srv/input"); 283 console("hid _in/input");281 console("hid/input"); 284 282 285 283 spawn("/srv/clip"); -
uspace/app/klog/klog.c
r79506d6 rcac458f 143 143 * Receives kernel klog notifications. 144 144 * 145 * @param callid IPC call ID146 * @param call IPC call structure147 * @param arg Local argument145 * @param callid IPC call ID 146 * @param call IPC call structure 147 * @param arg Local argument 148 148 * 149 149 */ -
uspace/app/mkbd/main.c
r79506d6 rcac458f 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> 54 56 #include <assert.h> 55 57 … … 166 168 167 169 usb_hid_report_path_free(path); 170 } 171 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; 168 197 } 169 198 … … 242 271 } 243 272 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 244 280 size_t actual_size; 245 281 int event_nr; -
uspace/app/ping/ping.c
r79506d6 rcac458f 341 341 config.dest_str, config.size, config.size); 342 342 343 int icmp_phone = icmp_connect_module( ICMP_CONNECT_TIMEOUT);343 int icmp_phone = icmp_connect_module(); 344 344 if (icmp_phone < 0) { 345 345 fprintf(stderr, "%s: Unable to connect to ICMP service (%s)\n", NAME, -
uspace/app/sbi/src/compat.h
r79506d6 rcac458f 38 38 #ifdef __HELENOS__ 39 39 40 #define list sbi_list 41 #define list_t sbi_list_t 42 40 43 /* 41 44 * Avoid name conflicts with ADT library. … … 44 47 #define list_prepend sbi_list_prepend 45 48 #define list_remove sbi_list_remove 49 #define list_first sbi_list_first 50 #define list_last sbi_list_last 46 51 47 52 #endif -
uspace/app/sbi/src/list_t.h
r79506d6 rcac458f 30 30 #define LIST_T_H_ 31 31 32 #include "compat.h" 33 32 34 typedef struct list_node { 33 35 struct list_node *prev, *next; -
uspace/app/tester/mm/common.c
r79506d6 rcac458f 73 73 link_t *link; 74 74 75 while ((link = list_ head(&mem_blocks)) != NULL) {75 while ((link = list_first(&mem_blocks)) != NULL) { 76 76 mem_block_t *block = list_get_instance(link, mem_block_t, link); 77 77 free_block(block); 78 78 } 79 79 80 while ((link = list_ head(&mem_areas)) != NULL) {80 while ((link = list_first(&mem_areas)) != NULL) { 81 81 mem_area_t *area = list_get_instance(link, mem_area_t, link); 82 82 unmap_area(area); -
uspace/app/trace/trace.c
r79506d6 rcac458f 792 792 proto_register(SERVICE_VFS, p); 793 793 794 #if 0 794 795 p = proto_new("console"); 795 796 … … 827 828 proto_console = p; 828 829 proto_register(SERVICE_CONSOLE, p); 830 #endif 829 831 } 830 832 -
uspace/app/usbinfo/Makefile
r79506d6 rcac458f 31 31 32 32 LIBS = \ 33 $(LIBUSBHID_PREFIX)/libusbhid.a \ 33 34 $(LIBUSBDEV_PREFIX)/libusbdev.a \ 34 35 $(LIBUSB_PREFIX)/libusb.a \ … … 37 38 -I$(LIBUSB_PREFIX)/include \ 38 39 -I$(LIBUSBDEV_PREFIX)/include \ 40 -I$(LIBUSBHID_PREFIX)/include \ 39 41 -I$(LIBDRV_PREFIX)/include 40 42 … … 43 45 dev.c \ 44 46 dump.c \ 47 hid.c \ 45 48 info.c \ 46 49 main.c -
uspace/app/usbinfo/dump.c
r79506d6 rcac458f 103 103 void dump_match_ids(match_id_list_t *matches, const char *line_prefix) 104 104 { 105 link_t *link; 106 for (link = matches->ids.next; 107 link != &matches->ids; 108 link = link->next) { 105 list_foreach(matches->ids, link) { 109 106 match_id_t *match = list_get_instance(link, match_id_t, link); 110 107 -
uspace/app/usbinfo/main.c
r79506d6 rcac458f 56 56 printf("Usage: %s [options] device [device [device [ ... ]]]\n", 57 57 app_name); 58 printf(_INDENT "The device is a devman path to the device.\n"); 58 printf(_INDENT "The device can be specified in two ways.\n"); 59 printf(_INDENT " o Using its devman path, e.g. /hw/pci0/.../usb00_a1.\n"); 60 printf(_INDENT " o Or using BUS.ADDR numbers as printed by lsusb.\n"); 59 61 60 62 _OPTION("-h --help", "Print this help and exit."); … … 65 67 _OPTION("-s --strings", "Try to print all string descriptors."); 66 68 _OPTION("-S --status", "Get status of the device."); 69 _OPTION("-r --hid-report", "Dump HID report descriptor."); 70 _OPTION("-r --hid-report-usages", "Dump usages of HID report."); 67 71 68 72 printf("\n"); … … 82 86 {"strings", no_argument, NULL, 's'}, 83 87 {"status", no_argument, NULL, 'S'}, 88 {"hid-report", no_argument, NULL, 'r'}, 89 {"hid-report-usages", no_argument, NULL, 'R'}, 84 90 {0, 0, NULL, 0} 85 91 }; 86 static const char *short_options = "himtTsS ";92 static const char *short_options = "himtTsSrR"; 87 93 88 94 static usbinfo_action_t actions[] = { … … 115 121 .opt = 'S', 116 122 .action = dump_status, 123 .active = false 124 }, 125 { 126 .opt = 'r', 127 .action = dump_hidreport_raw, 128 .active = false 129 }, 130 { 131 .opt = 'R', 132 .action = dump_hidreport_usages, 117 133 .active = false 118 134 }, -
uspace/app/usbinfo/usbinfo.h
r79506d6 rcac458f 85 85 void dump_strings(usbinfo_device_t *); 86 86 void dump_status(usbinfo_device_t *); 87 void dump_hidreport_raw(usbinfo_device_t *); 88 void dump_hidreport_usages(usbinfo_device_t *); 87 89 88 90 -
uspace/app/vuhid/Makefile
r79506d6 rcac458f 36 36 $(LIBUSBHID_PREFIX)/libusbhid.a \ 37 37 $(LIBUSBDEV_PREFIX)/libusbdev.a \ 38 $(LIBUSB_PREFIX)/libusb.a 38 $(LIBUSB_PREFIX)/libusb.a \ 39 $(LIBDRV_PREFIX)/libdrv.a 39 40 EXTRA_CFLAGS = \ 40 41 -I$(LIBUSB_PREFIX)/include \
Note:
See TracChangeset
for help on using the changeset viewer.
