From f751e14416066fa0290c76c1f675d4093bb1d436 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Fri, 11 Oct 2013 12:55:27 -0500 Subject: 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 . X-Gentoo-Bug: 487588 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=487588 --- src/rc/runscript.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/rc/runscript.c') diff --git a/src/rc/runscript.c b/src/rc/runscript.c index 0eea335f..3ecb6b57 100644 --- a/src/rc/runscript.c +++ b/src/rc/runscript.c @@ -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) */ -- cgit v1.2.3