Re: [PATCH 1/5] quorumtool: fix version display info

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

 



ACK

Reviewed-By: Christine Caulfield <ccaulfie@xxxxxxxxxx>

On 28/02/12 10:28, Fabio M. Di Nitto wrote:
From: "Fabio M. Di Nitto"<fdinitto@xxxxxxxxxx>

we don't need that on every run

Signed-off-by: Fabio M. Di Nitto<fdinitto@xxxxxxxxxx>
---
  man/corosync-quorumtool.8   |    5 ++++-
  tools/corosync-quorumtool.c |    5 ++++-
  2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/man/corosync-quorumtool.8 b/man/corosync-quorumtool.8
index 4be6323..6c471e9 100644
--- a/man/corosync-quorumtool.8
+++ b/man/corosync-quorumtool.8
@@ -35,7 +35,7 @@
  .SH NAME
  corosync-quorumtool \- Set and display quorum settings.
  .SH SYNOPSIS
-.B "corosync-quorumtool [\-s] [\-m] [\-l] [\-v votes] [\-n nodeid] [\-e expected] [\-h] [\-i]"
+.B "corosync-quorumtool [\-s] [\-m] [\-l] [\-v votes] [\-n nodeid] [\-e expected] [\-h] [\-i] [\-V]"
  .SH DESCRIPTION
  Display the current state of quorum in the cluster and set vote quorum options.
  .SH OPTIONS
@@ -66,6 +66,9 @@ show node IP addresses instead of the resolved name
  .TP
  .B  -h (if no other argument)
  show this help text
+.TP
+.B  -V
+show version and exit
  .PP
  * Starred items only work if votequorum is the quorum provider for corosync
  .SH SEE ALSO
diff --git a/tools/corosync-quorumtool.c b/tools/corosync-quorumtool.c
index ce547ff..8d9c8c1 100644
--- a/tools/corosync-quorumtool.c
+++ b/tools/corosync-quorumtool.c
@@ -139,6 +139,7 @@ static void show_usage(const char *name)
  	printf("  -f             forcefully unregister a quorum device *DANGEROUS* (*)\n");
  #endif
  	printf("  -h             show this help text\n");
+	printf("  -V             show version and exit\n");
  	printf("\n");
  	printf("  (*) Starred items only work if votequorum is the quorum provider for corosync\n");
  	printf("\n");
@@ -365,7 +366,6 @@ static int display_quorum_data(int is_quorate, uint32_t nodeid, int loop)
  	memset(quorumtype, 0, sizeof(quorumtype));

  	if (!loop) {
-		printf("Version:          %s\n", VERSION);
  		if (get_quorum_type(quorumtype, sizeof(quorumtype))) {
  			strncpy(quorumtype, "Not configured", sizeof(quorumtype) - 1);
  		}
@@ -698,6 +698,9 @@ int main (int argc, char *argv[]) {
  				exit(2);
  			}
  			break;
+		case 'V':
+			printf("corosync-quorumtool version: %s\n", VERSION);
+			exit(0);
  		case ':':
  		case 'h':
  		case '?':

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux