All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] public/io: xs_wire: Document that new errors should be added at the end
@ 2022-06-30 18:36 Julien Grall
  2022-07-01  2:19 ` Henry Wang
  2022-07-01  5:13 ` Juergen Gross
  0 siblings, 2 replies; 6+ messages in thread
From: Julien Grall @ 2022-06-30 18:36 UTC (permalink / raw)
  To: xen-devel; +Cc: jbeulich, Julien Grall, Juergen Gross

From: Julien Grall <jgrall@amazon.com>

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@amazon.com>

----

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



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: [PATCH v3] public/io: xs_wire: Document that new errors should be added at the end
  2022-06-30 18:36 [PATCH v3] public/io: xs_wire: Document that new errors should be added at the end Julien Grall
@ 2022-07-01  2:19 ` Henry Wang
  2022-07-01  5:12   ` Juergen Gross
  2022-07-01  5:13 ` Juergen Gross
  1 sibling, 1 reply; 6+ messages in thread
From: Henry Wang @ 2022-07-01  2:19 UTC (permalink / raw)
  To: Julien Grall, xen-devel; +Cc: jbeulich, Julien Grall, Juergen Gross

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@amazon.com>
> 
> 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@amazon.com>

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@arm.com>

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
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3] public/io: xs_wire: Document that new errors should be added at the end
  2022-07-01  2:19 ` Henry Wang
@ 2022-07-01  5:12   ` Juergen Gross
  2022-07-01  5:15     ` Henry Wang
  0 siblings, 1 reply; 6+ messages in thread
From: Juergen Gross @ 2022-07-01  5:12 UTC (permalink / raw)
  To: Henry Wang, Julien Grall, xen-devel; +Cc: jbeulich, Julien Grall


[-- Attachment #1.1.1: Type: text/plain, Size: 836 bytes --]

On 01.07.22 04:19, Henry Wang wrote:
> 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@amazon.com>
>>
>> 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@amazon.com>
> 
> 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 :)) )

This documentation is meant for users of Xenstore, not for how to modify
it. I think the comment is all what should be added.


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3] public/io: xs_wire: Document that new errors should be added at the end
  2022-06-30 18:36 [PATCH v3] public/io: xs_wire: Document that new errors should be added at the end Julien Grall
  2022-07-01  2:19 ` Henry Wang
@ 2022-07-01  5:13 ` Juergen Gross
  2022-07-01 17:28   ` Julien Grall
  1 sibling, 1 reply; 6+ messages in thread
From: Juergen Gross @ 2022-07-01  5:13 UTC (permalink / raw)
  To: Julien Grall, xen-devel; +Cc: jbeulich, Julien Grall


[-- Attachment #1.1.1: Type: text/plain, Size: 376 bytes --]

On 30.06.22 20:36, Julien Grall wrote:
> From: Julien Grall <jgrall@amazon.com>
> 
> 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@amazon.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH v3] public/io: xs_wire: Document that new errors should be added at the end
  2022-07-01  5:12   ` Juergen Gross
@ 2022-07-01  5:15     ` Henry Wang
  0 siblings, 0 replies; 6+ messages in thread
From: Henry Wang @ 2022-07-01  5:15 UTC (permalink / raw)
  To: Juergen Gross, xen-devel; +Cc: jbeulich, Julien Grall, Julien Grall

Hi Juergen,

> -----Original Message-----
> On 01.07.22 04:19, Henry Wang wrote:
> > 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@amazon.com>
> >>
> >> 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@amazon.com>
> >
> > 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 :)) )
> 
> This documentation is meant for users of Xenstore, not for how to modify
> it. I think the comment is all what should be added.

Ok sure, thanks for the information. Then I think this patch is perfect.

Kind regards,
Henry

> 
> 
> Juergen

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3] public/io: xs_wire: Document that new errors should be added at the end
  2022-07-01  5:13 ` Juergen Gross
@ 2022-07-01 17:28   ` Julien Grall
  0 siblings, 0 replies; 6+ messages in thread
From: Julien Grall @ 2022-07-01 17:28 UTC (permalink / raw)
  To: Juergen Gross, xen-devel; +Cc: jbeulich, Julien Grall

Hi Juergen,

On 01/07/2022 06:13, Juergen Gross wrote:
> On 30.06.22 20:36, Julien Grall wrote:
>> From: Julien Grall <jgrall@amazon.com>
>>
>> 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@amazon.com>
> 
> Reviewed-by: Juergen Gross <jgross@suse.com>

Thanks! I have committed the patch.

Cheers,

-- 
Julien Grall


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-01 17:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 18:36 [PATCH v3] public/io: xs_wire: Document that new errors should be added at the end Julien Grall
2022-07-01  2:19 ` Henry Wang
2022-07-01  5:12   ` Juergen Gross
2022-07-01  5:15     ` Henry Wang
2022-07-01  5:13 ` Juergen Gross
2022-07-01 17:28   ` Julien Grall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.