]> err.no Git - dpkg/commitdiff
s-s-d: Move version output from --help to --version
authorGuillem Jover <guillem@debian.org>
Thu, 17 Jan 2008 04:14:43 +0000 (06:14 +0200)
committerGuillem Jover <guillem@debian.org>
Thu, 17 Jan 2008 21:30:05 +0000 (23:30 +0200)
ChangeLog
utils/start-stop-daemon.c

index acc6ee1bfaa4f834417c788e57d3a5dcc27ccf5f..73293e6a3109c6bc88b652354bc95e413c0482c6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-01-17  Guillem Jover  <guillem@debian.org>
+
+       * utils/start-stop-daemon.c (do_help): Move version printing to ...
+       (do_version): ... here. New function.
+       (main): Call do_version instead of printf.
+
 2008-01-17  Raphael Hertzog  <hertzog@debian.org>
 
        * scripts/dpkg-genchanges.pl: Reinstate support of the ${Format}
index c384031e39dd534d990e44994d5d5a2e7fc4ebc7..7994b5b5268e95ea7bb8faf3e06a1a7a322aba87 100644 (file)
@@ -338,9 +338,6 @@ static void
 do_help(void)
 {
        printf(
-"start-stop-daemon %s for Debian - small and fast C version written by\n"
-"Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl>, public domain.\n"
-"\n"
 "Usage: start-stop-daemon [<option> ...] <command>\n"
 "\n"
 "Commands:\n"
@@ -379,8 +376,15 @@ do_help(void)
 "or <schedule> may be just <timeout>, meaning <signal>/<timeout>/KILL/<timeout>\n"
 "\n"
 "Exit status:  0 = done      1 = nothing done (=> 0 if --oknodo)\n"
-"              3 = trouble   2 = with --retry, processes wouldn't die\n",
-              VERSION);
+"              3 = trouble   2 = with --retry, processes wouldn't die\n");
+}
+
+static void
+do_version(void)
+{
+       printf("start-stop-daemon %s for Debian\n\n", VERSION)
+
+       printf("Written by Marek Michalkiewicz, public domain.\n");
 }
 
 static void
@@ -597,7 +601,7 @@ parse_options(int argc, char * const *argv)
                        start = 1;
                        break;
                case 'V':  /* --version */
-                       printf("start-stop-daemon " VERSION "\n");
+                       do_version();
                        exit(0);
                case 'a':  /* --startas <pathname> */
                        startas = optarg;