_public_ int sd_bus_open_system_machine(sd_bus **ret, const char *machine) {
        _cleanup_(bus_freep) sd_bus *b = NULL;
        int r;

        assert_return(machine, -EINVAL);
        assert_return(ret, -EINVAL);
        assert_return(streq(machine, ".host") || machine_name_is_valid(machine), -EINVAL);

        r = sd_bus_new(&b);
        if (r < 0)
                return r;

        r = bus_set_address_system_machine(b, machine);
        if (r < 0)
                return r;

        b->bus_client = true;
        b->trusted = false;
        b->is_system = true;
        b->is_local = false;

        r = sd_bus_start(b);
        if (r < 0)
                return r;

        *ret = TAKE_PTR(b);
        return 0;
}
_public_ int sd_bus_open_system_machine(sd_bus **ret, const char *machine) {
        _cleanup_(bus_freep) sd_bus *b = NULL;
        int r;

        assert_return(machine, -EINVAL);
        assert_return(ret, -EINVAL);
        assert_return(streq(machine, ".host") || machine_name_is_valid(machine), -EINVAL);

        r = sd_bus_new(&b);
        if (r < 0)
                return r;

        r = bus_set_address_system_machine(b, machine);
        if (r < 0)
                return r;

        b->bus_client = true;
        b->trusted = false;
        b->is_system = true;
        b->is_local = false;

        r = sd_bus_start(b);
        if (r < 0)
                return r;

        *ret = TAKE_PTR(b);
        return 0;
}