bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hwclock: Support GNU Hurd


From: Karel Zak
Subject: Re: [PATCH] hwclock: Support GNU Hurd
Date: Mon, 9 Dec 2024 11:59:54 +0100

On Mon, Dec 09, 2024 at 11:36:22AM GMT, Samuel Thibault wrote:
> Karel Zak, le lun. 09 déc. 2024 11:32:33 +0100, a ecrit:
> > On Mon, Dec 09, 2024 at 10:58:15AM GMT, Zhaoming Luo wrote:
> > >   if (ctl->rtc_dev_name) {
> > >           rtc_dev_name = ctl->rtc_dev_name;
> > > -         rtc_dev_fd = open(rtc_dev_name, O_RDONLY);
> > > +         rtc_dev_fd = open(rtc_dev_name, O_RDWR);
> > 
> > Why do you need O_RDWR on HURD?
> 
> For setting the time, it makes sense to request WR?
> 
> > Maybe it would be better to add an
> > #ifdef, as it is unnecessary for Linux.
> 
> I have to say I'm surprised that Linux doesn't require it for setting
> the time.

It requires CAP_SYS_TIME. I assume that in this case, the RTC file
descriptor is simply a handler used to communicate with the RTC
driver. There are also more RTC_* set/get ioctls available, such as
alarm and interrupts.

    Karel


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]