diff --git a/demo/lenet.c b/demo/lenet.c index 9e11992..9ceacb4 100644 --- a/demo/lenet.c +++ b/demo/lenet.c @@ -57,6 +57,7 @@ void arg_parser(int argc, char* const argv[]) } if (!strlen(image_path) || !strlen(parameters_path)) { printf("error: incomplete argument\n"); + printf("run 'lenet -h' for help.\n"); exit(EXIT_FAILURE); } } diff --git a/demo/lenet_pack.c b/demo/lenet_pack.c index b2a87c6..35165f5 100644 --- a/demo/lenet_pack.c +++ b/demo/lenet_pack.c @@ -30,7 +30,7 @@ void arg_parser(int argc, char* const argv[]) while ((c = parg_getopt(&ps, argc, argv, "hp:o:v")) != -1) { switch (c) { case 'h': - printf("Usage: [-h] -p parameters-path -o pack-name\n"); + printf("Usage: [-h] -p pathname -o filename\n"); printf("-h: Displays this message\n"); printf("-p: Choose parameters file path\n"); printf("-o: Output file name\n"); @@ -58,6 +58,7 @@ void arg_parser(int argc, char* const argv[]) } if (!strlen(parameters_path) || !strlen(parameters_pack)) { printf("error: incomplete argument\n"); + printf("run 'lenet_pack -h' for help.\n"); exit(EXIT_FAILURE); } } diff --git a/demo/lenet_unpack.c b/demo/lenet_unpack.c index ab36b88..cb5e49f 100644 --- a/demo/lenet_unpack.c +++ b/demo/lenet_unpack.c @@ -46,6 +46,7 @@ void arg_parser(int argc, char* const argv[]) } if (!strlen(image_path) || !strlen(parameters_path)) { printf("error: incomplete argument\n"); + printf("run 'lenet_unpack -h' for help.\n"); exit(EXIT_FAILURE); } } diff --git a/makefile b/makefile index 9e3aa17..d7a82c5 100644 --- a/makefile +++ b/makefile @@ -95,7 +95,7 @@ util_log.o util_vec.o util_image.o global_fn_cfg.o CATCOON_A = libcatcoon.a APPS_DEMO = simple lenet lenet_pack lenet_unpack -APPS_UTIL = packager listpkg +APPS_UTIL = lspkg mkpkg APP_NAMES = $(APPS_DEMO) $(APPS_UTIL) APP_INC += $(INC) diff --git a/util/listpkg.c b/util/lspkg.c similarity index 77% rename from util/listpkg.c rename to util/lspkg.c index 0f57149..099e6e6 100644 --- a/util/listpkg.c +++ b/util/lspkg.c @@ -8,8 +8,8 @@ int main(int argc, char const *argv[]) { if (argc != 2) { - printf("Usage: listpkg package-file\n"); - exit(-1); + printf("Usage: lspkg package-file\n"); + exit(EXIT_FAILURE); } cc_tsrmgr_import(argv[1]); cc_tsrmgr_list(); diff --git a/util/packager.c b/util/mkpkg.c similarity index 98% rename from util/packager.c rename to util/mkpkg.c index b0f5372..c6eb5d8 100644 --- a/util/packager.c +++ b/util/mkpkg.c @@ -33,7 +33,7 @@ void arg_parser(int argc, char* const argv[]) while ((c = parg_getopt(&ps, argc, argv, "hp:o:v")) != -1) { switch (c) { case 'h': - printf("Usage: [-h] -p parameters-path -o pack-name\n"); + printf("Usage: [-h] -p pathname -o filename\n"); printf("-h: Displays this message\n"); printf("-p: Choose parameters file path\n"); printf("-o: Output file name\n"); @@ -61,6 +61,7 @@ void arg_parser(int argc, char* const argv[]) } if (!strlen(parameters_path) || !strlen(parameters_pack)) { printf("error: incomplete argument\n"); + printf("run 'mkpkg -h' for help.\n"); exit(EXIT_FAILURE); } }