diff options
-rw-r--r-- | doc/man/gnunet-identity.1 | 2 | ||||
-rw-r--r-- | src/identity/gnunet-identity.c | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/doc/man/gnunet-identity.1 b/doc/man/gnunet-identity.1 index 4a8970cf5..e51bbc85d 100644 --- a/doc/man/gnunet-identity.1 +++ b/doc/man/gnunet-identity.1 | |||
@@ -63,6 +63,8 @@ Perform "set" operation with the respective ego or restrict "display" operation | |||
63 | Print the help page. | 63 | Print the help page. |
64 | .It d | \-display | 64 | .It d | \-display |
65 | Display all of our egos. | 65 | Display all of our egos. |
66 | .It q | \-quiet | ||
67 | Be quiet, in particular outputs only the public key when listing egos. | ||
66 | .It v | \-verbose | 68 | .It v | \-verbose |
67 | Be verbose, in particular outputs the public key of freshly created egos. | 69 | Be verbose, in particular outputs the public key of freshly created egos. |
68 | .It m | \-monitor | 70 | .It m | \-monitor |
diff --git a/src/identity/gnunet-identity.c b/src/identity/gnunet-identity.c index 8366b9918..635c59efd 100644 --- a/src/identity/gnunet-identity.c +++ b/src/identity/gnunet-identity.c | |||
@@ -56,6 +56,11 @@ static int monitor; | |||
56 | static unsigned int verbose; | 56 | static unsigned int verbose; |
57 | 57 | ||
58 | /** | 58 | /** |
59 | * Was "quiet" specified? | ||
60 | */ | ||
61 | static int quiet; | ||
62 | |||
63 | /** | ||
59 | * -C option | 64 | * -C option |
60 | */ | 65 | */ |
61 | static char *create_ego; | 66 | static char *create_ego; |
@@ -293,7 +298,12 @@ print_ego (void *cls, | |||
293 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); | 298 | GNUNET_IDENTITY_ego_get_public_key (ego, &pk); |
294 | s = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); | 299 | s = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk); |
295 | if ((monitor) || (NULL != identifier)) | 300 | if ((monitor) || (NULL != identifier)) |
296 | fprintf (stdout, "%s - %s\n", identifier, s); | 301 | { |
302 | if (quiet) | ||
303 | fprintf (stdout, "%s\n", s); | ||
304 | else | ||
305 | fprintf (stdout, "%s - %s\n", identifier, s); | ||
306 | } | ||
297 | GNUNET_free (s); | 307 | GNUNET_free (s); |
298 | } | 308 | } |
299 | 309 | ||
@@ -354,6 +364,10 @@ main (int argc, char *const *argv) | |||
354 | "display", | 364 | "display", |
355 | gettext_noop ("display all egos"), | 365 | gettext_noop ("display all egos"), |
356 | &list), | 366 | &list), |
367 | GNUNET_GETOPT_option_flag ('q', | ||
368 | "quiet", | ||
369 | gettext_noop ("reduce output"), | ||
370 | &quiet), | ||
357 | GNUNET_GETOPT_option_string ( | 371 | GNUNET_GETOPT_option_string ( |
358 | 'e', | 372 | 'e', |
359 | "ego", | 373 | "ego", |