openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libnl/1_3.4.0-r0/libnl-3.4.0/lib/idiag/idiag.c
char* idiagnl_shutdown2str(uint8_t shutdown, char* buf, size_t len)
{
    if (shutdown == 0)
    {
        snprintf(buf, len, " ");
        return buf;
    }
    else if (shutdown == 1)
    {
        snprintf(buf, len, "receive shutdown");
        return buf;
    }
    else if (shutdown == 2)
    {
        snprintf(buf, len, "send shutdown");
        return buf;
    }

    return NULL;
}
/**
 * Convert shutdown state to string.
 * @arg shutdown    Shutdown state (e.g., idiag_msg->shutdown)
 * @arg buf	    Ouput buffer to hold string representation
 * @arg len	    Length in bytes of output buffer
 *
 * @return string representation of shutdown state or NULL
 */
Convert shutdown state to string.
@arg shutdown    Shutdown state
@arg buf         Ouput buffer to hold string representation
@arg len         Length in bytes of output buffer

@return string representation of shutdown state or NULL
Convert shutdown state to string . @arg shutdown Shutdown state @arg buf Ouput buffer to hold string representation @arg len Length in bytes of output buffer @return string representation of shutdown state or NULL
char* idiagnl_shutdown2str(uint8_t shutdown, char* buf, size_t len)
{
    if (shutdown == 0)
    {
        snprintf(buf, len, " ");
        return buf;
    }
    else if (shutdown == 1)
    {
        snprintf(buf, len, "receive shutdown");
        return buf;
    }
    else if (shutdown == 2)
    {
        snprintf(buf, len, "send shutdown");
        return buf;
    }
    return NULL;
}
char * idiagnl_shutdown2str ( uint8_t shutdown , char * buf , size_t len ) { if ( shutdown == 0 ) { snprintf ( buf , len , " " ) ; return buf ; } else if ( shutdown == 1 ) { snprintf ( buf , len , " " ) ; return buf ; } else if ( shutdown == 2 ) { snprintf ( buf , len , " " ) ; return buf ; } return NULL ; }
Convert shutdown state to string.
Convert shutdown state to string .