aboutsummaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'config.c')
-rw-r--r--config.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/config.c b/config.c
index 2913a4e..19b003d 100644
--- a/config.c
+++ b/config.c
@@ -43,6 +43,8 @@ struct config* prepare_config_file() {
return NULL;
}
fputs(CONFIG_FILE_COMMENT, fp);
+ printf("Config file was generated: %s\n", cfg->config_file_path);
+ printf("Warning: There is no device which is defined in config, see README for details.\n");
fix_config_file_owner(cfg->config_file_path);
printf("%s\n", cfg->config_file_path);
fclose(fp);
@@ -82,17 +84,17 @@ struct config* parese_config(struct config* cfg) {
if (CFG_COMPLETE(key, "device")) {
strncpy(cfg->device, val, sizeof(cfg->device) - 1);
cfg->device[sizeof(cfg->device) - 1] = '\0';
- } else if (CFG_COMPLETE(key, "enable_time")) {
+ } else if (CFG_COMPLETE(key, "time")) {
if (CFG_COMPLETE(val, "true")) {
- cfg->enable_time = true;
+ cfg->time = true;
} else {
- cfg->enable_time = false;
+ cfg->time = false;
}
- } else if (CFG_COMPLETE(key, "enable_key_counter")) {
+ } else if (CFG_COMPLETE(key, "key_counter")) {
if (CFG_COMPLETE(val, "true")) {
- cfg->enable_keys_counter = true;
+ cfg->keys_counter = true;
} else {
- cfg->enable_keys_counter = false;
+ cfg->keys_counter = false;
}
}
}