diff options
author | Juergen Borleis <jbe@pengutronix.de> | 2019-01-29 12:48:15 +0100 |
---|---|---|
committer | Juergen Borleis <jbe@pengutronix.de> | 2019-01-30 08:55:44 +0100 |
commit | 8c3b39c893074887b44b8bc8c42c5679ae09e427 (patch) | |
tree | be04e59143f0efc026fc6ca79b2c1de9f8cf5b57 | |
parent | 93aacefb15de520e14a7a6972577c94d36b44933 (diff) | |
download | dt-utils-8c3b39c893074887b44b8bc8c42c5679ae09e427.tar.gz dt-utils-8c3b39c893074887b44b8bc8c42c5679ae09e427.tar.xz |
barebox-state: fix error message
Negative errnos result into "Unknown error -22" instead of "Invalid
argument". The latter is more helpful, while the first is mostly useless.
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
-rw-r--r-- | src/barebox-state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/barebox-state.c b/src/barebox-state.c index f8b8df6..3e6c260 100644 --- a/src/barebox-state.c +++ b/src/barebox-state.c @@ -349,7 +349,7 @@ struct state *state_get(const char *name, bool readonly, bool auth) state = state_new_from_node(node, readonly); if (IS_ERR(state)) { pr_err("unable to initialize state: %s\n", - strerror(PTR_ERR(state))); + strerror(-PTR_ERR(state))); return ERR_CAST(state); } |