[PATCH BlueZ 16/17] csr_bcsp: Fix missing errno attribution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



do_command() is supposed to set errno if returning -1.
---
 tools/csr_bcsp.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/csr_bcsp.c b/tools/csr_bcsp.c
index df247a2..7bfaf5a 100644
--- a/tools/csr_bcsp.c
+++ b/tools/csr_bcsp.c
@@ -219,6 +219,7 @@ static int do_command(uint16_t command, uint16_t seqnum, uint16_t varid, uint8_t
 
 			if (timeout++ > 5000) {
 				fprintf(stderr, "Operation timed out\n");
+				errno = ETIMEDOUT;
 				return -1;
 			}
 		}
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux