search for: clear_error_suppress

Displaying 1 result from an estimated 1 matches for "clear_error_suppress".

2020 May 07
1
[PATCH nbdkit] vddk: Suppress errors in can_extents test (RHBZ#1709211).
...care about the actual value) then we will suppress error messages + * from VDDK in this thread. + */ +static void +set_error_suppression (void) +{ + static const int one = 1; /* Something that gives us a non-NULL pointer. */ + pthread_setspecific (error_suppression, &one); +} + +static void +clear_error_suppression (void) +{ + pthread_setspecific (error_suppression, NULL); +} + +static bool +are_errors_suppressed (void) +{ + return pthread_getspecific (error_suppression) != NULL; +} + /* Turn error messages from the library into nbdkit_error. */ static void error_function (const char *fs, va_list args...