static void handle_sigusr1(void) { #ifdef BRICKD_WITH_USB_REOPEN_ON_SIGUSR1 usb_reopen(); #else usb_rescan(); #endif }
static void iokit_forward_notifications(void *opaque) { uint8_t byte; (void)opaque; if (pipe_read(&_notification_pipe, &byte, sizeof(byte)) < 0) { log_error("Could not read from notification pipe: %s (%d)", get_errno_name(errno), errno); return; } usb_reopen(); }