From 2e7c8b0b6f26675f107eacc3cce24726de868fd1 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Mon, 17 Aug 2009 12:34:53 +0200 Subject: [PATCH] Small fixes for qemu save compression. Fix up a small memory leak pointed out by DanB; I was forgetting to release memory allocated to driver->saveImageFormat. Also add the "save_image_format" and "security" entries to the augeas lens. Signed-off-by: Chris Lalancette --- qemud/libvirtd_qemu.aug | 2 ++ qemud/test_libvirtd_qemu.aug | 10 +++++++++- src/qemu_driver.c | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/qemud/libvirtd_qemu.aug b/qemud/libvirtd_qemu.aug index 8b8aab254e..2175e14128 100644 --- a/qemud/libvirtd_qemu.aug +++ b/qemud/libvirtd_qemu.aug @@ -29,10 +29,12 @@ module Libvirtd_qemu = | str_entry "vnc_password" | bool_entry "vnc_sasl" | str_entry "vnc_sasl_dir" + | str_entry "security_driver" | str_entry "user" | str_entry "group" | str_array_entry "cgroup_controllers" | str_array_entry "cgroup_device_acl" + | str_entry "save_image_format" (* Each enty in the config is one of the following three ... *) let entry = vnc_entry diff --git a/qemud/test_libvirtd_qemu.aug b/qemud/test_libvirtd_qemu.aug index 274c89d8b1..72f2227932 100644 --- a/qemud/test_libvirtd_qemu.aug +++ b/qemud/test_libvirtd_qemu.aug @@ -80,6 +80,8 @@ vnc_sasl = 1 # vnc_sasl_dir = \"/some/directory/sasl2\" +security_driver = \"selinux\" + user = \"root\" group = \"root\" @@ -87,6 +89,8 @@ group = \"root\" cgroup_controllers = [ \"cpu\", \"devices\" ] cgroup_device_acl = [ \"/dev/null\", \"/dev/full\", \"/dev/zero\" ] + +save_image_format = \"gzip\" " test Libvirtd_qemu.lns get conf = @@ -170,7 +174,9 @@ cgroup_device_acl = [ \"/dev/null\", \"/dev/full\", \"/dev/zero\" ] { "#comment" = "" } { "vnc_sasl_dir" = "/some/directory/sasl2" } { "#empty" } -{ "user"= "root" } +{ "security_driver" = "selinux" } +{ "#empty" } +{ "user" = "root" } { "#empty" } { "group" = "root" } { "#empty" } @@ -184,3 +190,5 @@ cgroup_device_acl = [ \"/dev/null\", \"/dev/full\", \"/dev/zero\" ] { "2" = "/dev/full" } { "3" = "/dev/zero" } } +{ "#empty" } +{ "save_image_format" = "gzip" } diff --git a/src/qemu_driver.c b/src/qemu_driver.c index 70d3d55bc1..eb22940ad9 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -672,6 +672,7 @@ qemudShutdown(void) { VIR_FREE(qemu_driver->vncListen); VIR_FREE(qemu_driver->vncPassword); VIR_FREE(qemu_driver->vncSASLdir); + VIR_FREE(qemu_driver->saveImageFormat); /* Free domain callback list */ virDomainEventCallbackListFree(qemu_driver->domainEventCallbacks);