openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/glibc/2.29-r0/git/misc/error.c
void error(int status, int errnum, const char* message, ...)
{
    va_list args;

#if defined _LIBC && defined __libc_ptf_call
    /* We do not want this call to be cut short by a thread
       cancellation.  Therefore disable cancellation for now.  */
    int state = PTHREAD_CANCEL_ENABLE;
    __libc_ptf_call(__pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state),
                    0);
#endif

    flush_stdout();
#ifdef _LIBC
    _IO_flockfile(stderr);
#endif
    if (error_print_progname)
        (*error_print_progname)();
    else
    {
#if _LIBC
        __fxprintf(NULL, "%s: ", program_name);
#else
        fprintf(stderr, "%s: ", program_name);
#endif
    }

    va_start(args, message);
    error_tail(status, errnum, message, args);
    va_end(args);

#ifdef _LIBC
    _IO_funlockfile(stderr);
#ifdef __libc_ptf_call
    __libc_ptf_call(__pthread_setcancelstate, (state, NULL), 0);
#endif
#endif
}
/* Print the program name and error message MESSAGE, which is a printf-style
   format string with optional args.
   If ERRNUM is nonzero, print its corresponding system error message.
   Exit with status STATUS if it is nonzero.  */
Print the program name and error message MESSAGE, which is a printf-style
format string with optional args.
If ERRNUM is nonzero, print its corresponding system error message.
Exit with status STATUS if it is nonzero.
Print the program name and error message MESSAGE which is a printf - style format string with optional args . If ERRNUM is nonzero print its corresponding system error message . Exit with status STATUS if it is nonzero .
void error(int status, int errnum, const char* message, ...)
{
    va_list args;
#if defined _LIBC && defined __libc_ptf_call
    int state = PTHREAD_CANCEL_ENABLE;
    __libc_ptf_call(__pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state),
                    0);
#endif
    flush_stdout();
#ifdef _LIBC
    _IO_flockfile(stderr);
#endif
    if (error_print_progname)
        (*error_print_progname)();
    else
    {
#if _LIBC
        __fxprintf(NULL, "%s: ", program_name);
#else
        fprintf(stderr, "%s: ", program_name);
#endif
    }
    va_start(args, message);
    error_tail(status, errnum, message, args);
    va_end(args);
#ifdef _LIBC
    _IO_funlockfile(stderr);
#ifdef __libc_ptf_call
    __libc_ptf_call(__pthread_setcancelstate, (state, NULL), 0);
#endif
#endif
}
void error ( int status , int errnum , const char * message , ... ) { va_list args ; #if defined _LIBC && defined __libc_ptf_call int state = PTHREAD_CANCEL_ENABLE ; __libc_ptf_call ( __pthread_setcancelstate , ( PTHREAD_CANCEL_DISABLE , & state ) , 0 ) ; #endif flush_stdout ( ) ; #ifdef _LIBC _IO_flockfile ( stderr ) ; #endif if ( error_print_progname ) ( * error_print_progname ) ( ) ; else { #if _LIBC __fxprintf ( NULL , " " , program_name ) ; #else fprintf ( stderr , " " , program_name ) ; #endif } va_start ( args , message ) ; error_tail ( status , errnum , message , args ) ; va_end ( args ) ; #ifdef _LIBC _IO_funlockfile ( stderr ) ; #ifdef __libc_ptf_call __libc_ptf_call ( __pthread_setcancelstate , ( state , NULL ) , 0 ) ; #endif #endif }
Print the program name and error message MESSAGE, which is a printf-style
format string with optional args.
Print the program name and error message MESSAGE which is a printf - style format string with optional args .
/* We do not want this call to be cut short by a thread
       cancellation.  Therefore disable cancellation for now.  */