From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/dlm/tool main.c
Date: 26 Oct 2007 20:57:55 -0000 [thread overview]
Message-ID: <20071026205755.2472.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: teigland at sourceware.org 2007-10-26 20:57:55
Modified files:
dlm/tool : main.c
Log message:
sync with HEAD, except deadlock stuff within #if DEADLOCK
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/tool/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.7&r2=1.2.2.8
--- cluster/dlm/tool/main.c 2007/10/17 19:07:51 1.2.2.7
+++ cluster/dlm/tool/main.c 2007/10/26 20:57:55 1.2.2.8
@@ -24,7 +24,10 @@
#include <netinet/in.h>
#include "libdlm.h"
-/* #include "dlm_controld.h" */
+
+#if DEADLOCK
+#include "dlm_controld.h"
+#endif
#define OPTION_STRING "MhVvd:m:"
@@ -74,7 +77,7 @@
switch (optchar) {
case 'm':
memset(modebuf, 0, sizeof(modebuf));
- snprintf(modebuf, 8, optarg);
+ snprintf(modebuf, 8, "%s", optarg);
sscanf(modebuf, "%o", &create_mode);
break;
@@ -145,15 +148,15 @@
operation = OP_LOCKDEBUG;
opt_ind = optind + 1;
break;
- }
-#if 0
} else if (!strncmp(argv[optind], "spaces", 9) &&
(strlen(argv[optind]) == 6)) {
operation = OP_SPACES;
opt_ind = optind + 1;
need_lsname = 0;
break;
- } else if (!strncmp(argv[optind], "deadlock_check", 14) &&
+ }
+#if DEADLOCK
+ else if (!strncmp(argv[optind], "deadlock_check", 14) &&
(strlen(argv[optind]) == 14)) {
operation = OP_DEADLOCK_CHECK;
opt_ind = optind + 1;
@@ -176,7 +179,6 @@
}
}
-#if 0
static int do_write(int fd, void *buf, size_t count)
{
int rv, off = 0;
@@ -195,7 +197,6 @@
}
return 0;
}
-#endif
void do_join(char *name)
{
@@ -389,7 +390,6 @@
fclose(file);
}
-#if 0
void do_spaces(void)
{
/* TODO: get info from /sys/kernel/config/ */
@@ -419,6 +419,7 @@
return fd;
}
+#if DEADLOCK
static void do_deadlock_check(char *name)
{
char buf[DLM_CONTROLD_MSGLEN];
@@ -470,16 +471,16 @@
case OP_LOCKDEBUG:
do_lockdebug(lsname);
break;
-#if 0
+
case OP_SPACES:
do_spaces();
break;
-
+#if DEADLOCK
case OP_DEADLOCK_CHECK:
do_deadlock_check(lsname);
break;
-#endif
}
+#endif
return 0;
}
next reply other threads:[~2007-10-26 20:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-26 20:57 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 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-07-02 20:07 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=20071026205755.2472.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).