From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Anthony PERARD <anthony.perard@vates.tech>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH] tools/xenpm: fix FreeBSD build
Date: Tue, 21 Apr 2026 17:51:35 +0200 [thread overview]
Message-ID: <aeedB31aEBJb2Pa8@macbook.local> (raw)
In-Reply-To: <2204fbae-be5b-4f56-ad2a-cd5692db81cb@suse.com>
On Tue, Apr 21, 2026 at 05:35:57PM +0200, Jan Beulich wrote:
> On 21.04.2026 17:32, Roger Pau Monne wrote:
> > ENODATA is not defined on FreeBSD:
> >
> > xenpm.c:1380:17: error: use of undeclared identifier 'ENODATA'
> > 1380 | errno = ENODATA;
> > | ^
> > 1 error generated.
> >
> > Fixes: edb657887a60 ("xenpm: Add get-core-temp subcommand")
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > ---
> > tools/misc/xenpm.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/misc/xenpm.c b/tools/misc/xenpm.c
> > index 87107bd6c617..ecb39c911d84 100644
> > --- a/tools/misc/xenpm.c
> > +++ b/tools/misc/xenpm.c
> > @@ -1377,7 +1377,7 @@ static int fetch_dts_temp(xc_interface *xch, uint32_t cpu, bool package, int *te
> > {
> > case 0:
> > /* This CPU isn't online or can't query this MSR */
> > - errno = ENODATA;
> > + errno = ENODEV;
> > return -1;
>
> "No such device", however, isn't quite what we want to convey here. If no
> better error code can be found that's available on FreeBSD and Linux, I'm
> inclined to suggest that we stick to ENODATA where available.
Seems like a lot of complexity, for very limited usefulness. The only
usage of errno is to be printed in the error message, and for the
purposes of this function ENODEV is already unique in the function, as
ENODATA was.
FWIW, I think ENODEV is not that far fetched: the CPU being offline
or the MSR not being present seems like what you would convey by using
ENODEV.
Thanks, Roger.
next prev parent reply other threads:[~2026-04-21 15:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-21 15:32 [PATCH] tools/xenpm: fix FreeBSD build Roger Pau Monne
2026-04-21 15:34 ` Andrew Cooper
2026-04-21 15:35 ` Jan Beulich
2026-04-21 15:51 ` Roger Pau Monné [this message]
2026-04-22 7:15 ` Jan Beulich
2026-04-22 9:16 ` Roger Pau Monné
2026-04-22 11:27 ` Anthony PERARD
2026-04-21 15:58 ` Teddy Astie
2026-04-21 16:00 ` Roger Pau Monné
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=aeedB31aEBJb2Pa8@macbook.local \
--to=roger.pau@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=jbeulich@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.