Commit 0f405c7c18e11b18d0af5d64667f938718ceed83

Con Kolivas 2012-07-03T10:59:37

Remove applog call from bfwrite to prevent grabbing nested mutexes.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/driver-bitforce.c b/driver-bitforce.c
index 79676e4..64c500c 100644
--- a/driver-bitforce.c
+++ b/driver-bitforce.c
@@ -41,10 +41,9 @@ static void BFgets(char *buf, size_t bufLen, int fd)
 
 static ssize_t BFwrite(int fd, const void *buf, ssize_t bufLen)
 {
-	if ((bufLen) != write(fd, buf, bufLen)) {
-		applog(LOG_ERR, "BFL: Error writing: %s", buf); 
+	if ((bufLen) != write(fd, buf, bufLen))
 		return 0;
-	} else
+	else
 		return bufLen;
 }