Re: Using tm_t in a defs file

2024-10-28 Thread Sergey Bugaev
On Mon, Oct 28, 2024 at 9:35 AM Zhaoming Luo wrote: > I see, so _IOR is a wrapper of _IOC for calculating an ioctl number. > This ioctl number is used for invoking the routine in the rtc server. We > need to define _IOT_rtc_time because calculating RTC_RD_TIME requires > the ioctl number of rtc, _

Re: Using tm_t in a defs file

2024-10-27 Thread Zhaoming Luo
On 10/28/24 2:36 AM, Sergey Bugaev wrote: But the important point is that on the client side, glibc doesn't use the generated C function to invoke the routine, and instead does things based on the ioctl number, so it's crucial that the definition of RTC_RD_TIME constant matches the signature of t

Re: Using tm_t in a defs file

2024-10-27 Thread Samuel Thibault
Sergey Bugaev, le dim. 27 oct. 2024 21:36:11 +0300, a ecrit: > You'll also have to > define _IOT_rtc_time in a C header (rtc.h) next to the struct rtc_time > definition, using the _IOT macro. Yes, definitely. Since struct rtc_time is merely 9 ints, that will be easy. > 2. just require the caller

Re: Using tm_t in a defs file

2024-10-27 Thread Sergey Bugaev
On Sun, Oct 27, 2024 at 3:02 PM Zhaoming Luo wrote: > I didn't develop it in-tree because I haven't figure out how to write a > Makefile for an in-tree server. I haven't found a reference or document > for me to learn writing it. Any recommendations? Maybe I should write > one based on the Makefil

Re: Using tm_t in a defs file

2024-10-27 Thread Zhaoming Luo
On 10/27/24 6:08 PM, Sergey Bugaev wrote: Sure, that makes sense. And it's a great property of the Hurd that you can in fact develop out-of-tree translators with ease. Though in the case of rtc, we'd probably want it in-tree eventually. I didn't develop it in-tree because I haven't figure out how

Re: Using tm_t in a defs file

2024-10-27 Thread Sergey Bugaev
On Sun, Oct 27, 2024 at 11:46 AM Zhaoming Luo wrote: > Hi, Hi Zhaoming, > I did the following things in a Debian/Hurd virtual machine. > > I was following this link > > to implement a rtc server. My idea is that I should im

Using tm_t in a defs file

2024-10-27 Thread Zhaoming Luo
Hi, I did the following things in a Debian/Hurd virtual machine. I was following this link to implement a rtc server. My idea is that I should implement a working rtc server in user space before adding the source code in