Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752379AbcJJK1P convert rfc822-to-8bit (ORCPT ); Mon, 10 Oct 2016 06:27:15 -0400 Received: from smtp.ctxuk.citrix.com ([185.25.65.24]:59643 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751710AbcJJK1O (ORCPT ); Mon, 10 Oct 2016 06:27:14 -0400 X-IronPort-AV: E=Sophos;i="5.31,324,1473120000"; d="scan'208";a="32757921" From: Paul Durrant To: David Vrabel , "linux-kernel@vger.kernel.org" , "xen-devel@lists.xenproject.org" CC: Boris Ostrovsky , Juergen Gross Subject: RE: [PATCH v2] xenbus: advertize control feature flags Thread-Topic: [PATCH v2] xenbus: advertize control feature flags Thread-Index: AQHSIt2ZKm2SPl3eaEOdinMfN3w4DqChV2OAgAAj+uA= Date: Mon, 10 Oct 2016 10:25:50 +0000 Message-ID: <12daa15c63e44e019eb7226567b6b81a@AMSPEX02CL03.citrite.net> References: <1476092625-14616-1-git-send-email-paul.durrant@citrix.com> <74e38f5a-6ec5-f828-e03e-070580706449@citrix.com> In-Reply-To: <74e38f5a-6ec5-f828-e03e-070580706449@citrix.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-DLP: AMS1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1181 Lines: 36 > -----Original Message----- > From: David Vrabel [mailto:david.vrabel@citrix.com] > Sent: 10 October 2016 11:16 > To: Paul Durrant ; linux-kernel@vger.kernel.org; > xen-devel@lists.xenproject.org > Cc: Boris Ostrovsky ; Juergen Gross > > Subject: Re: [PATCH v2] xenbus: advertize control feature flags > > On 10/10/16 10:43, 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. > [...] > > static int setup_shutdown_watcher(void) > > { > > + static struct shutdown_handler *handler; > > int err; > > > > + for (handler = &shutdown_handlers[0]; handler->command; > handler++) { > > + char *node; > > char node[20]; I didn't want to pick arbitrary numbers. I'd prefer to stick with kasprintf(). Paul > > and avoid the allocation and resulting error path. > > As Juergen notes, the 'flag' field isn't used anywhere now. Can you > please test your patches and verify the correct keys are being created? > > David