[hackers] [scc] [driver] output filename and error on mkstemp error || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Mon, 18 Jul 2016 18:06:43 +0200 (CEST)

commit 9cdb74cddc65c7328839be3892384d5e4d095ea1
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
AuthorDate: Fri Jul 1 15:56:02 2016 +0200
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
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
_AT_@ -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;
Received on Mon Jul 18 2016 - 18:06:43 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 18 2016 - 18:12:56 CEST