Changeset cac458f in mainline for uspace/app


Ignore:
Timestamp:
2011-06-22T01:59:39Z (15 years ago)
Author:
Petr Koupy <petr.koupy@…>
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.
Message:

Merge libposix changes.

Location:
uspace/app
Files:
1 added
15 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/edit/sheet.c

    r79506d6 rcac458f  
    7575                return ENOMEM;
    7676
    77         list_initialize(&sh->tags_head);
     77        list_initialize(&sh->tags);
    7878
    7979        return EOK;
     
    9797        char *ipp;
    9898        size_t sz;
    99         link_t *link;
    10099        tag_t *tag;
    101100        char *newp;
     
    121120        /* Adjust tags. */
    122121
    123         link = sh->tags_head.next;
    124         while (link != &sh->tags_head) {
     122        list_foreach(sh->tags, link) {
    125123                tag = list_get_instance(link, tag_t, link);
    126124
     
    129127                else if (tag->b_off == pos->b_off && dir == dir_before)
    130128                        tag->b_off += sz;
    131 
    132                 link = link->next;
    133129        }
    134130
     
    150146        char *spp;
    151147        size_t sz;
    152         link_t *link;
    153148        tag_t *tag;
    154149        char *newp;
     
    162157
    163158        /* Adjust tags. */
    164         link = sh->tags_head.next;
    165         while (link != &sh->tags_head) {
     159        list_foreach(sh->tags, link) {
    166160                tag = list_get_instance(link, tag_t, link);
    167161
     
    170164                else if (tag->b_off >= spos->b_off)
    171165                        tag->b_off = spos->b_off;
    172 
    173                 link = link->next;
    174166        }
    175167
     
    328320        tag->b_off = pt->b_off;
    329321        tag->sh = sh;
    330         list_append(&tag->link, &sh->tags_head);
     322        list_append(&tag->link, &sh->tags);
    331323}
    332324
  • uspace/app/edit/sheet.h

    r79506d6 rcac458f  
    5757        char *data;
    5858
    59         link_t tags_head;
     59        list_t tags;
    6060} sheet_t;
    6161
     
    9191        /* Note: This structure is opaque for the user. */
    9292
    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) */
    9494        link_t link;
    9595        sheet_t *sh;
  • uspace/app/init/init.c

    r79506d6 rcac458f  
    275275        srv_start("/srv/i8042");
    276276        srv_start("/srv/s3c24ser");
    277         srv_start("/srv/adb_ms");
    278         srv_start("/srv/char_ms");
    279277        srv_start("/srv/s3c24ts");
    280278       
    281279        spawn("/srv/fb");
    282280        spawn("/srv/input");
    283         console("hid_in/input");
     281        console("hid/input");
    284282       
    285283        spawn("/srv/clip");
  • uspace/app/klog/klog.c

    r79506d6 rcac458f  
    143143 * Receives kernel klog notifications.
    144144 *
    145  * @param callid        IPC call ID
    146  * @param call          IPC call structure
    147  * @param arg           Local argument
     145 * @param callid IPC call ID
     146 * @param call   IPC call structure
     147 * @param arg    Local argument
    148148 *
    149149 */
  • uspace/app/mkbd/main.c

    r79506d6 rcac458f  
    5252#include <usb/hid/hiddescriptor.h>
    5353#include <usb/hid/usages/consumer.h>
     54#include <io/console.h>
     55#include <io/keycode.h>
    5456#include <assert.h>
    5557
     
    166168       
    167169        usb_hid_report_path_free(path);
     170}
     171
     172static 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;
    168197}
    169198
     
    242271        }
    243272       
     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
    244280        size_t actual_size;
    245281        int event_nr;
  • uspace/app/ping/ping.c

    r79506d6 rcac458f  
    341341            config.dest_str, config.size, config.size);
    342342       
    343         int icmp_phone = icmp_connect_module(ICMP_CONNECT_TIMEOUT);
     343        int icmp_phone = icmp_connect_module();
    344344        if (icmp_phone < 0) {
    345345                fprintf(stderr, "%s: Unable to connect to ICMP service (%s)\n", NAME,
  • uspace/app/sbi/src/compat.h

    r79506d6 rcac458f  
    3838#ifdef __HELENOS__
    3939
     40#define list sbi_list
     41#define list_t sbi_list_t
     42
    4043/*
    4144 * Avoid name conflicts with ADT library.
     
    4447#define list_prepend sbi_list_prepend
    4548#define list_remove sbi_list_remove
     49#define list_first sbi_list_first
     50#define list_last sbi_list_last
    4651
    4752#endif
  • uspace/app/sbi/src/list_t.h

    r79506d6 rcac458f  
    3030#define LIST_T_H_
    3131
     32#include "compat.h"
     33
    3234typedef struct list_node {
    3335        struct list_node *prev, *next;
  • uspace/app/tester/mm/common.c

    r79506d6 rcac458f  
    7373        link_t *link;
    7474       
    75         while ((link = list_head(&mem_blocks)) != NULL) {
     75        while ((link = list_first(&mem_blocks)) != NULL) {
    7676                mem_block_t *block = list_get_instance(link, mem_block_t, link);
    7777                free_block(block);
    7878        }
    7979       
    80         while ((link = list_head(&mem_areas)) != NULL) {
     80        while ((link = list_first(&mem_areas)) != NULL) {
    8181                mem_area_t *area = list_get_instance(link, mem_area_t, link);
    8282                unmap_area(area);
  • uspace/app/trace/trace.c

    r79506d6 rcac458f  
    792792        proto_register(SERVICE_VFS, p);
    793793
     794#if 0
    794795        p = proto_new("console");
    795796
     
    827828        proto_console = p;
    828829        proto_register(SERVICE_CONSOLE, p);
     830#endif
    829831}
    830832
  • uspace/app/usbinfo/Makefile

    r79506d6 rcac458f  
    3131
    3232LIBS = \
     33        $(LIBUSBHID_PREFIX)/libusbhid.a \
    3334        $(LIBUSBDEV_PREFIX)/libusbdev.a \
    3435        $(LIBUSB_PREFIX)/libusb.a \
     
    3738        -I$(LIBUSB_PREFIX)/include \
    3839        -I$(LIBUSBDEV_PREFIX)/include \
     40        -I$(LIBUSBHID_PREFIX)/include \
    3941        -I$(LIBDRV_PREFIX)/include
    4042
     
    4345        dev.c \
    4446        dump.c \
     47        hid.c \
    4548        info.c \
    4649        main.c
  • uspace/app/usbinfo/dump.c

    r79506d6 rcac458f  
    103103void dump_match_ids(match_id_list_t *matches, const char *line_prefix)
    104104{
    105         link_t *link;
    106         for (link = matches->ids.next;
    107             link != &matches->ids;
    108             link = link->next) {
     105        list_foreach(matches->ids, link) {
    109106                match_id_t *match = list_get_instance(link, match_id_t, link);
    110107
  • uspace/app/usbinfo/main.c

    r79506d6 rcac458f  
    5656        printf("Usage: %s [options] device [device [device [ ... ]]]\n",
    5757            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");
    5961
    6062        _OPTION("-h --help", "Print this help and exit.");
     
    6567        _OPTION("-s --strings", "Try to print all string descriptors.");
    6668        _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.");
    6771
    6872        printf("\n");
     
    8286        {"strings", no_argument, NULL, 's'},
    8387        {"status", no_argument, NULL, 'S'},
     88        {"hid-report", no_argument, NULL, 'r'},
     89        {"hid-report-usages", no_argument, NULL, 'R'},
    8490        {0, 0, NULL, 0}
    8591};
    86 static const char *short_options = "himtTsS";
     92static const char *short_options = "himtTsSrR";
    8793
    8894static usbinfo_action_t actions[] = {
     
    115121                .opt = 'S',
    116122                .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,
    117133                .active = false
    118134        },
  • uspace/app/usbinfo/usbinfo.h

    r79506d6 rcac458f  
    8585void dump_strings(usbinfo_device_t *);
    8686void dump_status(usbinfo_device_t *);
     87void dump_hidreport_raw(usbinfo_device_t *);
     88void dump_hidreport_usages(usbinfo_device_t *);
    8789
    8890
  • uspace/app/vuhid/Makefile

    r79506d6 rcac458f  
    3636        $(LIBUSBHID_PREFIX)/libusbhid.a \
    3737        $(LIBUSBDEV_PREFIX)/libusbdev.a \
    38         $(LIBUSB_PREFIX)/libusb.a
     38        $(LIBUSB_PREFIX)/libusb.a \
     39        $(LIBDRV_PREFIX)/libdrv.a
    3940EXTRA_CFLAGS = \
    4041        -I$(LIBUSB_PREFIX)/include \
Note: See TracChangeset for help on using the changeset viewer.