assert_return(service_name_is_valid(arg0), -EINVAL);
r = sd_bus_get_owner(bus, arg0, SD_BUS_CREDS_SELINUX_CONTEXT, &creds);
+ if (r == -ENOENT)
+ return sd_bus_error_setf(error, SD_BUS_ERROR_NAME_HAS_NO_OWNER, "Name %s is currently not owned by anyone.", arg0);
if (r < 0)
return r;
assert_return(service_name_is_valid(arg0), -EINVAL);
r = sd_bus_get_owner(bus, arg0, SD_BUS_CREDS_PID, &creds);
+ if (r == -ENOENT)
+ return sd_bus_error_setf(error, SD_BUS_ERROR_NAME_HAS_NO_OWNER, "Name %s is currently not owned by anyone.", arg0);
if (r < 0)
return r;
assert_return(service_name_is_valid(arg0), -EINVAL);
r = sd_bus_get_owner(bus, arg0, SD_BUS_CREDS_UID, &creds);
+ if (r == -ENOENT)
+ return sd_bus_error_setf(error, SD_BUS_ERROR_NAME_HAS_NO_OWNER, "Name %s is currently not owned by anyone.", arg0);
if (r < 0)
return r;
assert_return(service_name_is_valid(arg0), -EINVAL);
r = sd_bus_get_owner(bus, arg0, SD_BUS_CREDS_UNIQUE_NAME, &creds);
+ if (r == -ENOENT)
+ return sd_bus_error_setf(error, SD_BUS_ERROR_NAME_HAS_NO_OWNER, "Name %s is currently not owned by anyone.", arg0);
if (r < 0)
return r;