openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libcap/2.27-r0/libcap-2.27/libcap/cap_flag.c
int cap_get_flag(cap_t cap_d, cap_value_t value, cap_flag_t set,
                 cap_flag_value_t* raised)
{
    /*
     * Do we have a set and a place to store its value?
     * Is it a known capability?
     */

    if (raised && good_cap_t(cap_d) && value >= 0 && value < __CAP_BITS &&
        set >= 0 && set < NUMBER_OF_CAP_SETS)
    {
        *raised = isset_cap(cap_d, value, set) ? CAP_SET : CAP_CLEAR;
        return 0;
    }
    else
    {
        _cap_debug("invalid arguments");
        errno = EINVAL;
        return -1;
    }
}
/*
 * Return the state of a specified capability flag.  The state is
 * returned as the contents of *raised.  The capability is from one of
 * the sets stored in cap_d as specified by set and value
 */
Return the state of a specified capability flag.  The state is
returned as the contents of *raised.  The capability is from one of
the sets stored in cap_d as specified by set and value
Return the state of a specified capability flag . The state is returned as the contents of * raised . The capability is from one of the sets stored in cap_d as specified by set and value
int cap_get_flag(cap_t cap_d, cap_value_t value, cap_flag_t set,
                 cap_flag_value_t* raised)
{
    if (raised && good_cap_t(cap_d) && value >= 0 && value < __CAP_BITS &&
        set >= 0 && set < NUMBER_OF_CAP_SETS)
    {
        *raised = isset_cap(cap_d, value, set) ? CAP_SET : CAP_CLEAR;
        return 0;
    }
    else
    {
        _cap_debug("invalid arguments");
        errno = EINVAL;
        return -1;
    }
}
int cap_get_flag ( cap_t cap_d , cap_value_t value , cap_flag_t set , cap_flag_value_t * raised ) { if ( raised && good_cap_t ( cap_d ) && value >= 0 && value < __CAP_BITS && set >= 0 && set < NUMBER_OF_CAP_SETS ) { * raised = isset_cap ( cap_d , value , set ) ? CAP_SET : CAP_CLEAR ; return 0 ; } else { _cap_debug ( " " ) ; errno = EINVAL ; return -1 ; } }
Return the state of a specified capability flag.
Return the state of a specified capability flag .
/*
     * Do we have a set and a place to store its value?
     * Is it a known capability?
     */