From patchwork Thu Aug 30 07:36:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 1386701 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 174723FDF5 for ; Thu, 30 Aug 2012 07:36:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751092Ab2H3Hgc (ORCPT ); Thu, 30 Aug 2012 03:36:32 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:53438 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750797Ab2H3Hgc (ORCPT ); Thu, 30 Aug 2012 03:36:32 -0400 Received: by wicr5 with SMTP id r5so7463006wic.1 for ; Thu, 30 Aug 2012 00:36:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=bKo1GMWMwJazJdg+GAOO1F3oruiIu/6dP5rTbPa6H7U=; b=NzE4+09STTzfeiDflxZRUND+pAWW3RmQ/bxLvTcNxES/zr4K0mEzwAvjq5P4gwrv8x Ml30JypQKhnsfJfHALWO5UVJRi6mySawuhYjOKnAem3boN7++VyD3Y/w/F6soMEkkehU Nt2HQeIcrxL7MBCbj5JqvRk5vLFzUg+dkxVXeHLbTutOucB/ExLvJLMGYaTiHtAX6h6p CSVYKNlgWKiGfDwP8I7eECOSAvcVPzwxkz0Jd7nWymjcurUtlujUTinJMA6wC6UI3/n1 yrDTbZa1wfo6G8HxOkaZHnX+HLlKO7dd7IPjfSXW9x/YSyPtCkkemPsuSYV211SfxDlA OvKw== Received: by 10.180.24.197 with SMTP id w5mr44221537wif.22.1346312190897; Thu, 30 Aug 2012 00:36:30 -0700 (PDT) Received: from lappy.capriciverd.com (20.Red-80-59-140.staticIP.rima-tde.net. [80.59.140.20]) by mx.google.com with ESMTPS id fr4sm2847342wib.8.2012.08.30.00.36.27 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 30 Aug 2012 00:36:28 -0700 (PDT) From: Sasha Levin To: penberg@kernel.org Cc: asias.hejun@gmail.com, mingo@elte.hu, gorcunov@openvz.org, kvm@vger.kernel.org, Sasha Levin Subject: [PATCH 1/7] kvm tools: add HOME env var to hostfs Date: Thu, 30 Aug 2012 09:36:37 +0200 Message-Id: <1346312203-29456-1-git-send-email-levinsasha928@gmail.com> X-Mailer: git-send-email 1.7.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 --- 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); }