From 8e81f070da676ff3ec226e29994f7d3c6f1cec3b Mon Sep 17 00:00:00 2001
From: "Wesley W. Terpstra" <w.terpstra@gsi.de>
Date: Thu, 16 Feb 2012 14:05:06 +0000
Subject: [PATCH] More helpful error message.

---
 api/etherbone.h   | 2 +-
 api/glue/device.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/api/etherbone.h b/api/etherbone.h
index e85c0a5..1b5e24c 100644
--- a/api/etherbone.h
+++ b/api/etherbone.h
@@ -244,7 +244,7 @@ eb_status_t eb_socket_detach(eb_socket_t socket, eb_address_t address);
  * Return codes:
  *   OK		- the remote etherbone device is ready
  *   ADDRESS	- the network address could not be parsed
- *   FAIL	- the remote address did not identify itself as etherbone conformant
+ *   TIMEOUT    - the remote host did not respond with etherbone
  *   WIDTH      - could not negotiate an acceptable data bus width
  *   OOM        - out of memory
  */
diff --git a/api/glue/device.c b/api/glue/device.c
index e244c47..81b4d39 100644
--- a/api/glue/device.c
+++ b/api/glue/device.c
@@ -131,7 +131,7 @@ eb_status_t eb_device_open(eb_socket_t socketp, const char* address, eb_width_t
   if (device->widths == 0) {
     eb_device_close(devicep);
     *result = EB_NULL;
-    return EB_FAIL;
+    return EB_TIMEOUT;
   }
   
   device->widths &= proposed_widths;
-- 
GitLab