version 1.10, 2008/06/26 05:42:21 |
version 1.11, 2009/10/14 20:36:56 |
|
|
syslog(LOG_WARNING, "config file `%s', line %d" |
syslog(LOG_WARNING, "config file `%s', line %d" |
", syntax error: %s", conf, line, buf); |
", syntax error: %s", conf, line, buf); |
freecommands(cmds); |
freecommands(cmds); |
|
fclose(f); |
return (NULL); |
return (NULL); |
} else { |
} else { |
errx(1, "config file `%s', line %d" |
errx(1, "config file `%s', line %d" |
|
|
"bad value: %s", |
"bad value: %s", |
conf, line, value); |
conf, line, value); |
freecommands(cmds); |
freecommands(cmds); |
|
fclose(f); |
return (NULL); |
return (NULL); |
} else { |
} else { |
errx(1, "config file `%s', line %d, " |
errx(1, "config file `%s', line %d, " |
|
|
} |
} |
|
|
coll[0] = 0; |
coll[0] = 0; |
for (d = hid_start_parse(repd, 1 << hid_input, reportid); |
d = hid_start_parse(repd, 1 << hid_input, reportid); |
hid_get_item(d, &h); ) { |
if (d == NULL) |
|
err(1, "hid_start_parse failed"); |
|
while (hid_get_item(d, &h)) { |
if (verbose > 2) |
if (verbose > 2) |
printf("kind=%d usage=%x\n", h.kind, h.usage); |
printf("kind=%d usage=%x\n", h.kind, h.usage); |
if (h.flags & HIO_CONST) |
if (h.flags & HIO_CONST) |
|
|
break; |
break; |
} |
} |
} |
} |
|
hid_end_parse(d); |
if (ignore) { |
if (ignore) { |
if (verbose) |
if (verbose) |
warnx("ignore item '%s'", name); |
warnx("ignore item '%s'", name); |
|
/* pop and free this ignored item */ |
|
cmds = cmd->next; |
|
free(cmd); |
continue; |
continue; |
} |
} |
if (isdemon) { |
if (isdemon) { |
syslog(LOG_WARNING, "config file `%s', line %d, HID " |
syslog(LOG_WARNING, "config file `%s', line %d, HID " |
"item not found: `%s'", conf, line, name); |
"item not found: `%s'", conf, line, name); |
freecommands(cmds); |
freecommands(cmds); |
|
fclose(f); |
return (NULL); |
return (NULL); |
} else { |
} else { |
errx(1, "config file `%s', line %d, HID item " |
errx(1, "config file `%s', line %d, HID item " |