Subject: mv(1) patch
To: None <tech-userlevel@netbsd.org>
From: Liam J. Foy <liamfoy@sepulcrum.org>
List: tech-userlevel
Date: 06/03/2005 14:32:38
Hey,

Can you pleace check and commit the following patch:

 - warn() -> warnx(). The global variable errno will not be set correctly.
--- mv.c.old	2005-06-03 14:27:27.000000000 +0100
+++ mv.c	2005-06-03 14:27:46.000000000 +0100
@@ -338,11 +338,11 @@
 		return (1);
 	}
 	if (!WIFEXITED(status)) {
-		warn("%s: did not terminate normally", _PATH_CP);
+		warnx("%s: did not terminate normally", _PATH_CP);
 		return (1);
 	}
 	if (WEXITSTATUS(status)) {
-		warn("%s: terminated with %d (non-zero) status",
+		warnx("%s: terminated with %d (non-zero) status",
 		    _PATH_CP, WEXITSTATUS(status));
 		return (1);
 	}
@@ -356,11 +356,11 @@
 		return (1);
 	}
 	if (!WIFEXITED(status)) {
-		warn("%s: did not terminate normally", _PATH_RM);
+		warnx("%s: did not terminate normally", _PATH_RM);
 		return (1);
 	}
 	if (WEXITSTATUS(status)) {
-		warn("%s: terminated with %d (non-zero) status",
+		warnx("%s: terminated with %d (non-zero) status",
 		    _PATH_RM, WEXITSTATUS(status));
 		return (1);
 	}

Cheers,
-- 
		- Liam J. Foy
		liamfoy@sepulcrum.org