|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v8 2/2] xenpm: Add get-core-temp subcommand
On Tue, Mar 03, 2026 at 12:54:28PM +0100, Jan Beulich wrote:
> On 03.03.2026 11:50, Teddy Astie wrote:
> > Le 02/03/2026 à 17:52, Jan Beulich a écrit :
> >> On 27.02.2026 18:00, Teddy Astie wrote:
> >>> + printf("No data\n");
> >>> + exit(ENODATA);
> >>
> >> In how far is using errno values as arguments to exit() a useful thing? (I
> >> think you had it like this before, and I merely forgot to ask.) Yes, I can
> >> see the tool using a number of exit(EINVAL), but I don't understand those
> >> either. This way you can't even document easily what particular exit codes
> >> mean, as the errno values may vary across OSes.
> >>
> >
> > I reused the exit(...) pattern used in xenpm, but I'm also fine by
> > returning simpler errors (like exit(1) or exit(EXIT_FAILURE)).
>
> Anthony, can you please suggest which one better fits the toolstack as a
> whole?
There isn't really one, but `exit(EXIT_FAILURE)` would be more
explicit.
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |