From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH 1/7] kvm tools: add HOME env var to hostfs Date: Thu, 30 Aug 2012 11:44:26 +0200 Message-ID: <503F35FA.1090809@gmail.com> References: <1346312203-29456-1-git-send-email-levinsasha928@gmail.com> <20120830075035.GD21422@moon> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: penberg@kernel.org, asias.hejun@gmail.com, mingo@elte.hu, kvm@vger.kernel.org To: Cyrill Gorcunov Return-path: Received: from mail-ee0-f46.google.com ([74.125.83.46]:56496 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750730Ab2H3Jnz (ORCPT ); Thu, 30 Aug 2012 05:43:55 -0400 Received: by eekc1 with SMTP id c1so615096eek.19 for ; Thu, 30 Aug 2012 02:43:54 -0700 (PDT) In-Reply-To: <20120830075035.GD21422@moon> Sender: kvm-owner@vger.kernel.org List-ID: On 08/30/2012 09:50 AM, Cyrill Gorcunov wrote: > On Thu, Aug 30, 2012 at 09:36:37AM +0200, Sasha Levin wrote: >> + char *new_env[] = { "TERM=linux", "DISPLAY=192.168.33.1:0", >> + "HOME=/virt/home", NULL }; >> + >> + mkdir("/virt/home", 0755); > > Please add check for mkdir error code. Frankly, this is a bad habbit > to assume that mkdir never fails (this could be done on top of this > series I think but should not be leaved without attention). This is actually supposed to fail most of the times, since it runs as part of the init :) There's not much we can do if it fails though, and even at that point - this failure isn't serious enough to even justify any further action on our end.