[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
file(1) in check mode prints "silly verbose header" to stdout
- To: tech@openbsd.org
- Subject: file(1) in check mode prints "silly verbose header" to stdout
- From: "Denis A. Doroshenko" <d.doroshenko@omnitel.net>
- Date: Thu, 6 Nov 2003 08:33:40 +0200
- Content-Disposition: inline
- Mail-Followup-To: tech@openbsd.org
hello,
file(1) in check mode (when it is given -c flag) prints "silly verbose
header" to stdout, while the checking printout itself goes to stderr.
while it may be historical, it seems to be incorrect. this behaviour
may be changed with the following patch (made agains 3.4-release sources):
--
Denis A. Doroshenko, GPRS engineer, d.doroshenko@omnitel.net, +37069863486
Omnitel Ltd., Muitines Str. 35, LT-2600 Vilnius, Lithuania; www.omnitel.lt
--- apprentice.c.orig Thu Nov 6 08:25:09 2003
+++ apprentice.c Thu Nov 6 08:25:28 2003
@@ -120,7 +120,7 @@
/* parse it */
if (check) /* print silly verbose header for USG compat. */
- (void) printf("%s\n", hdr);
+ (void)fprintf(stderr, "%s\n", hdr);
for (lineno = 1;fgets(line, BUFSIZ, f) != NULL; lineno++) {
if (line[0]=='#') /* comment, do not parse */