|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 1/2] public/io: xs_wire: Document that EINVAL should always be first in xsd_errors
On 27.06.22 17:03, Julien Grall wrote: Hi Juergen, On 27/06/2022 15:50, Juergen Gross wrote:On 27.06.22 16:48, Julien Grall wrote:Hi, On 27/06/2022 15:31, Juergen Gross wrote:On 27.06.22 14:36, Julien Grall wrote: Xenstored is the only instance which needs a translation from value to string, while all other users should need only the opposite direction. The only other candidate would be oxenstored, but that seems not to use xsd_errors[]. And in fact libxenstore will just return a plain EINVAL in case it can't find a translation, while hvmloader will return EIO in that case. With your reasoning and the hvmloader use case you could argue that the EIO entry needs to stay at the same position, too. Therefore, I don't really see how fixing Xenstored would allow us to remove this restriction.The only reason this was spotted is by Jan reviewing C Xenstored. Without that, it would have problably took a long time to noticethis change (I don't think there are many other errno used by Xenstored and xsd_errors). So I think the risk is not worth the effort. I don't see a real risk here, but if there is consensus that the risk should not be taken, then I'd rather add a comment that new entries are only allowed to be added at the end of the array. At least, this is not a patch I would be willing to have my name on (either as a signed-off-by or acked-by). Fair enough. :-) Juergen Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc Attachment:
OpenPGP_signature
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |