shithub: scc

Download patch

ref: 2737a27209c8ff1444aec1ad3d34d885aec9cf1e
parent: 30334d566f4bdb8cc53c0507c0dad248291b5f4e
author: Hiltjo Posthuma <hiltjo@codemadness.org>
date: Fri Jul 1 11:56:02 EDT 2016

[driver] output filename and error on mkstemp error

--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
@@ -162,7 +162,8 @@
 	if (n < 0 || n >= newsz)
 		die("scc: wrong output filename");
 	if ((tmpfd = mkstemp(new)) < 0 && errno != EINVAL)
-		die("scc: could not create output file");
+		die("scc: could not create output file '%s': %s",
+		    new, strerror(errno));
 	close(tmpfd);
 
 	return new;