From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyrill Gorcunov Subject: Re: [PATCH 1/7] kvm tools: add HOME env var to hostfs Date: Thu, 30 Aug 2012 11:50:35 +0400 Message-ID: <20120830075035.GD21422@moon> References: <1346312203-29456-1-git-send-email-levinsasha928@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: penberg@kernel.org, asias.hejun@gmail.com, mingo@elte.hu, kvm@vger.kernel.org To: Sasha Levin Return-path: Received: from mail-lpp01m010-f46.google.com ([209.85.215.46]:50882 "EHLO mail-lpp01m010-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752027Ab2H3Huj (ORCPT ); Thu, 30 Aug 2012 03:50:39 -0400 Received: by lagy9 with SMTP id y9so1351633lag.19 for ; Thu, 30 Aug 2012 00:50:37 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1346312203-29456-1-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: 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). Cyrill