convert flock() messages to verbose warnings

Convert these messages to warnings that are only displayed if
EINFO_VERBOSE is set to yes in the environment.

This is based on a suggestion from Patrick Lauer <patrick@gentoo.org>.

X-Gentoo-Bug: 487588
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=487588
This commit is contained in:
William Hubbs 2013-10-11 12:55:27 -05:00
parent 4b37d3b16f
commit f751e14416

View File

@ -313,15 +313,13 @@ write_prefix(const char *buffer, size_t bytes, bool *prefixed)
if (lock_fd != -1) {
while (flock(lock_fd, LOCK_EX) != 0) {
if (errno != EINTR) {
eerror("flock() failed: %s", strerror(errno));
ewarnv("flock() failed: %s", strerror(errno));
break;
}
}
}
#ifdef RC_DEBUG
else
ewarn("Couldn't open the prefix lock, please make sure you have enough permissions");
#endif
ewarnv("Couldn't open the prefix lock, please make sure you have enough permissions");
for (i = 0; i < bytes; i++) {
/* We don't prefix eend calls (cursor up) */