[Patch] cygcheck: Make keyeprint more versatile.
Bas van Gompel
cygwin-patches.buzz@bavag.tmfweb.nl
Thu Nov 11 00:19:00 GMT 2004
Hi,
Another (trivial, I hope) patch.
It will add some optional parameters to keyeprint, so errormessages
can be made more appropriate. When the options are not supplied, output
will remain as is.
ChangeLog-entry:
2004-11-11 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
* cygcheck.cc (keyeprint): New optional parameters: show_error and
print_failed.
--- src/winsup/utils/cygcheck.cc 31 Oct 2004 18:46:31 -0000 1.59
+++ src/winsup/utils/cygcheck.cc 10 Nov 2004 21:11:26 -0000
@@ -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;
}
L8r,
Buzz.
--
) | | ---/ ---/ Yes, this | This message consists of true | I do not
-- | | / / really is | and false bits entirely. | mail for
) | | / / a 72 by 4 +-------------------------------+ any1 but
-- \--| /--- /--- .sigfile. | |perl -pe "s.u(z)\1.as." | me. 4^re
More information about the Cygwin-patches
mailing list