Re: [chrony-dev] [PATCH v2] rtc (linux): Help the user diagnose a problem with RTC UIE ioctl requests

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Sat, Dec 12, 2020 at 07:56:00PM -0000, Michael Witten wrote:
> The function switch_interrupts() does indeed currently log an error
> message when an error is detected; however, an error could occur
> when enabling or disabling interrupts, so this updated patch still
> produces a consolidated error message:
>
>   "Interrupts not supported by RTC device /path/to/rtc"

You mean switch_interrupts() could succeed on start, but fail later?
How could that happen?

Anyway, I suspect there might be other reasons for the ioctl to fail,
e.g. a seccomp filter in some container, so to me it seems wrong to
interpret that error message in the code, especially without checking
the errno value. I'd just leave it as it is.

> 
> A new FAQ entry has been added for that particular error message.

If you described in the FAQ the original error, it would apply to
chrony-4.0 and not just future versions.

> +failure:
> +  LOG(LOGS_WARN, "The RTC driver could not be initialised");
> +  return 0;

Please move this message to the caller in rtc.c and remove the "The".

Also, please make the commit subject shorter.

Thanks,

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/