mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
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:
@@ -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)
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user