1
0
forked from drath/libratbag

profile: prefix the profile object path with a 'p'

sd_bus_encode_many() escaps elements starting with a digit so our 0 profile
has an object path of /.../_30. This is quite confusing during debugging.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2016-02-15 12:31:55 +10:00
parent c70b53a162
commit c4e4330bd1
2 changed files with 2 additions and 2 deletions

View File

@@ -64,7 +64,7 @@ static int ratbagd_device_find_profile(sd_bus *bus,
int r;
r = sd_bus_path_decode_many(path,
"/org/freedesktop/ratbag1/profile/%/%",
"/org/freedesktop/ratbag1/profile/%/p%",
NULL,
&name);
if (r <= 0)

View File

@@ -212,7 +212,7 @@ int ratbagd_profile_new(struct ratbagd_profile **out,
profile->lib_profile = lib_profile;
profile->index = index;
sprintf(index_buffer, "%u", index);
sprintf(index_buffer, "p%u", index);
r = sd_bus_path_encode_many(&profile->path,
"/org/freedesktop/ratbag1/profile/%/%",
ratbagd_device_get_name(device),