From b183d1ada2b4db899179e1865d4248f8e950a1ca Mon Sep 17 00:00:00 2001 From: midipix Date: Mon, 24 Oct 2016 16:41:54 -0400 Subject: helper api: renamed mdso_create_output() --> mdso_create_asm_source(). --- src/output/mdso_create_output.c | 47 ----------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 src/output/mdso_create_output.c (limited to 'src/output') diff --git a/src/output/mdso_create_output.c b/src/output/mdso_create_output.c deleted file mode 100644 index 14321b7..0000000 --- a/src/output/mdso_create_output.c +++ /dev/null @@ -1,47 +0,0 @@ -/****************************************************************/ -/* mdso: midipix dso scavenger */ -/* Copyright (C) 2015--2016 Z. Gilboa */ -/* Released under GPLv2 and GPLv3; see COPYING.MDSO. */ -/****************************************************************/ - -#include -#include -#include -#include -#include -#include - -#include -#include "mdso_driver_impl.h" -#include "mdso_errinfo_impl.h" - -FILE * mdso_create_output( - const struct mdso_driver_ctx * dctx, - const char * asmname) -{ - struct mdso_driver_ctx_impl * ictx; - uintptr_t addr; - int fdout; - FILE * fout; - - if (!dctx->cctx->dstdir) - return stdout; - - addr = (uintptr_t)dctx - offsetof(struct mdso_driver_ctx_impl,ctx); - ictx = (struct mdso_driver_ctx_impl *)addr; - - 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) { - MDSO_SYSTEM_ERROR(dctx); - return 0; - } - - if (!(fout = fdopen(fdout,"w"))) { - close(fdout); - MDSO_SYSTEM_ERROR(dctx); - return 0; - } - - return fout; -} -- cgit v1.2.3