From 293b9aa3eb21d3eca4e34d9c6c42c7b6ab716bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 14 Oct 2022 18:29:14 +0200 Subject: [PATCH] manager: rename dbus method Fixes #24989. --- man/org.freedesktop.systemd1.xml | 8 ++++---- src/analyze/analyze-dump.c | 4 ++-- src/core/dbus-manager.c | 6 +++--- src/core/org.freedesktop.systemd1.conf | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/man/org.freedesktop.systemd1.xml b/man/org.freedesktop.systemd1.xml index 9fb215a136..6986ee8b03 100644 --- a/man/org.freedesktop.systemd1.xml +++ b/man/org.freedesktop.systemd1.xml @@ -162,8 +162,8 @@ node /org/freedesktop/systemd1 { Subscribe(); Unsubscribe(); Dump(out s output); - DumpPatterns(in as patterns, - out s output); + DumpUnitsMatchingPatterns(in as patterns, + out s output); DumpByFileDescriptor(out h fd); Reload(); @org.freedesktop.DBus.Method.NoReply("true") @@ -870,7 +870,7 @@ node /org/freedesktop/systemd1 { - + @@ -1342,7 +1342,7 @@ node /org/freedesktop/systemd1 { string guaranteed, and new fields may be added any time, and old fields removed. The general structure may be rearranged drastically between releases. This is exposed by systemd-analyze1's - dump command. Similarly, DumpPatterns() returns the internal + dump command. Similarly, DumpUnitsMatchingPatterns() returns the internal state of units whose names match the glob expressions specified in the patterns argument. The DumpByFileDescriptor() method is identical to Dump() but returns the data serialized into a file descriptor (the client should diff --git a/src/analyze/analyze-dump.c b/src/analyze/analyze-dump.c index 220218e2fe..ac2b31ae26 100644 --- a/src/analyze/analyze-dump.c +++ b/src/analyze/analyze-dump.c @@ -36,7 +36,7 @@ static int dump_patterns(sd_bus *bus, char **patterns) { const char *text; int r; - r = bus_message_new_method_call(bus, &m, bus_systemd_mgr, "DumpPatterns"); + r = bus_message_new_method_call(bus, &m, bus_systemd_mgr, "DumpUnitsMatchingPatterns"); if (r < 0) return bus_log_create_error(r); @@ -58,7 +58,7 @@ static int dump_patterns(sd_bus *bus, char **patterns) { r = sd_bus_call(bus, m, 0, &error, &reply); if (r < 0) - return log_error_errno(r, "Failed to issue method call DumpPatterns: %s", + return log_error_errno(r, "Failed to issue method call DumpUnitsMatchingPatterns: %s", bus_error_message(&error, r)); r = sd_bus_message_read(reply, "s", &text); diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 240408f342..26d19e8ba0 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -1392,7 +1392,7 @@ static int method_dump_by_fd(sd_bus_message *message, void *userdata, sd_bus_err return dump_impl(message, userdata, error, NULL, reply_dump_by_fd); } -static int method_dump_patterns(sd_bus_message *message, void *userdata, sd_bus_error *error) { +static int method_dump_units_matching_patterns(sd_bus_message *message, void *userdata, sd_bus_error *error) { _cleanup_strv_free_ char **patterns = NULL; int r; @@ -3027,10 +3027,10 @@ const sd_bus_vtable bus_manager_vtable[] = { SD_BUS_RESULT("s", output), method_dump, SD_BUS_VTABLE_UNPRIVILEGED), - SD_BUS_METHOD_WITH_ARGS("DumpPatterns", + SD_BUS_METHOD_WITH_ARGS("DumpUnitsMatchingPatterns", SD_BUS_ARGS("as", patterns), SD_BUS_RESULT("s", output), - method_dump_patterns, + method_dump_units_matching_patterns, SD_BUS_VTABLE_UNPRIVILEGED), SD_BUS_METHOD_WITH_ARGS("DumpByFileDescriptor", SD_BUS_NO_ARGS, diff --git a/src/core/org.freedesktop.systemd1.conf b/src/core/org.freedesktop.systemd1.conf index 8aa1b03a33..66dd961c44 100644 --- a/src/core/org.freedesktop.systemd1.conf +++ b/src/core/org.freedesktop.systemd1.conf @@ -122,7 +122,7 @@ + send_member="DumpUnitsMatchingPatterns"/>