sigrok-cli exits silently in many cases where values passed to --config are
empty strings or haven't been converted by GLib functions properly.
Check for errors and notify the user.
Signed-off-by: Bartosz Golaszewski <redacted>
}
src->key = srci->key;
- if ((value == NULL) &&
+ if ((value == NULL || strlen(value) == 0) &&
(srci->datatype != SR_T_BOOL)) {
g_critical("Option '%s' needs a value.", (char *)key);
return -1;
ret = -1;
}
+ if (ret < 0)
+ g_critical("Invalid value: '%s' for option '%s'", value, key);
+
return ret;
}