From 6e2f729add1e80a5cf96d14465ea9bd7accd33a0 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 20 Jun 2016 08:57:33 -0600 Subject: [PATCH] Remove lowsyslog(). The new syslog() includes all of the functionality of lowsyslog(). No longer any need for two interfaces. --- examples/buttons/buttons_main.c | 34 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/examples/buttons/buttons_main.c b/examples/buttons/buttons_main.c index 016aa88cb..c73eee5c6 100644 --- a/examples/buttons/buttons_main.c +++ b/examples/buttons/buttons_main.c @@ -302,12 +302,8 @@ static void show_buttons(uint8_t oldset, uint8_t newset) state = "released"; } - /* Use lowsyslog() because we make be executing from an - * interrupt handler. - */ - - lowsyslog(LOG_INFO, " %s %s\n", - g_buttoninfo[BUTTON_INDEX(i)].name, state); + syslog(LOG_INFO, " %s %s\n", + g_buttoninfo[BUTTON_INDEX(i)].name, state); } } } @@ -317,8 +313,8 @@ static void button_handler(int id, int irq) { uint8_t newset = board_buttons(); - lowsyslog(LOG_INFO, "IRQ:%d Button %d:%s SET:%02x:\n", - irq, id, g_buttoninfo[BUTTON_INDEX(id)].name, newset); + syslog(LOG_INFO, "IRQ:%d Button %d:%s SET:%02x:\n", + irq, id, g_buttoninfo[BUTTON_INDEX(id)].name, newset); show_buttons(g_oldset, newset); g_oldset = newset; @@ -421,7 +417,7 @@ int buttons_main(int argc, char *argv[]) maxbuttons = strtol(argv[1], NULL, 10); } - lowsyslog(LOG_INFO, "maxbuttons: %d\n", maxbuttons); + syslog(LOG_INFO, "maxbuttons: %d\n", maxbuttons); #endif /* Initialize the button GPIOs */ @@ -435,11 +431,9 @@ int buttons_main(int argc, char *argv[]) { xcpt_t oldhandler = board_button_irq(i, g_buttoninfo[BUTTON_INDEX(i)].handler); - /* Use lowsyslog() for compatibility with interrupt handler output. */ - - lowsyslog(LOG_INFO, "Attached handler at %p to button %d [%s], oldhandler:%p\n", - g_buttoninfo[BUTTON_INDEX(i)].handler, i, - g_buttoninfo[BUTTON_INDEX(i)].name, oldhandler); + syslog(LOG_INFO, "Attached handler at %p to button %d [%s], oldhandler:%p\n", + g_buttoninfo[BUTTON_INDEX(i)].handler, i, + g_buttoninfo[BUTTON_INDEX(i)].name, oldhandler); /* Some hardware multiplexes different GPIO button sources to the same * physical interrupt. If we register multiple such multiplexed button @@ -450,9 +444,9 @@ int buttons_main(int argc, char *argv[]) if (oldhandler != NULL) { - lowsyslog(LOG_INFO, "WARNING: oldhandler:%p is not NULL! " - "Button events may be lost or aliased!\n", - oldhandler); + syslog(LOG_INFO, "WARNING: oldhandler:%p is not NULL! " + "Button events may be lost or aliased!\n", + oldhandler); } } #endif @@ -480,11 +474,7 @@ int buttons_main(int argc, char *argv[]) flags = enter_critical_section(); - /* Use lowsyslog() for compatibility with interrupt handler - * output. - */ - - lowsyslog(LOG_INFO, "POLL SET:%02x:\n", newset); + syslog(LOG_INFO, "POLL SET:%02x:\n", newset); show_buttons(g_oldset, newset); g_oldset = newset; leave_critical_section(flags);