From 2cc2f450deb6831bec7a114e0d3077c89bdc90c2 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Thu, 25 Apr 2013 22:55:03 +0200 Subject: ltunify: remove unused signal handler and debugging loop --- ltunify.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/ltunify.c b/ltunify.c index 382f41d..3f96f1f 100644 --- a/ltunify.c +++ b/ltunify.c @@ -24,7 +24,6 @@ #include #include #include -#include #include /* strtoul */ #include /* uint16_t */ #include /* ntohs, ntohl */ @@ -853,23 +852,6 @@ void print_all_devices(void) { } } -// begin signal functions -static bool stopping; -static void sig_handler(int signum) { - if (signum != SIGINT) { - return; - } - fprintf(stderr, "Caught SIGINT, shutting down\n"); - stopping = true; -} -static void install_sighandlers(void) { - struct sigaction sa; - memset(&sa, 0, sizeof sa); - sa.sa_handler = sig_handler; - sigaction(SIGINT, &sa, NULL); -} -// end signal functions - static void print_usage(const char *program_name) { fprintf(stderr, "Usage: %s [options] cmd [cmd options]\n" "Logitech Unifying tool version %s\n" @@ -1089,8 +1071,6 @@ int main(int argc, char **argv) { } } - install_sighandlers(); - if (!notifs.reporting_flags_receiver) { disable_notifs = true; notifs.reporting_flags_receiver |= 1; @@ -1149,24 +1129,8 @@ int main(int argc, char **argv) { get_and_print_recv_fw(fd); } else { fprintf(stderr, "Unhandled command: %s\n", cmd); - goto end_notifs; } -#if 0 - struct hidpp_message msg; - while (!stopping && get_info(fd, &msg)) { - u8 *resp = msg.msg_long.str; - unsigned i; - // activity counter for each device - for (i=0; i