openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/dbus/1.12.16-r0/dbus-1.12.16/dbus/dbus-sysdeps-unix.c
static const char* _dbus_error_from_gai(int gai_res, int saved_errno)
{
    switch (gai_res)
    {
#ifdef EAI_FAMILY
        case EAI_FAMILY:
            /* ai_family not supported (at all) */
            return DBUS_ERROR_NOT_SUPPORTED;
#endif

#ifdef EAI_SOCKTYPE
        case EAI_SOCKTYPE:
            /* ai_socktype not supported (at all) */
            return DBUS_ERROR_NOT_SUPPORTED;
#endif

#ifdef EAI_MEMORY
        case EAI_MEMORY:
            /* Out of memory */
            return DBUS_ERROR_NO_MEMORY;
#endif

#ifdef EAI_SYSTEM
        case EAI_SYSTEM:
            /* Unspecified system error, details in errno */
            return _dbus_error_from_errno(saved_errno);
#endif

        case 0:
            /* It succeeded, but we didn't get any addresses? */
            return DBUS_ERROR_FAILED;

        /* EAI_AGAIN: Transient failure */
        /* EAI_BADFLAGS: invalid ai_flags (programming error) */
        /* EAI_FAIL: Non-recoverable failure */
        /* EAI_NODATA: host exists but has no addresses */
        /* EAI_NONAME: host does not exist */
        /* EAI_OVERFLOW: argument buffer overflow */
        /* EAI_SERVICE: service not available for specified socket
         * type (we should never see this because we use numeric
         * ports) */
        default:
            return DBUS_ERROR_FAILED;
    }
}
/* Convert an error code from getaddrinfo() or getnameinfo() into
 * a D-Bus error name. */
Convert an error code from getaddrinfo() or getnameinfo() into
a D-Bus error name.
Convert an error code from getaddrinfo () or getnameinfo () into a D - Bus error name .
static const char* _dbus_error_from_gai(int gai_res, int saved_errno)
{
    switch (gai_res)
    {
#ifdef EAI_FAMILY
        case EAI_FAMILY:
            return DBUS_ERROR_NOT_SUPPORTED;
#endif
#ifdef EAI_SOCKTYPE
        case EAI_SOCKTYPE:
            return DBUS_ERROR_NOT_SUPPORTED;
#endif
#ifdef EAI_MEMORY
        case EAI_MEMORY:
            return DBUS_ERROR_NO_MEMORY;
#endif
#ifdef EAI_SYSTEM
        case EAI_SYSTEM:
            return _dbus_error_from_errno(saved_errno);
#endif
        case 0:
            return DBUS_ERROR_FAILED;
        default:
            return DBUS_ERROR_FAILED;
    }
}
static const char * _dbus_error_from_gai ( int gai_res , int saved_errno ) { switch ( gai_res ) { #ifdef EAI_FAMILY case EAI_FAMILY : return DBUS_ERROR_NOT_SUPPORTED ; #endif #ifdef EAI_SOCKTYPE case EAI_SOCKTYPE : return DBUS_ERROR_NOT_SUPPORTED ; #endif #ifdef EAI_MEMORY case EAI_MEMORY : return DBUS_ERROR_NO_MEMORY ; #endif #ifdef EAI_SYSTEM case EAI_SYSTEM : return _dbus_error_from_errno ( saved_errno ) ; #endif case 0 : return DBUS_ERROR_FAILED ; default : return DBUS_ERROR_FAILED ; } }
Convert an error code from getaddrinfo() or getnameinfo() into
 a D-Bus error name.
Convert an error code from getaddrinfo () or getnameinfo () into a D - Bus error name .
/* ai_family not supported (at all) */ /* ai_socktype not supported (at all) */ /* Out of memory */ /* Unspecified system error, details in errno */ /* It succeeded, but we didn't get any addresses? */ /* EAI_AGAIN: Transient failure */ /* EAI_BADFLAGS: invalid ai_flags (programming error) */ /* EAI_FAIL: Non-recoverable failure */ /* EAI_NODATA: host exists but has no addresses */ /* EAI_NONAME: host does not exist */ /* EAI_OVERFLOW: argument buffer overflow */ /* EAI_SERVICE: service not available for specified socket
         * type (we should never see this because we use numeric
         * ports) */