Commit e4094bdf authored by Adam Wujek's avatar Adam Wujek 💬

userspace/tools: init libwr messages in wrs_checkcfg

In case there are errors it will print process name instead of pid.
for example:
/wr/bin/wrs_checkcfg: Error: Configuration "XXX" not found
instead of:
<pid-123>: Error: Configuration "PORT00_PARAMS" not found
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 6c277a45
......@@ -6,11 +6,14 @@
#include <string.h>
#include <errno.h>
#include <libwr/config.h>
#include <libwr/wrs-msg.h>
int main(int argc, char **argv)
{
int err, verbose = 0;
wrs_msg_init(1, argv);
me_lazy:
if (argc < 2 || !strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")) {
fprintf(stderr, "%s: Use: \"%s [-v] <dotcfg> [<Kconfig>]\"\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment