]> xenbits.xensource.com Git - xen.git/commitdiff
public/io: xs_wire: Document that new errors should be added at the end
authorJulien Grall <jgrall@amazon.com>
Fri, 1 Jul 2022 17:27:05 +0000 (18:27 +0100)
committerJulien Grall <jgrall@amazon.com>
Fri, 1 Jul 2022 17:27:30 +0000 (18:27 +0100)
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: Henry Wang <Henry.Wang@arm.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
xen/include/public/io/xs_wire.h

index b477bd0cd287f1efa2eda958cff7dcabbeb29ff2..c573950fbf93a89237f4d19e0ba4dd4696e5eddf 100644 (file)
@@ -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),