From: Alex Bligh Subject: Re: [PATCH] libxl_json: Fix backport of JSON_BOOL to 4.2.2 Date: Sat, 06 Jul 2013 14:19:05 +0100 Message-ID: <338B4EF5B8FBF90AAA293C13@nimrod.local> References: <1373037105-1574-1-git-send-email-dslutz@verizon.com> Reply-To: Alex Bligh Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1373037105-1574-1-git-send-email-dslutz@verizon.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org, anthony.perard@citrix.com, ian.campbell@citrix.com, jbeulich@suse.com, Ian.Jackson@eu.citrix.com Cc: Alex Bligh , Don Slutz List-Id: xen-devel@lists.xenproject.org Looks like I made an error backporting here, which is odd as I thought this applied directly. I've checked the original hg patches I was working from and there's no obvious reason for the difference. Sorry. Whilst Don's fix is right in that obj->u.b should be set, I note that 4.3 does not check the error return from libxl__json_object_alloc whereas 4.2 does. Given libxl__json_object_alloc itself may SEGV if libxl__zalloc fails, this should not matter. Acked-By from me below. Alex --On 5 July 2013 11:11:45 -0400 Don Slutz wrote: > Commit 2b3072ed0cbeed8c0385f20e92ba0f1201db8a17 has the setting of > obj->u.b Commit 6a2aca9fdef0499e613715baf107f2296b9007cf does not. > > This shows up by vnc-port and vnc-listen are missing in xenstore when > they should not be. > > Signed-off-by: Don Slutz Acked-By: Alex Bligh > --- > tools/libxl/libxl_json.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/tools/libxl/libxl_json.c b/tools/libxl/libxl_json.c > index 72b52e8..0810630 100644 > --- a/tools/libxl/libxl_json.c > +++ b/tools/libxl/libxl_json.c > @@ -474,6 +474,7 @@ static int json_callback_boolean(void *opaque, int > boolean) > if ((obj = libxl__json_object_alloc(ctx->gc, JSON_BOOL)) == NULL) > return 0; > + obj->u.b = boolean; > > if (libxl__json_object_append_to(ctx->gc, obj, ctx->current) == -1) { > libxl__json_object_free(ctx->gc, obj); > -- > 1.7.1 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel > > -- Alex Bligh