summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rcm-server-main.c11
-rw-r--r--rcm-server-main.h1
2 files changed, 11 insertions, 1 deletions
diff --git a/rcm-server-main.c b/rcm-server-main.c
index 76622f3..d2f0160 100644
--- a/rcm-server-main.c
+++ b/rcm-server-main.c
@@ -964,6 +964,7 @@ add_device(struct manager *mgr, struct udev_device *udev)
device->input_name = NULL;
device->driver_name = NULL;
device->keymap_name = NULL;
+ device->dev_name = NULL;
if (keymaps_load(device) < 0) {
fprintf(stderr, "failed to load keymaps: %m\n");
@@ -1047,6 +1048,12 @@ next:
device->driver_name = strdup(token + strlen("DRV_NAME="));
else if (!strncmp(token, "NAME=", strlen("NAME=")))
device->keymap_name = strdup(token + strlen("NAME="));
+ else if (!strncmp(token, "DEVNAME=", strlen("DEVNAME=")))
+ device->dev_name = strdup(token + strlen("DEVNAME="));
+ else if (!strncmp(token, "MAJOR=", strlen("MAJOR=")))
+ continue;
+ else if (!strncmp(token, "MINOR=", strlen("MINOR=")))
+ continue;
else
printf("Unused uevent: %s\n", token);
}
@@ -1062,7 +1069,8 @@ next:
printf("\tInput name: %s\n", device->input_name);
printf("\tDriver : %s\n", device->driver_name);
printf("\tKernel map: %s\n", device->keymap_name);
- printf("\tDevnode fd: %i\n", device->evdev_fd);
+ printf("\tDev name : %s\n", device->dev_name);
+ printf("\tevdev fd : %i\n", device->evdev_fd);
printf("\tLIRC fd : %i\n", device->lirc_fd);
printf("\tDBUS path : %s\n", device->path);
printf("\tProtocols : %s\n",
@@ -1196,6 +1204,7 @@ free_manager(struct manager *mgr) {
free(dev->input_name);
free(dev->driver_name);
free(dev->keymap_name);
+ free(dev->dev_name);
while (!list_empty(&dev->keymaps)) {
struct keymap *keymap = list_first_entry(&dev->keymaps, typeof(*keymap), list);
diff --git a/rcm-server-main.h b/rcm-server-main.h
index 0d776ac..12907fc 100644
--- a/rcm-server-main.h
+++ b/rcm-server-main.h
@@ -7,6 +7,7 @@ struct device {
char *input_name;
char *driver_name;
char *keymap_name;
+ char *dev_name;
char *error;
int lirc_fd;
sd_event_source *lirc_ev;