summaryrefslogtreecommitdiff
path: root/rcm-server-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'rcm-server-main.c')
-rw-r--r--rcm-server-main.c32
1 files changed, 8 insertions, 24 deletions
diff --git a/rcm-server-main.c b/rcm-server-main.c
index 283b685..4f4e9e1 100644
--- a/rcm-server-main.c
+++ b/rcm-server-main.c
@@ -12,21 +12,6 @@
#include "rcm-server-main.h"
#include "rcm-server-keymap.h"
-static int
-method_echostring(sd_bus_message *m, void *userdata, sd_bus_error *error)
-{
- const char *msg;
- int r;
-
- r = sd_bus_message_read(m, "s", &msg);
- if (r < 0) {
- fprintf(stderr, "Failed to parse parameters: %s\n", strerror(-r));
- return sd_bus_error_set_errno(error, r);
- }
-
- return sd_bus_reply_method_return(m, "s", msg);
-}
-
static struct device *
find_device_by_path(struct manager *mgr, const char *path)
{
@@ -187,7 +172,6 @@ static const sd_bus_vtable device_vtable[] = {
SD_BUS_PROPERTY("DriverName", "s", property_get, 0, 0),
SD_BUS_PROPERTY("KernelKeymapName", "s", property_get, 0, 0),
SD_BUS_PROPERTY("HardwareType", "s", property_get, 0, 0),
- SD_BUS_METHOD("EchoString", "s", "s", method_echostring, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("ListKeymaps", NULL, "as", method_listkeymaps, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("GetKeymap", "s", "qqaa{sv}", method_getkeymap, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_SIGNAL("KeyPressed", "s", 0),
@@ -309,15 +293,15 @@ add_device(struct manager *mgr, struct udev_device *udev)
}
printf("Adding Device Object\n");
- printf(" Path : %s\n", udev_device_get_syspath(udev));
- printf(" Node : %s\n", udev_device_get_devnode(udev));
- printf(" Subsystem : %s\n", udev_device_get_subsystem(udev));
- printf(" Devtype : %s\n", udev_device_get_devtype(udev));
- printf(" Action : %s\n", udev_device_get_action(udev));
- printf(" Protocols : %s\n",
+ printf("\tPath : %s\n", udev_device_get_syspath(udev));
+ printf("\tNode : %s\n", udev_device_get_devnode(udev));
+ printf("\tSubsystem : %s\n", udev_device_get_subsystem(udev));
+ printf("\tDevtype : %s\n", udev_device_get_devtype(udev));
+ printf("\tAction : %s\n", udev_device_get_action(udev));
+ printf("\tDriver : %s\n", device->driver_name);
+ printf("\tKernel map: %s\n", device->keymap_name);
+ printf("\tProtocols : %s\n",
udev_device_get_sysattr_value(udev, "protocols"));
- printf(" Uevent : %s\n",
- udev_device_get_sysattr_value(udev, "uevent"));
list_add(&device->list, &mgr->devices);
mgr->num_devices++;