Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset f66ca57f in mainline


Ignore:
Timestamp:
2012-08-15T15:10:53Z (9 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master
Children:
affaf2e
Parents:
1499564
Message:

Rename wacomdump to isdv4_tablet and register with unique service name.

Files:
2 edited
4 moved

Legend:

Unmodified
Added
Removed
  • boot/Makefile.common

    r1499564 rf66ca57f  
    107107        $(USPACE_PATH)/srv/fs/ext2fs/ext2fs \
    108108        $(USPACE_PATH)/srv/hid/remcons/remcons \
     109        $(USPACE_PATH)/srv/hid/isdv4_tablet/isdv4_tablet \
    109110        $(USPACE_PATH)/srv/net/ethip/ethip \
    110111        $(USPACE_PATH)/srv/net/inetsrv/inetsrv \
     
    187188        $(USPACE_PATH)/app/vuhid/vuh \
    188189        $(USPACE_PATH)/app/mkbd/mkbd \
    189         $(USPACE_PATH)/app/wacomdump/wacomdump \
    190190        $(USPACE_PATH)/app/websrv/websrv
    191191
  • uspace/Makefile

    r1499564 rf66ca57f  
    7070        app/sysinfo \
    7171        app/mkbd \
    72         app/wacomdump \
    7372        app/websrv \
    7473        srv/clipboard \
     
    10099        srv/hid/console \
    101100        srv/hid/s3c24xx_ts \
     101        srv/hid/isdv4_tablet \
    102102        srv/hid/fb \
    103103        srv/hid/input \
  • uspace/srv/hid/isdv4_tablet/Makefile

    r1499564 rf66ca57f  
    2727#
    2828
    29 USPACE_PREFIX = ../..
     29USPACE_PREFIX = ../../..
    3030#LIBS =
    3131#EXTRA_CFLAGS =
    32 BINARY = wacomdump
     32BINARY = isdv4_tablet
    3333
    3434SOURCES = \
    35         wacomdump.c \
     35        main.c \
    3636        isdv4.c
    3737
  • uspace/srv/hid/isdv4_tablet/main.c

    r1499564 rf66ca57f  
    3535#include <abi/ipc/methods.h>
    3636#include <ipc/mouseev.h>
     37#include <inttypes.h>
    3738
    3839#include "isdv4.h"
    3940
    40 #define NAME "wacomdump"
     41#define NAME "isdv4_tablet"
    4142
    4243static async_sess_t *client_sess = NULL;
     
    4647static void syntax_print(void)
    4748{
    48         fprintf(stderr, "Usage: wacomdump [--baud=<baud>] [--print-events] [device_service]\n");
     49        fprintf(stderr, "Usage: %s [--baud=<baud>] [--print-events] [device_service]\n", NAME);
    4950}
    5051
     
    175176        sysarg_t baud = 38400;
    176177        service_id_t svc_id;
     178        char *serial_port_name = NULL;
    177179
    178180        int arg = 1;
     
    205207
    206208        if (argc > arg) {
    207                 rc = loc_service_get_id(argv[arg], &svc_id, 0);
     209                serial_port_name = argv[arg];
     210                rc = loc_service_get_id(serial_port_name, &svc_id, 0);
    208211                if (rc != EOK) {
    209212                        fprintf(stderr, "Cannot find device service %s\n",
     
    238241
    239242                svc_id = svc_ids[0];
     243
     244                rc = loc_service_get_name(svc_id, &serial_port_name);
     245                if (rc != EOK) {
     246                        fprintf(stderr, "Failed getting name of serial service\n");
     247                        return 1;
     248                }
     249
    240250                free(svc_ids);
    241251        }
     
    248258
    249259        fibril_mutex_initialize(&client_mutex);
     260
     261        printf(NAME ": Using serial port %s\n", serial_port_name);
    250262
    251263        async_sess_t *sess = loc_service_connect(EXCHANGE_SERIALIZE, svc_id,
     
    301313
    302314        service_id_t service_id;
    303         rc = loc_service_register("mouse/wacom", &service_id);
    304         if (rc != EOK) {
    305                 printf(NAME ": Unable to register device mouse/wacom.\n");
     315        char *service_name;
     316        rc = asprintf(&service_name, "mouse/isdv4-%" PRIun, svc_id);
     317        if (rc < 0) {
     318                printf(NAME ": Unable to create service name\n");
     319                return rc;
     320        }
     321
     322        rc = loc_service_register(service_name, &service_id);
     323        if (rc != EOK) {
     324                printf(NAME ": Unable to register service %s.\n", service_name);
    306325                return rc;
    307326        }
Note: See TracChangeset for help on using the changeset viewer.