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

[xen staging] public/io: xs_wire: Document that new errors should be added at the end



commit bf2f989531ad3851685a1847cbc1e28901ed80a2
Author:     Julien Grall <jgrall@xxxxxxxxxx>
AuthorDate: Fri Jul 1 18:27:05 2022 +0100
Commit:     Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Fri Jul 1 18:27:30 2022 +0100

    public/io: xs_wire: Document that new errors should be added at the end
    
    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>
    Reviewed-by: Henry Wang <Henry.Wang@xxxxxxx>
    Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
---
 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 b477bd0cd2..c573950fbf 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),
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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