summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
inline | side by side (from parent 1:
e458893)
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>
+ if ((value == NULL || strlen(value) == 0) &&
(srci->datatype != SR_T_BOOL)) {
g_critical("Option '%s' needs a value.", (char *)key);
return -1;
(srci->datatype != SR_T_BOOL)) {
g_critical("Option '%s' needs a value.", (char *)key);
return -1;
+ if (ret < 0)
+ g_critical("Invalid value: '%s' for option '%s'", value, key);
+