[systemd-devel] [PATCH] [RFCv2] Introspect and monitor dropin configuration

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Sun Mar 31 20:57:30 PDT 2013


On Sun, Mar 31, 2013 at 06:53:54PM +0300, Oleksii Shevchuk wrote:
> ---
>  src/core/dbus-unit.c   |  1 +
>  src/core/load-dropin.c | 60 ++++++++++++++++++++++++++++++++++----------------
>  src/core/load-dropin.h |  1 +
>  src/core/unit.c        | 32 ++++++++++++++++++++++++++-
>  src/core/unit.h        |  2 ++
>  5 files changed, 76 insertions(+), 20 deletions(-)
> 
> diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
> index dc7d1f1..f413386 100644
> --- a/src/core/dbus-unit.c
> +++ b/src/core/dbus-unit.c
> @@ -1284,6 +1284,7 @@ const BusProperty bus_unit_properties[] = {
>          { "SubState",             bus_unit_append_sub_state,          "s", 0 },
>          { "FragmentPath",         bus_property_append_string,         "s", offsetof(Unit, fragment_path),                              true },
>          { "SourcePath",           bus_property_append_string,         "s", offsetof(Unit, source_path),                                true },
> +        { "DropinPaths",          bus_property_append_strv,          "as", offsetof(Unit, dropin_paths),                               true },
>          { "UnitFileState",        bus_unit_append_file_state,         "s", 0 },
>          { "InactiveExitTimestamp",bus_property_append_usec,           "t", offsetof(Unit, inactive_exit_timestamp.realtime)   },
>          { "InactiveExitTimestampMonotonic", bus_property_append_usec, "t", offsetof(Unit, inactive_exit_timestamp.monotonic)  },

The dbus introspection doesn't seem to be working. It's missing at
least something like:

diff --git src/core/dbus-unit.h src/core/dbus-unit.h
index 34980b0..2205c0b 100644
--- src/core/dbus-unit.h
+++ src/core/dbus-unit.h
@@ -88,6 +88,7 @@
         "  <property name=\"SourcePath\" type=\"s\" access=\"read\"/>\n" \
+        "  <property name=\"DropinPath\" type=\"as\" access=\"read\"/>\n" \

...and something else, also, dunno.

Zbyszek

PS. char ** dropin_paths; -> char **dropin_paths;



More information about the systemd-devel mailing list