aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-04-07 19:17:11 +0530
committersinanmohd <sinan@sinanmohd.com>2024-04-08 07:35:51 +0530
commitd926dd0ae80ab3823c5d0d4ee024353b28a4412f (patch)
tree423eaf0422c82c91eb4c651e506f48ea5087cd09
parent1239f873e8b4c627fb346b61cd25ffdaa381ca5d (diff)
libnpass/pass_gen_t: PASS_GEN_PRINT -> PASS_GEN_GRAPH
-rw-r--r--include/libnpass/libnpass.h2
-rw-r--r--src/npass/npass.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/include/libnpass/libnpass.h b/include/libnpass/libnpass.h
index c5e756f..ac7423a 100644
--- a/include/libnpass/libnpass.h
+++ b/include/libnpass/libnpass.h
@@ -3,7 +3,7 @@
typedef enum {
PASS_GEN_DIGIT = 0,
PASS_GEN_ALNUM = 1,
- PASS_GEN_PRINT = 2,
+ PASS_GEN_GRAPH = 2,
} pass_gen_t;
int pass_init(const char *fpr);
diff --git a/src/npass/npass.c b/src/npass/npass.c
index e1f0564..a055317 100644
--- a/src/npass/npass.c
+++ b/src/npass/npass.c
@@ -27,7 +27,7 @@ void print_usage(void)
" Remove password\n"
" add pass-name\n"
" Add new password\n"
- " gen [-d|-a|-p|-l] pass-name\n"
+ " gen [-d|-a|-g|-l] pass-name\n"
" Generate new password\n"
" cat pass-name\n"
" Show encrypted password\n"
@@ -96,9 +96,9 @@ int gen(int argc, char *argv[]) {
char *pass;
int opt, r = 0;
size_t len = 30;
- pass_gen_t gen = PASS_GEN_PRINT;
+ pass_gen_t gen = PASS_GEN_GRAPH;
- while ((opt = getopt(argc, argv, "dapl:")) != -1) {
+ while ((opt = getopt(argc, argv, "dagl:")) != -1) {
switch (opt) {
case 'd':
gen = PASS_GEN_DIGIT;
@@ -106,8 +106,8 @@ int gen(int argc, char *argv[]) {
case 'a':
gen = PASS_GEN_ALNUM;
break;
- case 'p':
- gen = PASS_GEN_PRINT;
+ case 'g':
+ gen = PASS_GEN_GRAPH;
break;
case 'l':
len = atoi(optarg);