Hi Jan, > On 7 Sep 2022, at 10:14, Jan Beulich <[email protected]> wrote: > > On 07.09.2022 10:58, Bertrand Marquis wrote: >>> On 7 Sep 2022, at 09:55, Julien Grall <[email protected]> wrote: >>> On 07/09/2022 09:53, Bertrand Marquis wrote: >>>>>> Otherwise if we start adding those kinds of checks, we will have to add >>>>>> them in at least 3 places in xen code. >>>>> >>>>> The solution I proposed above is easy to implement right now. My gut >>>>> feeling is tweaking __stringify (or else) will take a bit more time. >>>>> >>>>> If you (or Leo) can come up with a solution quickly then fine. Otherwise, >>>>> I think we still want some hardening for backporting purpose. >>>> I think a define in compile.h using stringify is the easiest solution: >>> >>> Ah! I thought you were suggesting to tweak __stringify. This is ... >> >> Also possible but a bit more tricky >> >>>> #define XEN_STR_VERSION >>>> "__stringify(XEN_VERSION)"."__stringify(XEN_SUBVERSION)” >> >> Quotes at beginning and end should not be there. > > I have to admit that I dislike the STR infix. I'd prefer a suffixed variant > (e.g. XEN_VERSION_STRING) or one omitting "string" altogether, e.g. > XEN_FULL_VERSION (albeit I see "full" as being potentially ambiguous here, > since one might expect that to include XEN_EXTRAVERSION as well then).
Version is a value so here I though it made sense to distinguish that one as it is a string representation of it. XEN_VERSION_STRING is ok I think. I generally dislike anything named FULL, EXTRA, BASE or other which are just unclear. Bertrand > > Jan
