mirror of
https://github.com/FunKey-Project/fkgpiod.git
synced 2025-12-12 16:08:51 +01:00
add notice when loading file
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
parent
4b67fe0851
commit
54d1051d3f
@ -38,6 +38,7 @@
|
||||
#include "uinput.h"
|
||||
|
||||
//#define DEBUG_CONFIG
|
||||
#define NOTICE_CONFIG
|
||||
#define ERROR_CONFIG
|
||||
|
||||
#ifdef DEBUG_CONFIG
|
||||
@ -46,6 +47,12 @@
|
||||
#define FK_DEBUG(...)
|
||||
#endif
|
||||
|
||||
#ifdef NOTICE_CONFIG
|
||||
#define FK_NOTICE(...) syslog(LOG_NOTICE, __VA_ARGS__);
|
||||
#else
|
||||
#define FK_NOTICE(...)
|
||||
#endif
|
||||
|
||||
#ifdef ERROR_CONFIG
|
||||
#define FK_ERROR(...) syslog(LOG_ERR, __VA_ARGS__);
|
||||
#else
|
||||
@ -468,6 +475,7 @@ bool parse_config_file(const char *name, mapping_list_t *list,
|
||||
FILE *fp;
|
||||
int line_number = 0;
|
||||
|
||||
FK_NOTICE("LOAD file %s\n", name);
|
||||
if ((fp = fopen(name, "r")) == NULL) {
|
||||
FK_ERROR("Cannot open file \"%s\"\n", name);
|
||||
return false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user