summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeppia <nonso@insicuri.net>2016-12-09 02:24:23 +0100
committerSeppia <nonso@insicuri.net>2016-12-09 02:24:23 +0100
commit9dd9ac162a7ce76ae6e9b50d2a19935e467638b6 (patch)
treeb693c7dd89fe8c357345cd1ae43e10660bfdf561
parenta0ae5aab1bf3aa3f2557c1ee16a2b9e302d1f196 (diff)
downloadonetimebluh-9dd9ac162a7ce76ae6e9b50d2a19935e467638b6.tar.gz
onetimebluh-9dd9ac162a7ce76ae6e9b50d2a19935e467638b6.tar.bz2
onetimebluh-9dd9ac162a7ce76ae6e9b50d2a19935e467638b6.zip
fixed exit messages with command name
-rw-r--r--src/onetimebluh.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/onetimebluh.c b/src/onetimebluh.c
index 754d199..b206ea8 100644
--- a/src/onetimebluh.c
+++ b/src/onetimebluh.c
@@ -117,16 +117,16 @@ int main(int argc, char* argv[]) {
/* Next section performs some input checks */
if (command == 0) {
- printf("No command called \n");
+ printf("%s: No command called\n", argv[0]);
exit(EXIT_FAILURE);
} else if (command > 1) {
- printf("Multiple commands called \n");
- printf("%s [COMMAND] [OPTIONS] ... \n",argv[0]);
+ printf("Multiple commands called\n");
+ printf("%s [COMMAND] [OPTIONS] ...\n", argv[0]);
exit(EXIT_FAILURE);
}
if (optind < argc) {
- printf("Too many arguments \n");
+ printf("%s: Too many arguments\n", argv[0]);
exit(EXIT_FAILURE);
}
@@ -134,7 +134,7 @@ int main(int argc, char* argv[]) {
if (comm == 'e' || comm == 'r') {
if (keyfile == NULL) {
- printf("No key specified: exit! \n");
+ printf("%s: No key specified: exit!\n", argv[0]);
exit(EXIT_FAILURE);
}
if (tear == 1) {
@@ -341,7 +341,7 @@ void help(char* av[]) {
fprintf(stdout,"ONETIMEBLUH USAGE:\n"
"%s [COMMAND] [OPTIONS]\n\n"
"COMMANDS:\n"
- "-b, --bluh=FILE bluhes your message or in other words performs a bynary dump\n"
+ "-b, --bluh=FILE bluhes your message or in other words performs a binary dump\n"
"-d, --decrypt=FILE decrypt message (input) same ad --encrypt, just for the feeling\n"
"-e, --encrypt=FILE encrypt message (input)\n"
"-g, --gen-key create key file\n"