Commit 00adc636 authored by Tristan Gingold's avatar Tristan Gingold

libwrtd.c: handle reset argument

close #3
parent 293ed47e
......@@ -138,7 +138,7 @@ wrtd_status wrtd_init(uint32_t node_id,
trtl = trtl_open_by_id(node_id);
if (trtl == NULL)
if (trtl == NULL)
return WRTD_ERROR_RESOURCE_UNKNOWN;
wrtd_dev *res;
......@@ -180,6 +180,12 @@ wrtd_status wrtd_init(uint32_t node_id,
*wrtd = res;
if (reset) {
status = wrtd_reset(res);
if (status != WRTD_SUCCESS)
return status;
}
return WRTD_SUCCESS;
}
......
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