commit 9cdb74cddc65c7328839be3892384d5e4d095ea1
Author: Hiltjo Posthuma <[email protected]>
AuthorDate: Fri Jul 1 15:56:02 2016 +0200
Commit: Hiltjo Posthuma <[email protected]>
CommitDate: Fri Jul 1 15:56:02 2016 +0200
[driver] output filename and error on mkstemp error
diff --git a/driver/posix/scc.c b/driver/posix/scc.c
index a1cf9a8..b410112 100644
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
@@ -162,7 +162,8 @@ outfilename(char *path, char *ext)
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;