Frank Filz has uploaded this change for review.
CONFIG: Allow for static message buffer for config errors
There are some situations like DBUS commands that use config parsing
functions. These functions take a complex set of structures that allow
collecting a stream of error messages. For those cases where only a
single error is expected, allow for a static buffer to be passed.
The new init_error_type_static() function initializes a struct
config_error_type with a static buffer instead of a file stream and
a dynamic buffer. The fp is then set to NULL.
The config_proc_error() function will check for a valid buffer and
NULL fp and just print into that buffer. It won't display the
filename and linenumber (so cnode can be NULL) which is appropriate
for a DBUS command.
Change-Id: I0365850ecbfe91b9af7cd028a026bde12f882b56
Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
---
M src/config_parsing/config_parsing.c
M src/include/config_parsing.h
2 files changed, 29 insertions(+), 3 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/96/1231196/1
To view, visit change 1231196. To unsubscribe, or for help writing mail filters, visit settings.