diff options
-rw-r--r-- | include/sofort/sofort.h | 12 | ||||
-rw-r--r-- | src/driver/sfrt_driver_ctx.c | 28 | ||||
-rw-r--r-- | src/internal/sofort_driver_impl.h | 4 | ||||
-rw-r--r-- | src/skin/sfrt_skin_default.c | 12 | ||||
-rw-r--r-- | src/sofort.c | 30 |
5 files changed, 43 insertions, 43 deletions
diff --git a/include/sofort/sofort.h b/include/sofort/sofort.h index ee5072f..0808bbe 100644 --- a/include/sofort/sofort.h +++ b/include/sofort/sofort.h @@ -37,8 +37,8 @@ extern "C" { #define SFRT_DRIVER_DRY_RUN 0x0020 /* unit action flags */ -#define SFRT_OUTPUT_NAME 0x0001 -#define SFRT_OUTPUT_ADDRESS 0x0002 +#define SFRT_OUTPUT_NAME 0x0001 /* dummy */ +#define SFRT_OUTPUT_ADDRESS 0x0002 /* dummy */ struct sfrt_input { void * addr; @@ -49,7 +49,7 @@ struct sfrt_common_ctx { uint64_t drvflags; uint64_t actflags; uint64_t fmtflags; - const char * anystring; + const char * anystring; /* dummy */ }; struct sfrt_driver_ctx { @@ -82,9 +82,9 @@ sfrt_api int sfrt_map_input (int fd, const char * path, int prot, struct sfrt_ sfrt_api int sfrt_unmap_input (struct sfrt_input *); /* utility api */ -sfrt_api int sfrt_output_dummy (const struct sfrt_common_ctx *, FILE *); -sfrt_api int sfrt_output_name (const struct sfrt_unit_ctx *, FILE *); -sfrt_api int sfrt_output_address (const struct sfrt_unit_ctx *, FILE *); +sfrt_api int sfrt_output_dummy (const struct sfrt_common_ctx *, FILE *); /* dummy */ +sfrt_api int sfrt_output_name (const struct sfrt_unit_ctx *, FILE *); /* dummy */ +sfrt_api int sfrt_output_address (const struct sfrt_unit_ctx *, FILE *); /* dummy */ #ifdef __cplusplus } diff --git a/src/driver/sfrt_driver_ctx.c b/src/driver/sfrt_driver_ctx.c index 75afd0c..67834c0 100644 --- a/src/driver/sfrt_driver_ctx.c +++ b/src/driver/sfrt_driver_ctx.c @@ -92,7 +92,7 @@ int sfrt_get_driver_ctx( uint64_t dflags; uint64_t aflags; const char * program; - const char * astring; + const char * astring; /* dummy */ options = sfrt_default_options; @@ -102,7 +102,7 @@ int sfrt_get_driver_ctx( dflags = 0; aflags = 0; nunits = 0; - astring = 0; + astring = 0; /* dummy */ program = argv_program_name(argv[0]); if (!argv[1] && (flags & SFRT_DRIVER_VERBOSITY_USAGE)) @@ -119,17 +119,17 @@ int sfrt_get_driver_ctx( case TAG_VERSION: dflags |= SFRT_DRIVER_VERSION; break; - - case TAG_OUTPUT_DUMMY: - astring = entry->arg; - break; - - case TAG_OUTPUT_PROPERTY: - if (!(strcmp(entry->arg,"name"))) - aflags |= SFRT_OUTPUT_NAME; - else if (!(strcmp(entry->arg,"address"))) - aflags |= SFRT_OUTPUT_ADDRESS; - break; +/* dummy */ +/* dummy */ case TAG_OUTPUT_DUMMY: +/* dummy */ astring = entry->arg; +/* dummy */ break; +/* dummy */ +/* dummy */ case TAG_OUTPUT_PROPERTY: +/* dummy */ if (!(strcmp(entry->arg,"name"))) +/* dummy */ aflags |= SFRT_OUTPUT_NAME; +/* dummy */ else if (!(strcmp(entry->arg,"address"))) +/* dummy */ aflags |= SFRT_OUTPUT_ADDRESS; +/* dummy */ break; } } else nunits++; @@ -141,7 +141,7 @@ int sfrt_get_driver_ctx( ctx->ctx.program = program; ctx->cctx.drvflags = dflags; ctx->cctx.actflags = aflags; - ctx->cctx.anystring = astring; + ctx->cctx.anystring = astring; /* dummy */ ctx->ctx.cctx = &ctx->cctx; diff --git a/src/internal/sofort_driver_impl.h b/src/internal/sofort_driver_impl.h index f72d200..b901629 100644 --- a/src/internal/sofort_driver_impl.h +++ b/src/internal/sofort_driver_impl.h @@ -10,8 +10,8 @@ enum app_tags { TAG_HELP, TAG_VERSION, - TAG_OUTPUT_DUMMY, - TAG_OUTPUT_PROPERTY, + TAG_OUTPUT_DUMMY, /* dummy */ + TAG_OUTPUT_PROPERTY, /* dummy */ }; struct sfrt_driver_ctx_impl { diff --git a/src/skin/sfrt_skin_default.c b/src/skin/sfrt_skin_default.c index ef3f6b9..875fd54 100644 --- a/src/skin/sfrt_skin_default.c +++ b/src/skin/sfrt_skin_default.c @@ -8,11 +8,11 @@ const struct argv_option sfrt_default_options[] = { {"help", 'h',TAG_HELP,ARGV_OPTARG_OPTIONAL,"short|long",0, "show usage information [listing %s options only]"}, - {"output-dummy", 'o',TAG_OUTPUT_DUMMY,ARGV_OPTARG_REQUIRED,0,"<anystring>", - "output %s"}, - - {"output-property", 'p',TAG_OUTPUT_PROPERTY,ARGV_OPTARG_REQUIRED,"name|address",0, - "output %s"}, - + {"output-dummy", 'o',TAG_OUTPUT_DUMMY,ARGV_OPTARG_REQUIRED,0,"<anystring>", /* dummy */ + "output %s"}, /* dummy */ + /* dummy */ + {"output-property", 'p',TAG_OUTPUT_PROPERTY,ARGV_OPTARG_REQUIRED,"name|address",0, /* dummy */ + "output %s"}, /* dummy */ + /* dummy */ {0} }; diff --git a/src/sofort.c b/src/sofort.c index af04373..b12ddfd 100644 --- a/src/sofort.c +++ b/src/sofort.c @@ -17,17 +17,17 @@ static ssize_t sofort_version(struct sfrt_driver_ctx * dctx) static void sofort_perform_unit_actions(struct sfrt_unit_ctx * uctx) { - uint64_t flags = uctx->cctx->actflags; - - if (flags & SFRT_OUTPUT_NAME) { - uctx->status = sfrt_output_name(uctx,stdout); - uctx->nerrors += !!uctx->status; - } - - if (flags & SFRT_OUTPUT_ADDRESS) { - uctx->status = sfrt_output_address(uctx,stdout); - uctx->nerrors += !!uctx->status; - } + uint64_t flags = uctx->cctx->actflags; /* dummy */ + /* dummy */ + if (flags & SFRT_OUTPUT_NAME) { /* dummy */ + uctx->status = sfrt_output_name(uctx,stdout); /* dummy */ + uctx->nerrors += !!uctx->status; /* dummy */ + } /* dummy */ + /* dummy */ + if (flags & SFRT_OUTPUT_ADDRESS) { /* dummy */ + uctx->status = sfrt_output_address(uctx,stdout);/* dummy */ + uctx->nerrors += !!uctx->status; /* dummy */ + } /* dummy */ } static int sofort_exit(struct sfrt_driver_ctx * dctx, int nerrors) @@ -50,10 +50,10 @@ int sofort_main(int argc, const char ** argv, const char ** envp) if ((sofort_version(dctx)) < 0) return sofort_exit(dctx,2); - if (dctx->cctx->anystring) - if ((sfrt_output_dummy(dctx->cctx,stdout)) < 0) - return sofort_exit(dctx,2); - + if (dctx->cctx->anystring) /* dummy */ + if ((sfrt_output_dummy(dctx->cctx,stdout)) < 0) /* dummy */ + return sofort_exit(dctx,2); /* dummy */ + /* dummy */ for (unit=dctx->units; *unit; unit++) { if (!(sfrt_get_unit_ctx(dctx,*unit,&uctx))) { sofort_perform_unit_actions(uctx); |