From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/dlm/tool main.c
Date: 2 Jul 2007 20:07:17 -0000 [thread overview]
Message-ID: <20070702200717.19638.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: teigland at sourceware.org 2007-07-02 20:07:17
Modified files:
dlm/tool : main.c
Log message:
Separate lockdump (compact, one lock per line) from lockdebug (verbose
output as seen from proc).
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/tool/main.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.3.2.1&r2=1.3.2.2
--- cluster/dlm/tool/main.c 2007/07/02 15:08:47 1.3.2.1
+++ cluster/dlm/tool/main.c 2007/07/02 20:07:17 1.3.2.2
@@ -31,6 +31,7 @@
#define OP_LEAVE 2
#define OP_SPACES 3
#define OP_LOCKDUMP 4
+#define OP_LOCKDEBUG 5
static char *prog_name;
static char *lsname;
@@ -44,7 +45,7 @@
{
printf("Usage:\n");
printf("\n");
- printf("%s [options] [join|leave|spaces|lockdump]\n", prog_name);
+ printf("%s [options] [join|leave|spaces|lockdump|lockdebug]\n", prog_name);
printf("\n");
printf("Options:\n");
printf(" -v Verbose output, extra event information\n");
@@ -131,6 +132,11 @@
operation = OP_LOCKDUMP;
opt_ind = optind + 1;
break;
+ } else if (!strncmp(argv[optind], "lockdebug", 9) &&
+ (strlen(argv[optind]) == 9)) {
+ operation = OP_LOCKDEBUG;
+ opt_ind = optind + 1;
+ break;
}
optind++;
}
@@ -343,7 +349,7 @@
file = fopen(path, "r");
while (fgets(line, PROC_LINE_MAX, file)) {
- if (verbose) {
+ if (operation == OP_LOCKDEBUG) {
printf("%s", line);
continue;
}
@@ -411,6 +417,7 @@
break;
case OP_LOCKDUMP:
+ case OP_LOCKDEBUG:
do_lockdump(lsname);
break;
}
next reply other threads:[~2007-07-02 20:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-02 20:07 teigland [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-10-26 21:23 [Cluster-devel] cluster/dlm/tool main.c teigland
2007-10-26 21:23 teigland
2007-10-26 20:57 teigland
2007-10-26 18:51 rmccabe
2007-10-17 19:11 teigland
2007-10-17 19:07 teigland
2007-10-17 18:10 teigland
2007-10-17 18:08 teigland
2007-08-20 20:48 teigland
2007-08-20 20:48 teigland
2007-08-20 20:38 teigland
2007-08-20 20:36 teigland
2007-08-20 20:31 teigland
2007-07-24 18:17 teigland
2007-07-19 20:43 teigland
2007-07-03 17:46 teigland
2007-07-03 15:59 teigland
2007-06-25 20:37 teigland
2007-06-25 20:36 teigland
2007-06-05 18:25 teigland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070702200717.19638.qmail@sourceware.org \
--to=teigland@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).