Rename ERROR_BUSY to ERROR_TARGET_BUSY.

ERROR_BUSY is already defined somewhere in Windows land.

Change-Id: I91e6f5b6448ce38a2a38598b7261a40bd2488ec5
This commit is contained in:
Tim Newsome 2019-12-18 14:19:18 -08:00
parent 8a9df230ad
commit 06c596e19f
2 changed files with 4 additions and 4 deletions

View File

@ -151,7 +151,7 @@ extern int debug_level;
#define ERROR_WAIT (-5) #define ERROR_WAIT (-5)
/* ERROR_TIMEOUT is already taken by winerror.h. */ /* ERROR_TIMEOUT is already taken by winerror.h. */
#define ERROR_TIMEOUT_REACHED (-6) #define ERROR_TIMEOUT_REACHED (-6)
#define ERROR_BUSY (-7) #define ERROR_TARGET_BUSY (-7)
#endif /* OPENOCD_HELPER_LOG_H */ #endif /* OPENOCD_HELPER_LOG_H */

View File

@ -610,7 +610,7 @@ static int dmi_op_timeout(struct target *target, uint32_t *data_in,
/* The scan where we should have gotten the read value /* The scan where we should have gotten the read value
* returned busy. It's anybody's guess whether the read * returned busy. It's anybody's guess whether the read
* actually happened or not. */ * actually happened or not. */
return ERROR_BUSY; return ERROR_TARGET_BUSY;
} }
} else if (status == DMI_STATUS_SUCCESS) { } else if (status == DMI_STATUS_SUCCESS) {
break; break;
@ -2312,7 +2312,7 @@ static int read_memory_bus_v1(struct target *target, target_addr_t address,
i++) { i++) {
int result = read_memory_bus_word(target, address + i * size, size, int result = read_memory_bus_word(target, address + i * size, size,
buffer + i * size); buffer + i * size);
if (result == ERROR_BUSY) { if (result == ERROR_TARGET_BUSY) {
busy = true; busy = true;
break; break;
} else if (result != ERROR_OK) { } else if (result != ERROR_OK) {
@ -2337,7 +2337,7 @@ static int read_memory_bus_v1(struct target *target, target_addr_t address,
!get_field(sbcs_read, DMI_SBCS_SBBUSYERROR)) { !get_field(sbcs_read, DMI_SBCS_SBBUSYERROR)) {
int result = read_memory_bus_word(target, address + (count - 1) * size, size, int result = read_memory_bus_word(target, address + (count - 1) * size, size,
buffer + (count - 1) * size); buffer + (count - 1) * size);
if (result == ERROR_BUSY) if (result == ERROR_TARGET_BUSY)
busy = true; busy = true;
else if (result != ERROR_OK) else if (result != ERROR_OK)
return result; return result;