]>
Commit | Line | Data |
---|---|---|
60ae4c08 JR |
1 | diff -ur libvirt-0.9.11/src/Makefile.am libvirt-0.9.11-mod/src/Makefile.am |
2 | --- libvirt-0.9.11/src/Makefile.am 2012-03-23 14:56:20.000000000 +0100 | |
3 | +++ libvirt-0.9.11-mod/src/Makefile.am 2012-04-01 11:47:02.416334370 +0200 | |
b3672394 JR |
4 | @@ -635,12 +635,8 @@ |
5 | endif | |
6 | ||
7 | if WITH_REMOTE | |
8 | -if WITH_DRIVER_MODULES | |
9 | -mod_LTLIBRARIES += libvirt_driver_remote.la | |
10 | -else | |
11 | noinst_LTLIBRARIES += libvirt_driver_remote.la | |
12 | libvirt_la_BUILT_LIBADD += libvirt_driver_remote.la | |
13 | -endif | |
14 | libvirt_driver_remote_la_CFLAGS = \ | |
15 | $(GNUTLS_CFLAGS) \ | |
16 | $(XDR_CFLAGS) \ | |
17 | @@ -648,10 +644,6 @@ | |
18 | libvirt-net-rpc-client.la \ | |
19 | libvirt-net-rpc-server.la \ | |
20 | libvirt-net-rpc.la | |
21 | -if WITH_DRIVER_MODULES | |
22 | -libvirt_driver_remote_la_LIBADD += ../gnulib/lib/libgnu.la | |
23 | -libvirt_driver_remote_la_LDFLAGS += -module -avoid-version | |
24 | -endif | |
25 | libvirt_driver_remote_la_SOURCES = $(REMOTE_DRIVER_SOURCES) | |
26 | ||
27 | $(srcdir)/remote/remote_driver.c: $(REMOTE_DRIVER_GENERATED) | |
28 | @@ -832,6 +832,10 @@ | |
83a55922 | 29 | $(LIBNL_CFLAGS) \ |
b3672394 | 30 | -I$(top_srcdir)/src/conf $(AM_CFLAGS) |
83a55922 | 31 | libvirt_driver_lxc_la_LIBADD = $(CAPNG_LIBS) $(LIBNL_LIBS) |
b3672394 JR |
32 | +if HAVE_LIBBLKID |
33 | +libvirt_driver_lxc_la_CFLAGS += $(BLKID_CFLAGS) | |
34 | +libvirt_driver_lxc_la_LIBADD += $(BLKID_LIBS) | |
35 | +endif | |
36 | if WITH_SECDRIVER_SELINUX | |
37 | libvirt_driver_lxc_la_LIBADD += $(SELINUX_LIBS) | |
38 | endif | |
39 | @@ -1070,7 +1054,6 @@ | |
60ae4c08 JR |
40 | endif |
41 | ||
42 | if WITH_DRIVER_MODULES | |
43 | -libvirt_driver_nodedev_la_LIBADD += ../gnulib/lib/libgnu.la | |
44 | libvirt_driver_nodedev_la_LDFLAGS += -module -avoid-version | |
45 | endif | |
46 | endif | |
b3672394 JR |
47 | --- libvirt-0.9.11/src/driver.c~ 2011-07-20 03:23:18.000000000 +0200 |
48 | +++ libvirt-0.9.11/src/driver.c 2012-04-19 13:20:05.906390855 +0200 | |
49 | @@ -39,7 +39,7 @@ | |
50 | # include <dlfcn.h> | |
51 | ||
52 | void * | |
53 | -virDriverLoadModule(const char *name) | |
54 | +virDriverLoadModule(const char *name, int global) | |
55 | { | |
56 | const char *moddir = getenv("LIBVIRT_DRIVER_DIR"); | |
57 | char *modfile = NULL, *regfunc = NULL; | |
58 | @@ -59,7 +59,10 @@ | |
59 | goto cleanup; | |
60 | } | |
61 | ||
62 | - handle = dlopen(modfile, RTLD_NOW | RTLD_LOCAL); | |
63 | + if (global) | |
64 | + handle = dlopen(modfile, RTLD_NOW | RTLD_GLOBAL); | |
65 | + else | |
66 | + handle = dlopen(modfile, RTLD_NOW | RTLD_LOCAL); | |
67 | if (!handle) { | |
68 | VIR_ERROR(_("failed to load module %s %s"), modfile, dlerror()); | |
69 | goto cleanup; | |
70 | --- libvirt-0.9.11/src/driver.h~ 2012-03-09 08:33:16.000000000 +0100 | |
71 | +++ libvirt-0.9.11/src/driver.h 2012-04-19 13:20:26.199724041 +0200 | |
72 | @@ -1621,6 +1621,6 @@ | |
73 | # ifdef WITH_LIBVIRTD | |
74 | int virRegisterStateDriver(virStateDriverPtr); | |
75 | # endif | |
76 | -void *virDriverLoadModule(const char *name); | |
77 | +void *virDriverLoadModule(const char *name, int global); | |
78 | ||
79 | #endif /* __VIR_DRIVER_H__ */ | |
80 | --- libvirt-0.9.11/src/libvirt.c~ 2012-03-31 12:22:02.000000000 +0200 | |
81 | +++ libvirt-0.9.11/src/libvirt.c 2012-04-19 12:32:29.704680534 +0200 | |
82 | @@ -431,32 +431,29 @@ | |
83 | * is not loaded they'll get a suitable error at that point | |
84 | */ | |
85 | # ifdef WITH_TEST | |
86 | - virDriverLoadModule("test"); | |
87 | + virDriverLoadModule("test", 0); | |
88 | # endif | |
89 | # ifdef WITH_XEN | |
90 | - virDriverLoadModule("xen"); | |
91 | + virDriverLoadModule("xen", 0); | |
92 | # endif | |
93 | # ifdef WITH_OPENVZ | |
94 | - virDriverLoadModule("openvz"); | |
95 | + virDriverLoadModule("openvz", 0); | |
96 | # endif | |
97 | # ifdef WITH_VMWARE | |
98 | - virDriverLoadModule("vmware"); | |
99 | + virDriverLoadModule("vmware", 0); | |
100 | # endif | |
101 | # ifdef WITH_VBOX | |
102 | - virDriverLoadModule("vbox"); | |
103 | + virDriverLoadModule("vbox", 0); | |
104 | # endif | |
105 | # ifdef WITH_ESX | |
106 | - virDriverLoadModule("esx"); | |
107 | + virDriverLoadModule("esx", 0); | |
108 | # endif | |
109 | # ifdef WITH_HYPERV | |
110 | - virDriverLoadModule("hyperv"); | |
111 | + virDriverLoadModule("hyperv", 0); | |
112 | # endif | |
113 | # ifdef WITH_XENAPI | |
114 | - virDriverLoadModule("xenapi"); | |
115 | + virDriverLoadModule("xenapi", 0); | |
116 | # endif | |
117 | -# ifdef WITH_REMOTE | |
118 | - virDriverLoadModule("remote"); | |
119 | -# endif | |
120 | #else | |
121 | # ifdef WITH_TEST | |
122 | if (testRegister() == -1) return -1; | |
123 | @@ -482,10 +482,10 @@ | |
124 | # ifdef WITH_XENAPI | |
125 | if (xenapiRegister() == -1) return -1; | |
126 | # endif | |
127 | +#endif | |
128 | # ifdef WITH_REMOTE | |
129 | if (remoteRegister () == -1) return -1; | |
130 | # endif | |
131 | -#endif | |
132 | ||
133 | return 0; | |
134 | } | |
135 | --- libvirt-0.9.11/daemon/libvirtd.c~ 2012-03-31 12:22:02.000000000 +0200 | |
136 | +++ libvirt-0.9.11/daemon/libvirtd.c 2012-04-19 13:24:33.839722250 +0200 | |
137 | @@ -401,14 +401,14 @@ | |
138 | * If they try to open a connection for a module that | |
139 | * is not loaded they'll get a suitable error at that point | |
140 | */ | |
141 | - virDriverLoadModule("network"); | |
142 | - virDriverLoadModule("storage"); | |
143 | - virDriverLoadModule("nodedev"); | |
144 | - virDriverLoadModule("secret"); | |
145 | - virDriverLoadModule("qemu"); | |
146 | - virDriverLoadModule("lxc"); | |
147 | - virDriverLoadModule("uml"); | |
148 | - virDriverLoadModule("nwfilter"); | |
149 | + virDriverLoadModule("network", 1); | |
150 | + virDriverLoadModule("storage", 0); | |
151 | + virDriverLoadModule("nodedev", 0); | |
152 | + virDriverLoadModule("secret", 0); | |
153 | + virDriverLoadModule("qemu", 0); | |
154 | + virDriverLoadModule("lxc", 0); | |
155 | + virDriverLoadModule("uml", 0); | |
156 | + virDriverLoadModule("nwfilter", 0); | |
157 | #else | |
158 | # ifdef WITH_NETWORK | |
159 | networkRegister(); |