On 11/1/24 8:13 PM, Sergey Bugaev wrote:
On Fri, Nov 1, 2024 at 2:46 PM Zhaoming Luo <zhaoming1...@qq.com> wrote:
diff --git a/hurd/pioctl.defs b/hurd/pioctl.defs
new file mode 100644
index 00000000..36fa8d3f
--- /dev/null
+++ b/hurd/pioctl.defs
@@ -0,0 +1,34 @@
+/* Definitions for /dev/rtc ioctls */
+
+/* Ioctl group 'p'; the subsystem is derived from calculations in
+ hurd/ioctls.defs. */
+subsystem pioctl 140000;
+
+#include <hurd/ioctl_types.defs>
+
+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 <hurd/rtc/rtc.h>?
It makes sense, and I have corrected it. However, then the compilation
will fail with:
```
make[2]: *** No rule to make target 'hurd/rtc/rtc.h', needed by
'main.o'. Stop.
```
If I want to fix it. Do I need to modify $(hurd)/rtc/Makefile or add
hurd/rtc/rtc.h into hurd-dev package?
diff --git a/rtc/mig-mutate.h b/rtc/mig-mutate.h
new file mode 100644
index 00000000..e69de29b
You'd want to put something like the following into this file:
#define IO_INTRAN trivfs_protid_t trivfs_begin_using_protid (io_t)
#define IO_INTRAN_PAYLOAD trivfs_protid_t trivfs_begin_using_protid_payload
#define IO_DESTRUCTOR trivfs_end_using_protid (trivfs_protid_t)
#define IO_IMPORTS import "libtrivfs/mig-decls.h";
...and change 'io_t reqport' arguments in pioctl-ops.c to 'struct
trivfs_protid *cred'.
I just know that this is the process of transforming the parameter type
so we can have different parameter types on server side and user side.
Is there some document explaining how to write a mig-mutate.h file? I
haven't found one.
The feedback is very valuable, thank you.
--
Zhaoming Luo