Changeset 7eaeec1 in mainline for uspace/srv/hid/input/input.c


Ignore:
Timestamp:
2012-08-20T21:27:38Z (12 years ago)
Author:
Sean Bartell <wingedtachikoma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6a97f2e
Parents:
f3a37e28 (diff), dd13349 (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 mainline changes

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/input/input.c

    rf3a37e28 r7eaeec1  
    5454#include <io/keycode.h>
    5555#include <loc.h>
    56 #include <input.h>
    57 #include <kbd.h>
    58 #include <kbd_port.h>
    59 #include <kbd_ctl.h>
    60 #include <mouse_proto.h>
    61 #include <layout.h>
    62 #include <mouse.h>
     56#include "layout.h"
     57#include "kbd.h"
     58#include "kbd_port.h"
     59#include "kbd_ctl.h"
     60#include "mouse.h"
     61#include "mouse_proto.h"
     62#include "input.h"
    6363
    6464#define NUM_LAYOUTS  3
     
    646646}
    647647
     648static void usage(char *name)
     649{
     650        printf("Usage: %s <service_name>\n", name);
     651}
     652
    648653int main(int argc, char **argv)
    649654{
     655        if (argc < 2) {
     656                usage(argv[0]);
     657                return 1;
     658        }
     659       
    650660        printf("%s: HelenOS input service\n", NAME);
    651661       
     
    678688        }
    679689       
    680         char kbd[LOC_NAME_MAXLEN + 1];
    681         snprintf(kbd, LOC_NAME_MAXLEN, "%s/%s", NAMESPACE, NAME);
    682        
    683690        service_id_t service_id;
    684         rc = loc_service_register(kbd, &service_id);
    685         if (rc != EOK) {
    686                 printf("%s: Unable to register service %s\n", NAME, kbd);
     691        rc = loc_service_register(argv[1], &service_id);
     692        if (rc != EOK) {
     693                printf("%s: Unable to register service %s\n", NAME, argv[1]);
    687694                return rc;
    688695        }
     
    692699       
    693700        printf("%s: Accepting connections\n", NAME);
     701        task_retval(0);
    694702        async_manager();
    695703       
Note: See TracChangeset for help on using the changeset viewer.