Skip to content

Commit 54d1051

Browse files
committed
add notice when loading file
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
1 parent 4b67fe0 commit 54d1051

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

parse_config.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "uinput.h"
3939

4040
//#define DEBUG_CONFIG
41+
#define NOTICE_CONFIG
4142
#define ERROR_CONFIG
4243

4344
#ifdef DEBUG_CONFIG
@@ -46,6 +47,12 @@
4647
#define FK_DEBUG(...)
4748
#endif
4849

50+
#ifdef NOTICE_CONFIG
51+
#define FK_NOTICE(...) syslog(LOG_NOTICE, __VA_ARGS__);
52+
#else
53+
#define FK_NOTICE(...)
54+
#endif
55+
4956
#ifdef ERROR_CONFIG
5057
#define FK_ERROR(...) syslog(LOG_ERR, __VA_ARGS__);
5158
#else
@@ -468,6 +475,7 @@ bool parse_config_file(const char *name, mapping_list_t *list,
468475
FILE *fp;
469476
int line_number = 0;
470477

478+
FK_NOTICE("LOAD file %s\n", name);
471479
if ((fp = fopen(name, "r")) == NULL) {
472480
FK_ERROR("Cannot open file \"%s\"\n", name);
473481
return false;

0 commit comments

Comments
 (0)