diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2015-03-22 22:09:24 (GMT) |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-04-18 17:11:14 (GMT) |
commit | 60304592b96414b9d84a919262e4b2daf1a954fb (patch) | |
tree | 9b74a696268d3cc4539523bfa9bb610ee9905886 /test/dm | |
parent | 22f68524f84c3a0d620e787c51d5f244ef8e0aca (diff) | |
download | u-boot-60304592b96414b9d84a919262e4b2daf1a954fb.tar.xz |
net: Improve error handling
Take a pass at plumbing errors through to the users of the network stack
Currently only the start() function errors will be returned from
NetLoop(). recv() tends not to have errors, so that is likely not worth
adding. send() certainly can return errors, but this patch does not
attempt to plumb them yet. halt() is not expected to error.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/dm')
-rw-r--r-- | test/dm/eth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/dm/eth.c b/test/dm/eth.c index a0e9359..1923670 100644 --- a/test/dm/eth.c +++ b/test/dm/eth.c @@ -99,7 +99,7 @@ static int dm_test_eth_rotate(struct dm_test_state *dms) /* If ethrotate is no, then we should fail on a bad MAC */ setenv("ethact", "eth@10004000"); setenv("ethrotate", "no"); - ut_asserteq(-1, NetLoop(PING)); + ut_asserteq(-EINVAL, NetLoop(PING)); ut_asserteq_str("eth@10004000", getenv("ethact")); /* Restore the env */ @@ -144,7 +144,7 @@ static int dm_test_net_retry(struct dm_test_state *dms) */ setenv("ethact", "eth@10004000"); setenv("netretry", "no"); - ut_asserteq(-1, NetLoop(PING)); + ut_asserteq(-ETIMEDOUT, NetLoop(PING)); ut_asserteq_str("eth@10004000", getenv("ethact")); /* Restore the env */ |