commit-inetutils
[Top][All Lists]
Advanced

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

[SCM] GNU Inetutils branch, master, updated. release_1_5-189-g21a1fdf


From: Giuseppe Scrivano
Subject: [SCM] GNU Inetutils branch, master, updated. release_1_5-189-g21a1fdf
Date: Fri, 21 Aug 2009 20:41:30 +0000

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 <address@hidden>
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  <address@hidden>
+
+       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  <address@hidden>
 
        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 




reply via email to

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