You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2016/09/27 14:03:00 UTC
qpid-dispatch git commit: DISPATCH-521 - Added -v (--version) command
line option to display version
Repository: qpid-dispatch
Updated Branches:
refs/heads/master 5beb135da -> 229250155
DISPATCH-521 - Added -v (--version) command line option to display version
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/22925015
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/22925015
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/22925015
Branch: refs/heads/master
Commit: 229250155764b2998ba138b57aafcdefba1f5754
Parents: 5beb135
Author: Ganesh Murthy <gm...@redhat.com>
Authored: Tue Sep 27 09:54:39 2016 -0400
Committer: Ganesh Murthy <gm...@redhat.com>
Committed: Tue Sep 27 09:54:39 2016 -0400
----------------------------------------------------------------------
router/src/config.h.in | 1 +
router/src/main.c | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/22925015/router/src/config.h.in
----------------------------------------------------------------------
diff --git a/router/src/config.h.in b/router/src/config.h.in
index d613197..8e09608 100644
--- a/router/src/config.h.in
+++ b/router/src/config.h.in
@@ -17,6 +17,7 @@
* under the License.
*/
+#define QPID_DISPATCH_VERSION "${QPID_DISPATCH_VERSION}"
#cmakedefine DEFAULT_CONFIG_PATH "${DEFAULT_CONFIG_PATH}"
#cmakedefine QPID_DISPATCH_HOME_INSTALLED "${QPID_DISPATCH_HOME_INSTALLED}"
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/22925015/router/src/main.c
----------------------------------------------------------------------
diff --git a/router/src/main.c b/router/src/main.c
index fa895d4..969fc94 100644
--- a/router/src/main.c
+++ b/router/src/main.c
@@ -274,6 +274,7 @@ void usage(char **argv) {
fprintf(stdout, " -d, --daemon Run process as a SysV-style daemon\n");
fprintf(stdout, " -P, --pidfile If daemon, the file for the stored daemon pid\n");
fprintf(stdout, " -U, --user If daemon, the username to run as\n");
+ fprintf(stdout, " -v, --version Print the version of Qpid Dispatch Router\n");
fprintf(stdout, " -h, --help Print this help\n");
}
@@ -293,11 +294,12 @@ int main(int argc, char **argv)
{"pidfile", required_argument, 0, 'P'},
{"user", required_argument, 0, 'U'},
{"help", no_argument, 0, 'h'},
+ {"version", no_argument, 0, 'v'},
{0, 0, 0, 0}
};
while (1) {
- int c = getopt_long(argc, argv, "c:I:dP:U:h", long_options, 0);
+ int c = getopt_long(argc, argv, "c:I:dP:U:h:v", long_options, 0);
if (c == -1)
break;
@@ -326,6 +328,10 @@ int main(int argc, char **argv)
usage(argv);
exit(0);
+ case 'v' :
+ fprintf(stdout, "Qpid Dispatch Router %s\n", QPID_DISPATCH_VERSION);
+ exit(0);
+
case '?' :
usage(argv);
exit(1);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org