[systemd-devel] [PATCH] libsystemd-bus: the same error codes for sd_bus_release_name() (for kdbus and dbus1)
Lennart Poettering
lennart at poettering.net
Fri Dec 13 07:03:04 PST 2013
On Fri, 13.12.13 12:12, Lukasz Skalski (l.skalski at partner.samsung.com) wrote:
> Due to this patch, sd_bus_release_name() function
> returns the same code errors for kdbus and dbus1
> if we try release non-existing name or foreign
> name.
Applied! Thanks!
> ---
> src/libsystemd-bus/bus-control.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/libsystemd-bus/bus-control.c b/src/libsystemd-bus/bus-control.c
> index 5125fd9..0072c37 100644
> --- a/src/libsystemd-bus/bus-control.c
> +++ b/src/libsystemd-bus/bus-control.c
> @@ -184,9 +184,9 @@ static int bus_release_name_dbus1(sd_bus *bus, const char *name) {
> if (r < 0)
> return r;
> if (ret == BUS_NAME_NON_EXISTENT)
> - return -ENOENT;
> + return -ESRCH;
> if (ret == BUS_NAME_NOT_OWNER)
> - return -EADDRNOTAVAIL;
> + return -EADDRINUSE;
> if (ret == BUS_NAME_RELEASED)
> return 0;
>
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list