Re: [RFC PATCH] Adding RTC device (work in progress)

2024-11-22 Thread Zhaoming Luo
On 11/20/24 9:37 PM, Samuel Thibault wrote: Zhaoming Luo, le mer. 20 nov. 2024 20:17:48 +0800, a ecrit: On 11/9/24 10:58 PM, Sergey Bugaev wrote: I know that RTC can be configured to either represent local time, or in UTC. MS Windows prefers the former, GNU/Linux (or rather systemd?) prefers t

Re: [RFC PATCH] Adding RTC device (work in progress)

2024-11-20 Thread Samuel Thibault
Hello, Zhaoming Luo, le mer. 20 nov. 2024 20:17:48 +0800, a ecrit: > On 11/9/24 10:58 PM, Sergey Bugaev wrote: > > I know that RTC can be configured to either represent local time, or > > in UTC. MS Windows prefers the former, GNU/Linux (or rather systemd?) > > prefers the latter [6]. Would it may

Re: [RFC PATCH] Adding RTC device (work in progress)

2024-11-20 Thread Zhaoming Luo
On 11/9/24 10:58 PM, Sergey Bugaev wrote: I know that RTC can be configured to either represent local time, or in UTC. MS Windows prefers the former, GNU/Linux (or rather systemd?) prefers the latter [6]. Would it maybe make sense for the driver to have an --option to *pretend* the RTC stores UTC

Re: [RFC PATCH] Adding RTC device (work in progress)

2024-11-10 Thread jbranso
November 7, 2024 at 7:25 PM, "Zhaoming Luo" mailto:zhaoming1...@qq.com?to=%22Zhaoming%20Luo%22%20%3Czhaoming1357%40qq.com%3E > wrote: > > On 11/7/24 9:42 PM, Sergey Bugaev wrote: > > > > > Was the explanation clear enough / do you have follow-up questions? > > > Yeah it's clear and I haven'

Re: [RFC PATCH] Adding RTC device (work in progress)

2024-11-09 Thread Sergey Bugaev
On Fri, Nov 8, 2024 at 3:26 AM Zhaoming Luo wrote: > The rest of the stuff > is mainly about filling codes into the server-side functions; it may > require some time as I haven't had any experience of writing drivers. Me neither :) But, perhaps the following would be somewhat useful. The osdev w

Re: [RFC PATCH] Adding RTC device (work in progress)

2024-11-07 Thread Zhaoming Luo
On 11/7/24 9:42 PM, Sergey Bugaev wrote: Was the explanation clear enough / do you have follow-up questions? Yeah it's clear and I haven't got any questions. Have you made any progress on the RTC server? I've applied the suggestions from you and Samuel. The rest of the stuff is mainly about

Re: [RFC PATCH] Adding RTC device (work in progress)

2024-11-07 Thread Sergey Bugaev
On Wed, Nov 6, 2024 at 4:28 AM Zhaoming Luo wrote: > I think it's worth to put this part into mig documentation website[0], > just like the IRC log pieces we have already had. What do you think? I > can do it. > > [0]: > https://darnassus.sceen.net/~hurd-web/microkernel/mach/mig/documentation/ Su

Re: [RFC PATCH] Adding RTC device (work in progress)

2024-11-05 Thread Zhaoming Luo
On 11/5/24 9:27 PM, Sergey Bugaev wrote: First, a brief description of what a protid is. Hurd translators typically represent "files" internally with three kinds of distinct structures: 1. node -- these are filesystem nodes, same concept as an "inode". 2. peropen -- this keeps the data "per open

Re: [RFC PATCH] Adding RTC device (work in progress)

2024-11-05 Thread Samuel Thibault
Sergey Bugaev, le mar. 05 nov. 2024 16:27:04 +0300, a ecrit: > On Sun, Nov 3, 2024 at 11:19 AM Zhaoming Luo wrote: > > >> +import "rtc.h"; > > > This would only work when the generated C file is built in the rtc/ of > > > the Hurd source tree, right? Perhaps this should be ? > > It makes sense, an

Re: [RFC PATCH] Adding RTC device (work in progress)

2024-11-05 Thread Sergey Bugaev
On Sun, Nov 3, 2024 at 11:19 AM Zhaoming Luo wrote: > >> +import "rtc.h"; > > This would only work when the generated C file is built in the rtc/ of > > the Hurd source tree, right? Perhaps this should be ? > It makes sense, and I have corrected it. However, then the compilation > will fail with:

Re: [RFC PATCH] Adding RTC device (work in progress)

2024-11-03 Thread Zhaoming Luo
On 11/1/24 8:13 PM, Sergey Bugaev wrote: On Fri, Nov 1, 2024 at 2:46 PM Zhaoming Luo wrote: diff --git a/hurd/pioctl.defs b/hurd/pioctl.defs new file mode 100644 index ..36fa8d3f --- /dev/null +++ b/hurd/pioctl.defs @@ -0,0 +1,34 @@ +/* Definitions for /dev/rtc ioctls */ + +/* Ioctl gro

Re: [RFC PATCH] Adding RTC device (work in progress)

2024-11-01 Thread Samuel Thibault
Sergey Bugaev, le ven. 01 nov. 2024 15:13:26 +0300, a ecrit: > On Fri, Nov 1, 2024 at 2:46 PM Zhaoming Luo wrote: > > diff --git a/hurd/pioctl.defs b/hurd/pioctl.defs > > new file mode 100644 > > index ..36fa8d3f > > --- /dev/null > > +++ b/hurd/pioctl.defs > > @@ -0,0 +1,34 @@ > > +/* Def

Re: [RFC PATCH] Adding RTC device (work in progress)

2024-11-01 Thread Sergey Bugaev
On Fri, Nov 1, 2024 at 2:46 PM Zhaoming Luo wrote: > diff --git a/hurd/pioctl.defs b/hurd/pioctl.defs > new file mode 100644 > index ..36fa8d3f > --- /dev/null > +++ b/hurd/pioctl.defs > @@ -0,0 +1,34 @@ > +/* Definitions for /dev/rtc ioctls */ > + > +/* Ioctl group 'p'; the subsystem is d

Re: [RFC PATCH] Adding RTC device (work in progress)

2024-11-01 Thread Samuel Thibault
Hello, This looks good overall. It is missing the copyright/licence headers at the top of the files, though. Samuel Zhaoming Luo, le ven. 01 nov. 2024 19:44:05 +0800, a ecrit: > Hi, > > Currently I am working on adding /dev/rtc. For now I can compile it and > use `settrans` to create a device f