Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752768AbcJKL3F (ORCPT ); Tue, 11 Oct 2016 07:29:05 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:60090 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752511AbcJKL3E (ORCPT ); Tue, 11 Oct 2016 07:29:04 -0400 X-IronPort-AV: E=Sophos;i="5.31,329,1473120000"; d="scan'208";a="391783931" Subject: Re: [PATCH v3] xenbus: advertize control feature flags To: Juergen Gross , Paul Durrant , , References: <1476094403-15064-1-git-send-email-paul.durrant@citrix.com> CC: Boris Ostrovsky From: David Vrabel Message-ID: Date: Tue, 11 Oct 2016 12:25:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 867 Lines: 21 On 11/10/16 11:53, Juergen Gross wrote: > On 10/10/16 12:13, Paul Durrant wrote: >> The Xen docs specify several flags which a guest can set to advertize >> which values of the xenstore control/shutdown key it will recognize. >> This patch adds code to write all the relevant feature-flag keys. >> >> Signed-off-by: Paul Durrant >> Cc: Boris Ostrovsky >> Cc: David Vrabel >> Cc: Juergen Gross > > Hmm, I'd prefer node[] allocated on the stack over dynamic allocation. > > What about something like the following? It will at least issue build > warnings in case the size is too small, will use less memory and less > coding. You still want snprintf() just to be sure. You can add a Reviewed-by David Vrabel if you make this change. David