This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=21a1fdf766c6b2a77f471fe8e114a14e24d8eddf

The branch, master has been updated
       via  21a1fdf766c6b2a77f471fe8e114a14e24d8eddf (commit)
      from  fdf9b75e9ff6be696628770e26067e95bd1473c0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 21a1fdf766c6b2a77f471fe8e114a14e24d8eddf
Author: Giuseppe Scrivano <[email protected]>
Date:   Fri Aug 21 22:38:47 2009 +0200

    rexec: show all missing arguments before exit.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog     |    7 +++++++
 rexec/rexec.c |   25 ++++++++++++++++++++-----
 2 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 107bdd5..ac4ad13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-08-21  Giuseppe Scrivano  <[email protected]>
+
+       rexec: show all missing arguments before exit.
+
+       * rexec/rexec.c (main): Show all missing arguments before exit from the
+       process.
+
 2009-08-20  Giuseppe Scrivano  <[email protected]>
 
        rexec: new program.
diff --git a/rexec/rexec.c b/rexec/rexec.c
index 9578ee8..9ac9246 100644
--- a/rexec/rexec.c
+++ b/rexec/rexec.c
@@ -124,7 +124,7 @@ int
 main (int argc, char **argv)
 {
   struct arguments arguments;
-
+  int failed = 0;
   set_program_name (argv[0]);
 
   iu_argp_init ("rexec", program_authors);
@@ -140,16 +140,31 @@ main (int argc, char **argv)
   argp_parse (&argp, argc, argv, ARGP_IN_ORDER, 0, &arguments);
 
   if (arguments.user == NULL)
-    error (EXIT_FAILURE, 0, "user not specified");
+    {
+      error (0, 0, "user not specified");
+      failed++;
+    }
 
   if (arguments.password == NULL)
-    error (EXIT_FAILURE, 0, "password not specified");
+    {
+      error (0, 0, "password not specified");
+      failed++;
+    }
 
   if (arguments.host == NULL)
-    error (EXIT_FAILURE, 0, "host not specified");
+    {
+      error (0, 0, "host not specified");
+      failed++;
+    }
 
   if (arguments.command == NULL)
-    error (EXIT_FAILURE, 0, "command not specified");
+    {
+      error (0, 0, "command not specified");
+      failed++;
+    }
+
+  if (failed > 0)
+    exit (EXIT_FAILURE);
 
   do_rexec (&arguments);
 


hooks/post-receive
-- 
GNU Inetutils 


_______________________________________________
Commit-inetutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-inetutils

Reply via email to