From 037ea88d5e260b506307fccb99795dbbcffa3e6a Mon Sep 17 00:00:00 2001 From: Gowtham Anandha Babu Date: Fri, 21 Nov 2014 14:19:25 +0530 Subject: [PATCH] plugins/autopair: Provide descriptive error log 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 d63da93ac..43b0e00e9 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; } -- 2.11.0