Commit 57c4f7c1 authored by Federico Vaga's avatar Federico Vaga

wrtd:lib: add missing error messages

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent ae9391c9
...@@ -32,6 +32,8 @@ const char *wrtd_errors[] = { ...@@ -32,6 +32,8 @@ const char *wrtd_errors[] = {
"Received an invalid hash chain", "Received an invalid hash chain",
"Received an invalid trigger handle", "Received an invalid trigger handle",
"Trigger not found", "Trigger not found",
"No trigger condition",
"Invalid pulse width",
}; };
......
...@@ -533,7 +533,7 @@ static int wrtd_out_rule_delay_set(struct wrtd_node *dev, ...@@ -533,7 +533,7 @@ static int wrtd_out_rule_delay_set(struct wrtd_node *dev,
if (delay_ps > (1000 * 1000 * 1000 * 1000ULL - 1000ULL)) if (delay_ps > (1000 * 1000 * 1000 * 1000ULL - 1000ULL))
{ {
errno = -EWRTD_INVALID_DELAY; errno = EWRTD_INVALID_DELAY;
return -1; return -1;
} }
...@@ -587,7 +587,7 @@ int wrtd_out_pulse_width_set(struct wrtd_node *dev, unsigned int output, ...@@ -587,7 +587,7 @@ int wrtd_out_pulse_width_set(struct wrtd_node *dev, unsigned int output,
if (width_ps < 1000ULL * 250 || width_ps >= 1000ULL * 1000 * 1000 * 1000 ) if (width_ps < 1000ULL * 250 || width_ps >= 1000ULL * 1000 * 1000 * 1000 )
{ {
//fixme : add errno errno = EWRTD_INVALID_PULSE_WIDTH;
return -1; return -1;
} }
......
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