openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/systemd/1_242+AUTOINC+db2e367bfc-r0/git/src/core/unit.c
int unit_stop(Unit* u)
{
    UnitActiveState state;
    Unit* following;

    assert(u);

    state = unit_active_state(u);
    if (UNIT_IS_INACTIVE_OR_FAILED(state))
        return -EALREADY;

    following = unit_following(u);
    if (following)
    {
        log_unit_debug(u, "Redirecting stop request from %s to %s.", u->id,
                       following->id);
        return unit_stop(following);
    }

    if (!UNIT_VTABLE(u)->stop)
        return -EBADR;

    unit_add_to_dbus_queue(u);

    return UNIT_VTABLE(u)->stop(u);
}
/* Errors:
 *         -EBADR:    This unit type does not support stopping.
 *         -EALREADY: Unit is already stopped.
 *         -EAGAIN:   An operation is already in progress. Retry later.
 */
-EBADR:    This unit type does not support stopping.
-EALREADY: Unit is already stopped.
-EAGAIN:   An operation is already in progress. Retry later.
- EBADR : This unit type does not support stopping . - EALREADY : Unit is already stopped . - EAGAIN : An operation is already in progress . Retry later .
int unit_stop(Unit* u)
{
    UnitActiveState state;
    Unit* following;
    assert(u);
    state = unit_active_state(u);
    if (UNIT_IS_INACTIVE_OR_FAILED(state))
        return -EALREADY;
    following = unit_following(u);
    if (following)
    {
        log_unit_debug(u, "Redirecting stop request from %s to %s.", u->id,
                       following->id);
        return unit_stop(following);
    }
    if (!UNIT_VTABLE(u)->stop)
        return -EBADR;
    unit_add_to_dbus_queue(u);
    return UNIT_VTABLE(u)->stop(u);
}
int unit_stop ( Unit * u ) { UnitActiveState state ; Unit * following ; assert ( u ) ; state = unit_active_state ( u ) ; if ( UNIT_IS_INACTIVE_OR_FAILED ( state ) ) return - EALREADY ; following = unit_following ( u ) ; if ( following ) { log_unit_debug ( u , " " , u -> id , following -> id ) ; return unit_stop ( following ) ; } if ( ! UNIT_VTABLE ( u ) -> stop ) return - EBADR ; unit_add_to_dbus_queue ( u ) ; return UNIT_VTABLE ( u ) -> stop ( u ) ; }
Errors:
         -EBADR:    This unit type does not support stopping.
Errors : - EBADR : This unit type does not support stopping .