All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: xen-devel@lists.xenproject.org
Cc: jbeulich@suse.com, Julien Grall <jgrall@amazon.com>,
	Juergen Gross <jgross@suse.com>
Subject: [PATCH v2 1/2] public/io: xs_wire: Document that EINVAL should always be first in xsd_errors
Date: Mon, 27 Jun 2022 13:36:34 +0100	[thread overview]
Message-ID: <20220627123635.3416-2-julien@xen.org> (raw)
In-Reply-To: <20220627123635.3416-1-julien@xen.org>

From: Julien Grall <jgrall@amazon.com>

Some tools (e.g. xenstored) always expect EINVAL to be first in xsd_errors.

Document it so, one doesn't add a new entry before hand by mistake.

Signed-off-by: Julien Grall <jgrall@amazon.com>

----

I have tried to add a BUILD_BUG_ON() but GCC complained that the value
was not a constant. I couldn't figure out a way to make GCC happy.

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..dd4c9c9b972d 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
     = {
+    /* /!\ Some users (e.g. xenstored) expect EINVAL to be the first entry. */
     XSD_ERROR(EINVAL),
     XSD_ERROR(EACCES),
     XSD_ERROR(EEXIST),
-- 
2.32.0



  reply	other threads:[~2022-06-27 12:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 12:36 [PATCH v2 0/2] public/io: xs_wire: Allow Xenstore to report EPERM Julien Grall
2022-06-27 12:36 ` Julien Grall [this message]
2022-06-27 14:31   ` [PATCH v2 1/2] public/io: xs_wire: Document that EINVAL should always be first in xsd_errors Juergen Gross
2022-06-27 14:48     ` Julien Grall
2022-06-27 14:50       ` Juergen Gross
2022-06-27 15:03         ` Julien Grall
2022-06-27 15:13           ` Juergen Gross
2022-06-28 21:39             ` Julien Grall
2022-06-27 12:36 ` [PATCH v2 2/2] public/io: xs_wire: Allow Xenstore to report EPERM Julien Grall
2022-06-27 14:52   ` Juergen Gross
2022-06-30 18:38     ` Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220627123635.3416-2-julien@xen.org \
    --to=julien@xen.org \
    --cc=jbeulich@suse.com \
    --cc=jgrall@amazon.com \
    --cc=jgross@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.