DragonFly BSD
DragonFly submit List (threaded) for 2004-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[PATCH] make cat use warn instead of perror


From: Ulf Lilleengen <lulf@xxxxxxxxxxxx>
Date: Tue, 20 Jul 2004 20:24:46 +0200

This fix makes cat use warn instad of perror as it shouuld
Obtained from FreeBSD 5.2-CURRENT

- Ulf Lilleengen / lulf
--- cat.c.orig	Tue Jul 20 20:15:35 2004
+++ cat.c	Tue Jul 20 20:16:33 2004
@@ -290,11 +290,11 @@
 		switch (flags & O_ACCMODE) {
 		case O_RDONLY:
 			if (shutdown(fd, SHUT_WR) == -1)
-				perror("cat");
+				warn(NULL);
 			break;
 		case O_WRONLY:
 			if (shutdown(fd, SHUT_RD) == -1)
-				perror("cat");
+				warn(NULL);
 			break;
 		default:
 			break;


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]