[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] implement managedsave in libvirt xen legacy driver



Jim Fehlig wrote:
> Bamvor Jian Zhang wrote:
>   
>>  src/xen/xen_driver.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++-
>>  src/xen/xen_driver.h |   2 +
>>  2 files changed, 110 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
>> index 5a40757..0b2418d 100644
>> --- a/src/xen/xen_driver.c
>> +++ b/src/xen/xen_driver.c
>> @@ -67,6 +67,7 @@
>>  #include "nodeinfo.h"
>>  
>>  #define VIR_FROM_THIS VIR_FROM_XEN
>> +#define XEN_SAVE_DIR LOCALSTATEDIR "/lib/libvirt/xen/save"
>>   
>>     
>
> #include "configmake.h" is needed for LOCALSTATEDIR
>   

BTW, you will also need to install this directory and add it to %files
in the spec file.  Squashing in the attached patch should do it.

Regards,
Jim

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 5b3f4e4..ec6fc8b 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1719,6 +1719,9 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
 %ghost %dir %{_localstatedir}/run/libvirt/libxl/
 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/libxl/
 %endif
+%if %{with_xen}
+%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/xen/
+%endif
 %if %{with_network}
 %ghost %dir %{_localstatedir}/run/libvirt/network/
 %dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
diff --git a/src/Makefile.am b/src/Makefile.am
index b5c20c8..2d36380 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1768,6 +1768,9 @@ if WITH_UML
 	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/uml"
 	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/uml"
 endif
+if WITH_XEN
+	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/xen"
+endif
 if WITH_NETWORK
 	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/network"
 	$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/dnsmasq"
@@ -1814,6 +1817,9 @@ if WITH_UML
 	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/uml" ||:
 	rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/uml" ||:
 endif
+if WITH_XEN
+	rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/xen" ||:
+endif
 if WITH_NETWORK
 	rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
 	rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]