All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] kvm tools: add HOME env var to hostfs
@ 2012-08-30  7:36 Sasha Levin
  2012-08-30  7:36 ` [PATCH 2/7] kvm tools: clean garbage from ioeventfd code Sasha Levin
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Sasha Levin @ 2012-08-30  7:36 UTC (permalink / raw)
  To: penberg; +Cc: asias.hejun, mingo, gorcunov, kvm, Sasha Levin

Add a HOME env var when booting a hostfs guest. This will point out to a home
dir within the given guest name.

This will make several apps happier when being run under hostfs.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
 tools/kvm/guest/init.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/kvm/guest/init.c b/tools/kvm/guest/init.c
index e1f377f..9655bdf 100644
--- a/tools/kvm/guest/init.c
+++ b/tools/kvm/guest/init.c
@@ -12,7 +12,10 @@
 static int run_process(char *filename)
 {
 	char *new_argv[] = { filename, NULL };
-	char *new_env[] = { "TERM=linux", "DISPLAY=192.168.33.1:0", NULL };
+	char *new_env[] = { "TERM=linux", "DISPLAY=192.168.33.1:0",
+				"HOME=/virt/home", NULL };
+
+	mkdir("/virt/home", 0755);
 
 	return execve(filename, new_argv, new_env);
 }
-- 
1.7.12


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-08-30  9:50 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-30  7:36 [PATCH 1/7] kvm tools: add HOME env var to hostfs Sasha Levin
2012-08-30  7:36 ` [PATCH 2/7] kvm tools: clean garbage from ioeventfd code Sasha Levin
2012-08-30  7:36 ` [PATCH 3/7] kvm tools: Use the new KVM_SIGNAL_MSI ioctl to inject interrupts directly Sasha Levin
2012-08-30  7:36 ` [PATCH 4/7] kvm tools: fix warnings in virtio-blk Sasha Levin
2012-08-30  7:36 ` [PATCH 5/7] kvm tools: enable LTO Sasha Levin
2012-08-30  8:01   ` Pekka Enberg
2012-08-30  8:16     ` Ingo Molnar
2012-08-30  8:22       ` Cyrill Gorcunov
2012-08-30  8:33         ` Sasha Levin
2012-08-30  8:35           ` Cyrill Gorcunov
2012-08-30  9:12         ` Pekka Enberg
2012-08-30  7:36 ` [PATCH 6/7] kvm tools: 9p don't nuke fids on attach Sasha Levin
2012-08-30  7:36 ` [PATCH 7/7] kvm tools: simplify virtio config handling Sasha Levin
2012-08-30  7:50 ` [PATCH 1/7] kvm tools: add HOME env var to hostfs Cyrill Gorcunov
2012-08-30  9:44   ` Sasha Levin
2012-08-30  9:48     ` Pekka Enberg
2012-08-30  9:51       ` Sasha Levin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.