summaryrefslogtreecommitdiff
path: root/src/output
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-10-23 23:16:23 -0400
committermidipix <writeonce@midipix.org>2016-11-11 00:22:48 -0500
commit8cb533819773c88a89c767497043700c0bcd6c4a (patch)
treeceb53512ac5e8474fea61e63e3d664ba630cc870 /src/output
parentb023b752cd6626b338ea72357bf9e61a40c816e6 (diff)
downloadmdso-8cb533819773c88a89c767497043700c0bcd6c4a.tar.bz2
mdso-8cb533819773c88a89c767497043700c0bcd6c4a.tar.xz
mdso_create_output(): added error trace support.
Diffstat (limited to 'src/output')
-rw-r--r--src/output/mdso_create_output.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/output/mdso_create_output.c b/src/output/mdso_create_output.c
index 5bbc50d..14321b7 100644
--- a/src/output/mdso_create_output.c
+++ b/src/output/mdso_create_output.c
@@ -13,6 +13,7 @@
#include <mdso/mdso.h>
#include "mdso_driver_impl.h"
+#include "mdso_errinfo_impl.h"
FILE * mdso_create_output(
const struct mdso_driver_ctx * dctx,
@@ -31,11 +32,14 @@ FILE * mdso_create_output(
if ((fdout = openat(ictx->fddst,asmname,
O_CREAT|O_TRUNC|O_WRONLY|O_NOCTTY|O_NOFOLLOW,
- S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) < 0)
+ S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) < 0) {
+ MDSO_SYSTEM_ERROR(dctx);
return 0;
+ }
if (!(fout = fdopen(fdout,"w"))) {
close(fdout);
+ MDSO_SYSTEM_ERROR(dctx);
return 0;
}