public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: master - cman: Set config_version to -1 when running with no config file
@ 2009-01-28 14:38 Christine Caulfield
0 siblings, 0 replies; only message in thread
From: Christine Caulfield @ 2009-01-28 14:38 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=14339c5ff2c3e435f0b8ea02007f71b9970a0f01
Commit: 14339c5ff2c3e435f0b8ea02007f71b9970a0f01
Parent: 8e8918f3d0db152a3c5705bca91bfd4945c0cafe
Author: Christine Caulfield <ccaulfie@redhat.com>
AuthorDate: Wed Jan 28 14:37:07 2009 +0000
Committer: Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Wed Jan 28 14:37:07 2009 +0000
cman: Set config_version to -1 when running with no config file
Also disable cman_tool version in that case.
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
cman/cman_tool/main.c | 5 +++++
cman/config/cman-preconfig.c | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/cman/cman_tool/main.c b/cman/cman_tool/main.c
index a6d5102..7f99207 100644
--- a/cman/cman_tool/main.c
+++ b/cman/cman_tool/main.c
@@ -589,6 +589,11 @@ static void version(commandline_t *comline)
if ((result = cman_get_version(h, &ver)))
die("can't get version: %s", cman_error(errno));
+ if (ver.cv_config == -1) {
+ printf("cman is running without a configuration file\n");
+ goto out;
+ }
+
if (!comline->config_version_opt) {
printf("%d.%d.%d config %d\n", ver.cv_major, ver.cv_minor, ver.cv_patch,
ver.cv_config);
diff --git a/cman/config/cman-preconfig.c b/cman/config/cman-preconfig.c
index fe57c45..338d896 100644
--- a/cman/config/cman-preconfig.c
+++ b/cman/config/cman-preconfig.c
@@ -963,7 +963,7 @@ static int set_noccs_defaults(struct objdb_iface_ver0 *objdb)
cluster_name, strlen(cluster_name)+1);
/* Add a dummy config_version */
- sprintf(tmp, "%d", 0);
+ sprintf(tmp, "%d", -1);
objdb->object_key_create(cluster_parent_handle, "config_version", strlen("config_version"),
tmp, strlen(tmp)+1);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-28 14:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-28 14:38 cluster: master - cman: Set config_version to -1 when running with no config file Christine Caulfield
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 read-only IMAP folder(s) and NNTP newsgroup(s).