gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-challenger] branch master updated: add -q option to challenger-ad


From: gnunet
Subject: [taler-challenger] branch master updated: add -q option to challenger-admin
Date: Thu, 02 Nov 2023 16:14:54 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository challenger.

The following commit(s) were added to refs/heads/master by this push:
     new c820e0c  add -q option to challenger-admin
c820e0c is described below

commit c820e0c0bc1ce465b3a6d59ee9a878ddf342af4d
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Nov 2 16:14:50 2023 +0100

    add -q option to challenger-admin
---
 src/challenger/challenger-admin.c | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/src/challenger/challenger-admin.c 
b/src/challenger/challenger-admin.c
index 9b90b44..b22d201 100644
--- a/src/challenger/challenger-admin.c
+++ b/src/challenger/challenger-admin.c
@@ -40,6 +40,11 @@ static char *client_secret;
  */
 static int del_flag;
 
+/**
+ * -q option: be quiet
+ */
+static int be_quiet;
+
 
 /**
  * Main function that will be run.
@@ -120,9 +125,14 @@ run (void *cls,
       global_ret = EXIT_FAILURE;
       goto cleanup;
     case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
-      GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
-                  "Client added. Client ID is: %llu\n",
-                  (unsigned long long) row_id);
+      if (be_quiet)
+        fprintf (stdout,
+                 "%llu\n",
+                 (unsigned long long) row_id);
+      else
+        fprintf (stdout,
+                 "Client added. Client ID is: %llu\n",
+                 (unsigned long long) row_id);
       break;
     }
   }
@@ -153,7 +163,11 @@ main (int argc,
                                "delete",
                                "delete client",
                                &del_flag),
-    /* TODO: add -l / --list option */
+    GNUNET_GETOPT_option_flag ('q',
+                               "quiet",
+                               "be less verbose in the output",
+                               &be_quiet),
+    /* TODO: add -s / --show option */
     GNUNET_GETOPT_OPTION_END
   };
   enum GNUNET_GenericReturnValue ret;

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]