From b568963b14871d8fe9999e46110a7583a6080fbb Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 21 Feb 2019 09:47:28 +1000 Subject: [PATCH] ratbagd: rename the 'name' variable to 'sysname' Because that's what it is Signed-off-by: Peter Hutterer --- ratbagd/ratbagd.c | 14 +++++++------- ratbagd/ratbagd.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ratbagd/ratbagd.c b/ratbagd/ratbagd.c index 11faa893..d7d51b90 100644 --- a/ratbagd/ratbagd.c +++ b/ratbagd/ratbagd.c @@ -209,7 +209,7 @@ static void ratbagd_process_device(struct ratbagd *ctx, { struct ratbag_device *lib_device; struct ratbagd_device *device; - const char *name; + const char *sysname; int r; /* @@ -217,15 +217,15 @@ static void ratbagd_process_device(struct ratbagd *ctx, * device-grouping, just like libinput does. If multiple input * devices belong to the same virtual device, we should not add * it multiple times. Instead, libratbag should group them and - * provide *us* a unique name that identifies the group, rather + * provide *us* a unique sysname that identifies the group, rather * than taking a random input-device as tag. */ - name = udev_device_get_sysname(udevice); - if (!name || !startswith(name, "hidraw")) + sysname = udev_device_get_sysname(udevice); + if (!sysname || !startswith(sysname, "hidraw")) return; - device = ratbagd_device_lookup(ctx, name); + device = ratbagd_device_lookup(ctx, sysname); if (streq_ptr("remove", udev_device_get_action(udevice))) { /* device was removed, unlink it and destroy our context */ @@ -251,13 +251,13 @@ static void ratbagd_process_device(struct ratbagd *ctx, if (error != RATBAG_SUCCESS) return; /* unsupported device */ - r = ratbagd_device_new(&device, ctx, name, lib_device); + r = ratbagd_device_new(&device, ctx, sysname, lib_device); /* the ratbagd_device takes its own reference, drop ours */ ratbag_device_unref(lib_device); if (r < 0) { - log_error("%s: cannot track device\n", name); + log_error("%s: cannot track device\n", sysname); return; } diff --git a/ratbagd/ratbagd.h b/ratbagd/ratbagd.h index a393fdba..a3a6b045 100644 --- a/ratbagd/ratbagd.h +++ b/ratbagd/ratbagd.h @@ -168,7 +168,7 @@ extern const sd_bus_vtable ratbagd_device_vtable[]; int ratbagd_device_new(struct ratbagd_device **out, struct ratbagd *ctx, - const char *name, + const char *sysname, struct ratbag_device *lib_device); struct ratbagd_device *ratbagd_device_free(struct ratbagd_device *device); const char *ratbagd_device_get_sysname(struct ratbagd_device *device);