Re: [libvirt] [PATCH] kvm tools: Introduce an ENV variable for the state dir

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

 



On Fri, Nov 11, 2011 at 07:57:00PM +0800, Osier Yang wrote:
> Which is named as "KVMTOOL_STATE_DIR", so that the user can
> configure the path of state directly as he wants.
> ---
>  tools/kvm/main.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/tools/kvm/main.c b/tools/kvm/main.c
> index 05bc82c..37b2b1d 100644
> --- a/tools/kvm/main.c
> +++ b/tools/kvm/main.c
> @@ -13,7 +13,12 @@ static int handle_kvm_command(int argc, char **argv)
>  
>  int main(int argc, char *argv[])
>  {
> -	kvm__set_dir("%s/%s", HOME_DIR, KVM_PID_FILE_PATH);
> +	char *state_dir = getenv("KVMTOOL_STATE_DIR");
> +
> +	if (state_dir)
> +		kvm__set_dir("%s", state_dir);
> +	else
> +		kvm__set_dir("%s/%s", HOME_DIR, KVM_PID_FILE_PATH);
>  
>  	return handle_kvm_command(argc - 1, &argv[1]);
>  }

As per my comments in the first patch, I don't think this is critical
for libvirt's needs. We should just honour the default location that
the KVM tool uses, rather than forcing a libvirt specific location.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux