~ubuntu-branches/ubuntu/saucy/joystick/saucy-proposed

« back to all changes in this revision

Viewing changes to utils/ffset.c

  • Committer: Package Import Robot
  • Author(s): Stephen Kitt
  • Date: 2013-05-06 23:03:26 UTC
  • mfrom: (3.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20130506230326-po18icz4mtaa25k1
Tags: 1:1.4.6-1
* New upstream release:
  - Disable CRTSCTS on ELO touchscreens. Closes: #699030. Thanks Thierry
    Bultel!
  - Handle long device names correctly. Closes: #706744. Thanks Ralf
    Jung!
* Drop hardening.patch, merged upstream.
* Standards-Version 3.9.4, no change required.
* Switch to my Debian address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
int main(int argc, char** argv)
37
37
{
38
38
        int fd;
39
 
        char device_file_name[64];
 
39
        const char * device_file_name = "/dev/input/event0";
40
40
        int i;
41
41
        int gain = -1;
42
42
        int autocenter = -1;
43
43
 
44
 
        strncpy(device_file_name, "/dev/input/event0", 64);
45
 
 
46
44
        for (i=1; i<argc; ++i) {
47
45
                if (strcmp(argv[i], "--help") == 0) {
48
46
                        printf("Usage: %s /dev/input/eventXX [-g gain] [-a autocenter_strength]\n", argv[0]);
65
63
                        autocenter = atoi(argv[i]);
66
64
                }
67
65
                else {
68
 
                        strncpy(device_file_name, argv[i], 64);
 
66
                        device_file_name = argv[i];
69
67
                }
70
68
        }
71
69