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

RE: [PATCH v3] public/io: xs_wire: Document that new errors should be added at the end


  • To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Fri, 1 Jul 2022 02:19:19 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=O8leDshB0WObPEc5klG/W1tDeKdRnxiYzvuy7rcoviw=; b=iNpnYkwYzxM8me46qbPaW36X6nfhcQauM+JZ5QikQfm0lmoENtS5YGZhguCvSkDWWAvr6b5Of2mUafQJKrkopyyP1bfcnjPTok4k6+hh+oO6aayKY5EJpMzkNpqts/87HIQnz1zoMqbFnT3BXOKC0EgrCByW4chQx4VUJ6hs5bTwsmCXfHfoSJ3d5xJScGWhY4HqW3zyHhpGNvEhvEEAE/sabDnSWQPRzWVR63KLhsDe2seivYWtqiYPxEca0sHp2NdF0P/MKxtv1PX+15dkf9+UKd+GtZe9+GLcAAks+AUzTJYDH0O7z1bsiwlawwRD8cf1lB/jyDXL0VnQiHf98Q==
  • 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=O8leDshB0WObPEc5klG/W1tDeKdRnxiYzvuy7rcoviw=; b=cRXzWtP+2GsSuqAMe+7OZn0dWdxy1BujhOovKisroR7n+r3F8bZJcTO9gtJEMyNcDltQxwK2kb3iTr5Amo8pqmTYVDuEP3KDOQemgiYoMQIADmMNNf+3QD9LKSlGZdztvBSu9lCU1RoFqd9W/mRv+4K89q3YN8tmSiWSUfHdIdRhsvO1sBaVOioUhvJviq3IRE4mlx87J3kCSwF5BjVGWUf00pYCGYxbdoUg6QRydsfDCCUQCr+3zZYajapBAaeDyFoIX6iGuTFbCDduotpB+7gxXfEvoBnV64nypbB8WnlNcabeXum4R8UD7rIqIh0KMk1OCoPRLqG5N4vCzsCWxQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=JeOU6DH+phyr2NRTxpm3CCvkVB4G9UmUGVsb/7pazRP4u+CarzbeRiJTkoGEYjnpZSO4eFpaNsXYAEtPAK7AjvlmTU/aJuyzTQidoK9ptkGWVRxIJhcCaZlyKo98rlWBbdl6NjVPRYyLLrAlpHa55lQMFrFIrs27P3TmrEPrhDqSlzXnOgKKAng4UtT2IT9TiwWjz+ELBWUTigHaoi8Lv/ajQSqwyCEZ2mhTw8zPFt5xVpgevj13gRubnqFwJl2IiWREdSlx4TCVVoUM4XIALY/lcJcPIc/B7V7t/Wj0+Gtx1WrjNdT2ZvXxOCdJJDZks/sD030VzpWAqdgxRxQzrQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gRANAfrtm1Xb5RMwtj4M0wTxEsA+Nt7KOwNG+0ivI8MdgKkDkZhsdcU42rYKeR92gNNledDXcf6oWKbCxq7v7luVBXFdMiTemtKm1XDE0XqSnye1/uoCnxDvdZ3nCC1fMlctiQ4vPzMM0vRMvSlEOKFLnfoQQVh4s/Cai94AMOPGxHbly/KTuPGoRZCZvXP9SRaYTXq45ztAgsQ29HbddbNaq6pzyxsYPp03ElBfHauUXrNwIsXswibOW++YgI+ztpM5po5yNtI5MsEoTSROHYIZKp1A9SnBhZDnwtwq+F/2BEAq1vIn6bDdQF1q+LLOWm6GNK4GV3KgyfCD+WEnvw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Fri, 01 Jul 2022 02:19:55 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYjLCT8ll1pspHXU2Irp2zQF5YmK1ox2KQ
  • Thread-topic: [PATCH v3] public/io: xs_wire: Document that new errors should be added at the end

Hi Julien,

> -----Original Message-----
> Subject: [PATCH v3] public/io: xs_wire: Document that new errors should be
> added at the end
> 
> From: Julien Grall <jgrall@xxxxxxxxxx>
> 
> Some tools (e.g. xenstored) always expect EINVAL to be first in xsd_errors.
> 
> To be conservative, mandate that new errors should be added at the end
> of the array.
> 
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>

While the change is looking good, just FYI there is an "ERROR" section in
/xen/docs/misc/xenstore.txt that points to the io/xs_wire.h. You may
want to add something there (that depends on your own taste :)) )

With or without above additional documentation:
Reviewed-by: Henry Wang <Henry.Wang@xxxxxxx>

Kind regards,
Henry

> 
> ----
> 
> Changes in v3:
>     - Mandate that new errors should be added at the end.
> 
> Changes in v2:
>     - New patch
> ---
>  xen/include/public/io/xs_wire.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/xen/include/public/io/xs_wire.h
> b/xen/include/public/io/xs_wire.h
> index c1ec7c73e3b1..a4d954cb05aa 100644
> --- a/xen/include/public/io/xs_wire.h
> +++ b/xen/include/public/io/xs_wire.h
> @@ -76,6 +76,7 @@ static struct xsd_errors xsd_errors[]
>  __attribute__((unused))
>  #endif
>      = {
> +    /* /!\ New errors should be added at the end of the array. */
>      XSD_ERROR(EINVAL),
>      XSD_ERROR(EACCES),
>      XSD_ERROR(EEXIST),
> --
> 2.32.0
> 




 


Rackspace

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