From 98503c6d0cae795be89efd74ccab821729c2143a Mon Sep 17 00:00:00 2001 From: Miika Karanki Date: Tue, 23 Nov 2021 17:23:01 +0200 Subject: [PATCH] sd-bus: Fix standard method argument names The argument names of methods under org.freedesktop.DBus.Properties and org.freedesktop.DBus.Introspectable interfaces are specifies in D-Bus specification[1]. They are: org.freedesktop.DBus.Introspectable.Introspect (out STRING xml_data) org.freedesktop.DBus.Properties.Get (in STRING interface_name, in STRING property_name, out VARIANT value); org.freedesktop.DBus.Properties.Set (in STRING interface_name, in STRING property_name, in VARIANT value); org.freedesktop.DBus.Properties.GetAll (in STRING interface_name, out DICT props); sd-bus is using different argument names in the introspection document. Usually this is not a problem but in case something tries to map the argument names based on the introspection document to the position of the arguments in the method call, then using names different than the ones specified in the D-Bus specification is confusing. So fix the names to match the D-Bus specification. [1] https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-introspectable --- man/vtable-example.xml | 16 ++++++++-------- src/libsystemd/sd-bus/bus-introspect.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/man/vtable-example.xml b/man/vtable-example.xml index dc5fac4f267..891b375a4b2 100644 --- a/man/vtable-example.xml +++ b/man/vtable-example.xml @@ -10,26 +10,26 @@ - + - - + + - - + + - - + + - + diff --git a/src/libsystemd/sd-bus/bus-introspect.c b/src/libsystemd/sd-bus/bus-introspect.c index 866fca7acb8..b9ef6af631c 100644 --- a/src/libsystemd/sd-bus/bus-introspect.c +++ b/src/libsystemd/sd-bus/bus-introspect.c @@ -25,28 +25,28 @@ #define BUS_INTROSPECT_INTERFACE_INTROSPECTABLE \ " \n" \ " \n" \ - " \n" \ + " \n" \ " \n" \ " \n" #define BUS_INTROSPECT_INTERFACE_PROPERTIES \ " \n" \ " \n" \ - " \n" \ - " \n" \ + " \n" \ + " \n" \ " \n" \ " \n" \ " \n" \ - " \n" \ - " \n" \ + " \n" \ + " \n" \ " \n" \ " \n" \ - " \n" \ - " \n" \ + " \n" \ + " \n" \ " \n" \ " \n" \ " \n" \ - " \n" \ + " \n" \ " \n" \ " \n" \ " \n" \ -- 2.47.3