summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-11-16 00:07:52 -0500
committermidipix <writeonce@midipix.org>2016-11-16 00:07:52 -0500
commit8c0fd2dddcdfe366b960fa2e16b670f7c3a47c7a (patch)
tree9aea00d809d34bbb7a6dcb3867635d3d1283113e
parent7d80bbf952b4b4f31e8e4baef76769c2078aca28 (diff)
downloadperk-8c0fd2dddcdfe366b960fa2e16b670f7c3a47c7a.tar.bz2
perk-8c0fd2dddcdfe366b960fa2e16b670f7c3a47c7a.tar.xz
driver: removed --output support (no longer needed).
-rw-r--r--include/perk/perk.h1
-rw-r--r--src/driver/pe_driver_ctx.c16
-rw-r--r--src/internal/perk_driver_impl.h1
-rw-r--r--src/skin/pe_skin_default.c3
4 files changed, 1 insertions, 20 deletions
diff --git a/include/perk/perk.h b/include/perk/perk.h
index 516701f..017f19b 100644
--- a/include/perk/perk.h
+++ b/include/perk/perk.h
@@ -128,7 +128,6 @@ struct pe_common_ctx {
uint64_t drvflags;
uint64_t actflags;
uint64_t fmtflags;
- const char * output;
};
struct pe_driver_ctx {
diff --git a/src/driver/pe_driver_ctx.c b/src/driver/pe_driver_ctx.c
index 32faa7d..8bc1706 100644
--- a/src/driver/pe_driver_ctx.c
+++ b/src/driver/pe_driver_ctx.c
@@ -121,7 +121,6 @@ int pe_get_driver_ctx(
size_t nunits;
const char * program;
const char * pretty;
- int fdout;
(void)envp;
@@ -132,7 +131,6 @@ int pe_get_driver_ctx(
pretty = 0;
nunits = 0;
- fdout = 0;
program = argv_program_name(argv[0]);
memset(&cctx,0,sizeof(cctx));
cctx.drvflags = flags;
@@ -152,10 +150,6 @@ int pe_get_driver_ctx(
cctx.drvflags |= PERK_DRIVER_VERSION;
break;
- case TAG_OUTPUT:
- cctx.output = entry->arg;
- break;
-
case TAG_PRETTY:
pretty = entry->arg;
break;
@@ -184,20 +178,12 @@ int pe_get_driver_ctx(
nunits++;
}
- if (cctx.output && ((fdout = open(cctx.output,
- O_CREAT|O_TRUNC|O_WRONLY|O_NOCTTY|O_NOFOLLOW,
- S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) < 0))
- return pe_get_driver_ctx_fail(meta);
-
if (pretty && !strcmp(pretty,"yaml"))
cctx.fmtflags |= PERK_PRETTY_YAML;
else if (pretty && !strcmp(pretty,"dlltool"))
cctx.fmtflags |= PERK_PRETTY_DLLTOOL;
- if (!(ctx = pe_driver_ctx_alloc(meta,&cctx,nunits)) && cctx.output)
- close(fdout);
-
- if (!ctx)
+ if (!(ctx = pe_driver_ctx_alloc(meta,&cctx,nunits)))
return pe_get_driver_ctx_fail(meta);
ctx->ctx.program = program;
diff --git a/src/internal/perk_driver_impl.h b/src/internal/perk_driver_impl.h
index f52e328..0386d81 100644
--- a/src/internal/perk_driver_impl.h
+++ b/src/internal/perk_driver_impl.h
@@ -14,7 +14,6 @@ extern const struct argv_option pe_default_options[];
enum app_tags {
TAG_HELP,
TAG_VERSION,
- TAG_OUTPUT,
TAG_PRETTY,
TAG_CATEGORY,
TAG_SECTIONS,
diff --git a/src/skin/pe_skin_default.c b/src/skin/pe_skin_default.c
index baafc8a..f958404 100644
--- a/src/skin/pe_skin_default.c
+++ b/src/skin/pe_skin_default.c
@@ -8,9 +8,6 @@ const struct argv_option pe_default_options[] = {
{"help", 'h',TAG_HELP,ARGV_OPTARG_OPTIONAL,0,"short|long",0,
"show usage information [listing %s options only]"},
- {"output", 'o',TAG_OUTPUT,ARGV_OPTARG_REQUIRED,0,0,"<file>",
- "write output to %s"},
-
{"pretty", 'p',TAG_PRETTY,ARGV_OPTARG_REQUIRED,0,"yaml|dlltool",0,
"format output for parsing by %s"},