[PATCH] plugins/autopair: Provide descriptive error log

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

 



Add more description in error logging.
---
 plugins/autopair.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/autopair.c b/plugins/autopair.c
index d63da93..43b0e00 100644
--- a/plugins/autopair.c
+++ b/plugins/autopair.c
@@ -172,8 +172,8 @@ static int autopair_init(void)
 	n = read(fd, &seed, sizeof(seed));
 	if (n < (ssize_t) sizeof(seed)) {
 		err = (n == -1) ? -errno : -EIO;
-		error("Failed to read %zu bytes from /dev/urandom",
-								sizeof(seed));
+		error("Failed to read %zu bytes from /dev/urandom: %s (%d)",
+					sizeof(seed), strerror(-err), -err);
 		close(fd);
 		return err;
 	}
-- 
1.9.1

--
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