Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>2004-11-11 04:17:29 +0300
committerBas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>2004-11-11 04:17:29 +0300
commit5ccf388ed8969885ceb68d99fbd6f8e15838fd4b (patch)
tree12cd5051155f116ed9e03048d22167de670bc61a /winsup/utils
parenteaec5f301f74c3e545c82b47a536db650065b51d (diff)
* cygcheck.cc (keyeprint): New optional parameters: show_error and
print_failed.
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/ChangeLog5
-rw-r--r--winsup/utils/cygcheck.cc9
2 files changed, 12 insertions, 2 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index 272f14c42..08f39a2d9 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-11 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
+
+ * cygcheck.cc (keyeprint): New optional parameters: show_error and
+ print_failed.
+
2004-10-31 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
* cygcheck.cc (get_dword): Fix errormessage.
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index da56e8cd7..57c27bf90 100644
--- a/winsup/utils/cygcheck.cc
+++ b/winsup/utils/cygcheck.cc
@@ -102,9 +102,14 @@ static char **paths = 0;
* keyeprint() is used to report failure modes
*/
static int
-keyeprint (const char *name)
+keyeprint (const char *name, bool show_error = true, bool print_failed = true)
{
- fprintf (stderr, "cygcheck: %s failed: %lu\n", name, GetLastError ());
+ if (show_error)
+ fprintf (stderr, "cygcheck: %s%s: %lu\n", name,
+ print_failed ? " failed" : "", GetLastError ());
+ else
+ fprintf (stderr, "cygcheck: %s%s\n", name,
+ print_failed ? " failed" : "");
return 1;
}