public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Lon Hohberger <lon@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: RHEL5 - fence: Use libvirt's autodetection by default Date: Thu, 09 Apr 2009 21:06:00 -0000 [thread overview] Message-ID: <20090409210600.A85731201BB@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=b08a992e52144b2f6fa6424dd4c69ab705f5d4e1 Commit: b08a992e52144b2f6fa6424dd4c69ab705f5d4e1 Parent: 99f367d0522a290f770f188f201f7c5f4dcd20d8 Author: Lon Hohberger <lhh@redhat.com> AuthorDate: Thu Apr 9 17:04:28 2009 -0400 Committer: Lon Hohberger <lhh@redhat.com> CommitterDate: Thu Apr 9 17:04:28 2009 -0400 fence: Use libvirt's autodetection by default If no URI is specified, assume libvirt will find the right hypervisor. Signed-off-by: Lon Hohberger <lhh@redhat.com> --- fence/agents/xvm/fence_xvmd.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/fence/agents/xvm/fence_xvmd.c b/fence/agents/xvm/fence_xvmd.c index 380c42e..6995a08 100644 --- a/fence/agents/xvm/fence_xvmd.c +++ b/fence/agents/xvm/fence_xvmd.c @@ -62,9 +62,9 @@ int cleanup_xml(char *xmldesc, char **ret, size_t *retsz); static char *hypervisor_uris[] = { + NULL, "xen:///", - "qemu:///system", - NULL + "qemu:///system" }; @@ -77,7 +77,7 @@ find_hypervisor(fence_xvm_args_t *args) if (args->uri) return virConnectOpen(args->uri); - for (x = 0; hypervisor_uris[x]; x++) { + for (x = 0; x < (sizeof(hypervisor_uris)/sizeof(char *)); x++) { vp = virConnectOpen(hypervisor_uris[x]); if (vp) break; @@ -86,9 +86,11 @@ find_hypervisor(fence_xvm_args_t *args) if (!vp) return NULL; - args->uri = strdup(hypervisor_uris[x]); - dbg_printf(1, "DISCOVERY: Using %s as hypervisor URI from now on\n", - args->uri); + if (args->uri) { + args->uri = strdup(hypervisor_uris[x]); + dbg_printf(1, "DISCOVERY: Using %s as hypervisor " + "URI from now on\n", args->uri); + } return vp; }
reply other threads:[~2009-04-09 21:06 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20090409210600.A85731201BB@lists.fedorahosted.org \ --to=lon@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /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: linkBe 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 read-only IMAP folder(s) and NNTP newsgroup(s).