From 4a0cef94a56a1fff2ca3f7deb48c0a1d0c963c5e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 26 Jun 2007 13:47:04 +0000 Subject: [PATCH] Tue Jun 26 14:40:00 BST 2007 Richard W.M. Jones * src/remote_internal.c, python/Makefile.am: Python bindings fixed, and now building virConnect.getHostname and virConnect.getURI. Fixed a problem which stopped libvirt.py from being (re-)built. Rearranged python/Makefile.am to make it cleaner and clearer. --- ChangeLog | 8 ++++++++ python/Makefile.am | 32 ++++++++++++++------------------ src/remote_internal.c | 18 ++++++++---------- 3 files changed, 30 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index cbc76d2b79..b503628850 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Tue Jun 26 14:40:00 BST 2007 Richard W.M. Jones + + * src/remote_internal.c, python/Makefile.am: Python bindings + fixed, and now building virConnect.getHostname and + virConnect.getURI. Fixed a problem which stopped + libvirt.py from being (re-)built. Rearranged + python/Makefile.am to make it cleaner and clearer. + Tue Jun 26 12:40:00 BST 2007 Richard W.M. Jones * include/libvirt/libvirt.h.in, src/libvirt.c: (and numerous diff --git a/python/Makefile.am b/python/Makefile.am index dbb471d305..4f97610912 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -37,35 +37,31 @@ libvirtmod_la_LIBADD = $(mylibs) # Python header files contain a redundant decl, hence: libvirtmod_la_CFLAGS = -Wno-redundant-decls -libvirt.py: $(srcdir)/libvir.py libvirtclass.py - cat $(srcdir)/libvir.py libvirtclass.py > libvirt.py - -install-data-local: - $(mkinstalldirs) $(DESTDIR)$(pythondir) - @INSTALL@ -m 0644 libvirt.py $(DESTDIR)$(pythondir) - $(mkinstalldirs) $(DESTDIR)$(DOCS_DIR) - @(for doc in $(DOCS) ; \ - do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done) - GENERATE = generator.py API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-python-api.xml -GENERATED= libvirt.py \ - libvirt-export.c \ +GENERATED= libvirt-export.c \ libvirtclass.txt \ libvirt-py.c \ libvirt-py.h \ libvirtclass.py -CLEANFILES= $(GENERATED) gen_prog libvirt.py - -$(GENERATED): gen_prog - -gen_prog: $(srcdir)/$(GENERATE) $(API_DESC) +$(GENERATED): $(srcdir)/$(GENERATE) $(API_DESC) $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir) - touch gen_prog + +libvirt.py: $(srcdir)/libvir.py libvirtclass.py + cat $(srcdir)/libvir.py libvirtclass.py > libvirt.py $(libvirtmod_la_OBJECTS): $(GENERATED) +install-data-local: + $(mkinstalldirs) $(DESTDIR)$(pythondir) + @INSTALL@ -m 0644 libvirt.py $(DESTDIR)$(pythondir) + $(mkinstalldirs) $(DESTDIR)$(DOCS_DIR) + @(for doc in $(DOCS) ; \ + do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done) + +CLEANFILES= $(GENERATED) libvirt.py + else all: endif diff --git a/src/remote_internal.c b/src/remote_internal.c index 31db7a1a80..6d020de33c 100644 --- a/src/remote_internal.c +++ b/src/remote_internal.c @@ -104,15 +104,6 @@ static void query_free (struct query_fields *fields); static int initialise_gnutls (virConnectPtr conn); static gnutls_session_t negotiate_gnutls_on_connection (virConnectPtr conn, int sock, int no_verify, const char *hostname); -/* Supported transports. */ -enum transport { - trans_tls, - trans_unix, - trans_ssh, - trans_ext, - trans_tcp, -}; - static int remoteOpen (virConnectPtr conn, const char *uri_str, int flags) { @@ -131,7 +122,14 @@ remoteOpen (virConnectPtr conn, const char *uri_str, int flags) return VIR_DRV_OPEN_DECLINED; /* Decline - not a remote URL. */ /* What transport? */ - enum transport transport; + enum { + trans_tls, + trans_unix, + trans_ssh, + trans_ext, + trans_tcp, + } transport; + if (!transport_str || strcasecmp (transport_str, "tls") == 0) transport = trans_tls; else if (strcasecmp (transport_str, "unix") == 0) -- GitLab