[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RESEND PATCH 11/12] golang/xenlight: do not negate ret when converting to Error


  • To: Nick Rosbrook <rosbrookn@xxxxxxxxx>
  • From: George Dunlap <George.Dunlap@xxxxxxxxxx>
  • Date: Fri, 18 Jun 2021 15:13:03 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zL7N5KFhmFYYv0XI5Kv9FvWQfJWS92wFtadgO96hjps=; b=CNxs2JCkknQJSKDQjLRbZiu+DY0izHAXwmPlyOITWsXNUbS7C9uotKBdEk7h+I3GXIhFp0NsPsRzTVF9/blHoCVwnNoCqkWKPeHiFRVuihY4ie0QTdSs/og5VdRKkL7cCypEt5Zznunj2L3WkeBk8QJrWSkGTH5/PepnB98KBT7gCIydKYWBmUtjjRETex9s5A4iiG26uMFRPXCx1tQt3AGVymavsrnngkMRnJw58lbmrSlHjPIvyiNJcGZBNGUvqRt4rVyUQH9NY0dxh/Nf4xLAceYZ0+GOdr0pIHhsm1eHnXYiUYqK/g7C5a7RbwzusAv3dNWd8xs8FqIT68kHfg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VjHCnrJ0EN14y2xFlE3N4ejP4NPg1rFETrmh/39qXmFlicCWm431AtVpt85IW9YwxCOJdR806H+qPlZy+VdylB8FcrIciTbOEZA8l2rAy8oKSXueIkXgHDc2sruRh0aRqkPYNBh6VJkIyCd7w40CWNdw7LaZD37aYWMyYDQukMKjcNj4Nl63SIxi12QiJ0tB3V95fqhzFGRaAlnHWOKOUQDDqSUthbyZMZocxfUyfD/PDAM3IPbO0brDOez40R0erFfRy+YUK2BfvhDMgcNkOOXZOeuFe72A6yWuGvqTzNkGrJQIBLg8PImD6Zo7uQiA/fMhA6tgHQY6DTzLBpIk0A==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Nick Rosbrook <rosbrookn@xxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Fri, 18 Jun 2021 15:13:20 +0000
  • Ironport-hdrordr: A9a23:bfAx/KyNx9T02tmBW3OiKrPxkuskLtp133Aq2lEZdPULSKOlfp GV8MjziyWYtN9IYgBcpTiBUJPwJE81bfZOkMgs1MSZLXXbUQyTXcFfBOrZsnPd8kjFmNK1up 0QCpSWZOeAbmSSyPyKmjVQcOxQg+VvkprY/ds2pk0FJWoBCsFdBkVCe32m+yVNNVR77PECZf 6hD7981lydkAMsH6OG7xc+Lor+juyOsKijTQ8NBhYh5gXLpyiv8qTGHx+R2Qpbey9TwJ85mF K10TDR1+GGibWW2xXc32jc49B9g9360OZOA8SKl4w8NijssAC1f45sMofy+Qzd4dvfrGrCou O85SvIDP4Dsk85uVvF+ScF7jOQlwrGLUWSkmNwz0GT+/ARDwhKdPapzbgpDCcxrXBQ4O2UmZ g7r16xpt5ZCwjNkz/64MWNXxZ2llCsqX5niuILiWdDOLFuIoO4PeQkjTJo+bo7bWrHAbocYa JT5QDnlYFrWELfa2qcsnhkwdSqUHh2FhCaQlIassjQ1zRNhnh2w0YR2cRaxx47hd4AYogB4/ 6BPrVjlblIQMNTZaVhBP0ZSc/yDmDWWxrDPG+bPFyiHqAaPHDGrYLx/dwOlayXkVwzvdIPcb H6IRxlXEIJCjfT4Py1ret2G0r2MReAtBzWu7VjDrZCy87BeIY=
  • Ironport-sdr: yxLrxzVWBPX5BrauzYGrM3EzmamD8m0d8ockMkQXm5seTqgSbYGl8ULGi8j6lY9ckZIXJiDO5u EHdWhI55tuulrQCX/QPFoJ2wRBpf57I0cB3ekMLCC/U0Xx4lzU0IMQxyo613PzDFtWobFbD2s+ I6lcT1bNlpfmabtpBlhfibGZby3CCcKgKJbVp3/YM8snEuXrBkH6dYhZMDQIYnqqHgYPZfO0FX V28H1/IXDZeWZYafJKXluyATneP+QcAFCJmKO959f3K9qR0TlPgPy/EgFA/LTjjtWYSPokawUR pH0=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHXUNy0cb4zmhfPmk6oj5nz8SWtlasaByMA
  • Thread-topic: [RESEND PATCH 11/12] golang/xenlight: do not negate ret when converting to Error


> On May 24, 2021, at 9:36 PM, Nick Rosbrook <rosbrookn@xxxxxxxxx> wrote:
> 
> There are several locations where the return code from calling into C is
> negated when being converted to Error. This results in error strings
> like "libxl error: <x>", rather than the correct message. Fix all
> occurrances of this by running:
> 
>  gofmt -w -r 'Error(-ret) -> Error(ret)' xenlight.go
> 
> from tools/golang/xenlight.
> 
> Signed-off-by: Nick Rosbrook <rosbrookn@xxxxxxxxxxxx>

Erk.  I’d be tempted to say something more like:

"Commit 871e51d2d4 changed the sign on the xenlight error types (making the 
values negative, same as the C-generated constants), but failed to remove the 
code changing the sign before casting to Error().  This results in…”

I can edit this on check-in if you’re OK with it.  Either way:

Acked-by: George Dunlap <george.dunlap@xxxxxxxxxx>


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.