Zhaoming Luo, le mar. 03 déc. 2024 06:42:07 +0800, a ecrit: > On 12/2/24 10:12 AM, Samuel Thibault wrote: > > Hello, > Hi, > > Zhaoming Luo, le lun. 02 déc. 2024 10:06:48 +0800, a ecrit: > > > > > +static void close_rtc(void) > > > +{ > > [...] > > > +} > > > + > > > +static int open_rtc(const struct hwclock_control *ctl) > > > +{ > > [...] > > > +} > > > + > > > > > +static int open_rtc_or_exit(const struct hwclock_control *ctl) > > > +{ > > [...] > > > +} > > > + > > > +static int do_rtc_read_ioctl(int rtc_fd, struct tm *tm) > > > +{ > > [...] > > > +} > > > + > > > +static int read_hardware_clock_rtc(const struct hwclock_control *ctl, > > > + struct tm *tm) > > > +{ > > [...] > > > +} > > > + > > > +/* > > > + * Set the Hardware Clock to the broken down time <new_broken_time>. Use > > > + * ioctls to "rtc" device /dev/rtc. > > > + */ > > > +static int set_hardware_clock_rtc(const struct hwclock_control *ctl, > > > + const struct tm *new_broken_time) > > > +{ > > [...] > > > +} > > > > Please factorize these with the linux port, by putting them into a > > shared file that is linked-in in both ports cases. > Do you mean having the following structure? > /----- hurd-hwlock-rtc.c \ > hwclock.c hwclock-rtc.c > \----- linux-hwlock-rtc.c / > > hwclock-rtc.c contains close_rtc, open_rtc, etc.
Yes. Samuel