diff --git a/src/busctl/busctl.c b/src/busctl/busctl.c index eab418d2192..068e847170f 100644 --- a/src/busctl/busctl.c +++ b/src/busctl/busctl.c @@ -1274,7 +1274,7 @@ static int monitor(int argc, char **argv, int (*dump)(sd_bus_message *m, FILE *f STRV_FOREACH(i, argv+1) { _cleanup_free_ char *m = NULL; - if (!service_name_is_valid(*i)) + if (!sd_bus_service_name_is_valid(*i)) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid service name '%s'", *i); m = strjoin("sender='", *i, "'"); diff --git a/src/core/dbus-scope.c b/src/core/dbus-scope.c index 84d91dcfa35..2d877a8c55f 100644 --- a/src/core/dbus-scope.c +++ b/src/core/dbus-scope.c @@ -2,7 +2,6 @@ #include "alloc-util.h" #include "bus-common-errors.h" -#include "bus-internal.h" #include "bus-util.h" #include "dbus-cgroup.h" #include "dbus-kill.h" @@ -140,7 +139,7 @@ static int bus_scope_set_transient_property( if (r < 0) return r; - if (!isempty(controller) && !service_name_is_valid(controller)) + if (!isempty(controller) && !sd_bus_service_name_is_valid(controller)) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Controller '%s' is not a valid bus name.", controller); if (!UNIT_WRITE_FLAGS_NOOP(flags)) { diff --git a/src/core/dbus-service.c b/src/core/dbus-service.c index 5cf9b21890e..984ef2459ef 100644 --- a/src/core/dbus-service.c +++ b/src/core/dbus-service.c @@ -4,7 +4,6 @@ #include "alloc-util.h" #include "async.h" -#include "bus-internal.h" #include "bus-util.h" #include "dbus-cgroup.h" #include "dbus-execute.h" @@ -258,7 +257,7 @@ static BUS_DEFINE_SET_TRANSIENT_PARSE(notify_access, NotifyAccess, notify_access static BUS_DEFINE_SET_TRANSIENT_PARSE(service_type, ServiceType, service_type_from_string); static BUS_DEFINE_SET_TRANSIENT_PARSE(service_restart, ServiceRestart, service_restart_from_string); static BUS_DEFINE_SET_TRANSIENT_PARSE(oom_policy, OOMPolicy, oom_policy_from_string); -static BUS_DEFINE_SET_TRANSIENT_STRING_WITH_CHECK(bus_name, service_name_is_valid); +static BUS_DEFINE_SET_TRANSIENT_STRING_WITH_CHECK(bus_name, sd_bus_service_name_is_valid); static int bus_service_set_transient_property( Service *s, diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index e420239e157..352798fd6ac 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -1948,7 +1948,7 @@ int config_parse_bus_name( return 0; } - if (!service_name_is_valid(k)) { + if (!sd_bus_service_name_is_valid(k)) { log_syntax(unit, LOG_ERR, filename, line, 0, "Invalid bus name, ignoring: %s", k); return 0; } diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c index 379aecf7307..a61f8e70da0 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -1156,7 +1156,7 @@ int bus_path_encode_unique(sd_bus *b, const char *prefix, const char *sender_id, int r; assert_return(b || (sender_id && external_id), -EINVAL); - assert_return(object_path_is_valid(prefix), -EINVAL); + assert_return(sd_bus_object_path_is_valid(prefix), -EINVAL); assert_return(ret_path, -EINVAL); if (!sender_id) { @@ -1208,8 +1208,8 @@ int bus_path_decode_unique(const char *path, const char *prefix, char **ret_send const char *p, *q; char *sender, *external; - assert(object_path_is_valid(path)); - assert(object_path_is_valid(prefix)); + assert(sd_bus_object_path_is_valid(path)); + assert(sd_bus_object_path_is_valid(prefix)); assert(ret_sender); assert(ret_external); @@ -1670,7 +1670,7 @@ int bus_introspect_implementations( } struct introspect intro = {}; - bool is_interface = interface_name_is_valid(pattern); + bool is_interface = sd_bus_interface_name_is_valid(pattern); impl = find_implementation(pattern, bus_objects); if (!impl)