mirror of
https://github.com/FunKey-Project/fkgpiod.git
synced 2025-12-13 00:18:52 +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"
|
#include "uinput.h"
|
||||||
|
|
||||||
//#define DEBUG_CONFIG
|
//#define DEBUG_CONFIG
|
||||||
|
#define NOTICE_CONFIG
|
||||||
#define ERROR_CONFIG
|
#define ERROR_CONFIG
|
||||||
|
|
||||||
#ifdef DEBUG_CONFIG
|
#ifdef DEBUG_CONFIG
|
||||||
@ -46,6 +47,12 @@
|
|||||||
#define FK_DEBUG(...)
|
#define FK_DEBUG(...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef NOTICE_CONFIG
|
||||||
|
#define FK_NOTICE(...) syslog(LOG_NOTICE, __VA_ARGS__);
|
||||||
|
#else
|
||||||
|
#define FK_NOTICE(...)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ERROR_CONFIG
|
#ifdef ERROR_CONFIG
|
||||||
#define FK_ERROR(...) syslog(LOG_ERR, __VA_ARGS__);
|
#define FK_ERROR(...) syslog(LOG_ERR, __VA_ARGS__);
|
||||||
#else
|
#else
|
||||||
@ -468,6 +475,7 @@ bool parse_config_file(const char *name, mapping_list_t *list,
|
|||||||
FILE *fp;
|
FILE *fp;
|
||||||
int line_number = 0;
|
int line_number = 0;
|
||||||
|
|
||||||
|
FK_NOTICE("LOAD file %s\n", name);
|
||||||
if ((fp = fopen(name, "r")) == NULL) {
|
if ((fp = fopen(name, "r")) == NULL) {
|
||||||
FK_ERROR("Cannot open file \"%s\"\n", name);
|
FK_ERROR("Cannot open file \"%s\"\n", name);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user