aboutsummaryrefslogtreecommitdiff
path: root/reload.c
diff options
context:
space:
mode:
authorDavid <dbphillipsnz@gmail.com>2014-06-05 17:49:36 +1200
committerDavid <dbphillipsnz@gmail.com>2014-06-05 17:49:36 +1200
commitf33d490cc017c0a4915bb2ec175df0238702442b (patch)
tree62c19cd0b68f6d5bfd9a3105858d85b84b88b44a /reload.c
parent66e266956c51be09cfc9a8c30c74d1ce80b834e0 (diff)
downloadparamano-f33d490cc017c0a4915bb2ec175df0238702442b.tar.xz
Clean-ups
Diffstat (limited to 'reload.c')
-rw-r--r--reload.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/reload.c b/reload.c
index 1288fe4..6d31586 100644
--- a/reload.c
+++ b/reload.c
@@ -24,17 +24,22 @@
#include "common.h"
#include <stdio.h>
+
+/***********************************************************************
+ * Catches the USR1 sig. Reloads the configuration files and applies any
+ * new changes/config etc
+ ************************************************************************/
void reload_config()
{
debug("Reloading config\n");
+
+ // Reload config
config_init();
- if (_DEFAULT_SHOW_BATTERY)
- {
- //bat_tray_hide();
- bat_tray_show();
- } else {
- bat_tray_hide();
- }
+
+ // Hide battery icon if told to
+ _DEFAULT_SHOW_BATTERY? bat_tray_show() : bat_tray_hide();
+
+ // Update governor and frequency defaults
debug("Re-init freq tray\n");
tray_set_defaults();
}