summaryrefslogtreecommitdiff
path: root/src/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/pe_amain.c4
-rw-r--r--src/driver/pe_driver_ctx.c14
2 files changed, 17 insertions, 1 deletions
diff --git a/src/driver/pe_amain.c b/src/driver/pe_amain.c
index 606184d..c48ec1c 100644
--- a/src/driver/pe_amain.c
+++ b/src/driver/pe_amain.c
@@ -84,6 +84,10 @@ int pe_main(char ** argv, char ** envp, const struct pe_fd_ctx * fdctx)
pe_cmd_perk(dctx,*unit);
break;
+ case PERK_CMD_AR:
+ pe_cmd_ar(dctx);
+ break;
+
default:
break;
}
diff --git a/src/driver/pe_driver_ctx.c b/src/driver/pe_driver_ctx.c
index afa46e7..a427252 100644
--- a/src/driver/pe_driver_ctx.c
+++ b/src/driver/pe_driver_ctx.c
@@ -27,12 +27,14 @@ static const struct pe_source_version pe_src_version = {
/* perk command names */
static const char * const perk_cmd_name[PERK_CMD_CAP] = {
[PERK_CMD_PERK] = "perk",
+ [PERK_CMD_AR] = "ar",
};
/* perk command options */
static const struct argv_option * perk_cmd_options[PERK_CMD_CAP] = {
[PERK_CMD_DEFAULT] = pe_default_options,
[PERK_CMD_PERK] = pe_perk_options,
+ [PERK_CMD_AR] = pe_ar_options,
};
/* default fd context */
@@ -160,6 +162,9 @@ static int pe_cmd_from_program(const char * program)
if (!strcmp(mark,"perk")) {
return PERK_CMD_PERK;
+ } else if (!strcmp(mark,"ar")) {
+ return PERK_CMD_AR;
+
} else {
return PERK_CMD_DEFAULT;
}
@@ -417,6 +422,9 @@ int pe_lib_get_driver_ctx(
} else if (cctx.cmd == PERK_CMD_PERK) {
argv_optv_init(pe_perk_options,optv);
+
+ } else if (cctx.cmd == PERK_CMD_AR) {
+ argv_optv_init(pe_ar_options,optv);
}
/* process the selected tool's command-line arguments */
@@ -434,12 +442,16 @@ int pe_lib_get_driver_ctx(
}
/* utility mode and no action to take? */
- if (cctx.drvflags & PERK_DRIVER_VERBOSITY_UTILITY)
+ if (cctx.cmd == PERK_CMD_AR) {
+ (void)0;
+
+ } else if (cctx.drvflags & PERK_DRIVER_VERBOSITY_UTILITY) {
if (!nunits && !(cctx.drvflags & PERK_DRIVER_VERSION))
return pe_driver_usage(
fdctx->fdout,
program,0,
optv,meta,cctx.cmd);
+ }
/* context allocation */
if (!(ctx = pe_driver_ctx_alloc(meta,fdctx,&cctx,nunits)))