1.1 --- a/examples/filesystem.idl Sun Dec 15 19:01:38 2019 +0100
1.2 +++ b/examples/filesystem.idl Mon Dec 16 00:56:57 2019 +0100
1.3 @@ -1,6 +1,8 @@
1.4 -#include <sys/types.h> /* size_t */
1.5 #include <systypes/base.h> /* sys_uid_t, sys_gid_t, sys_mode_t */
1.6
1.7 +/* An interface providing filesystem operations. Note that the open operation is
1.8 + provided by the Opener interface. */
1.9 +
1.10 interface Filesystem
1.11 {
1.12 /* Present a memory region containing the mountpoint path and the filesystem
1.13 @@ -16,9 +18,4 @@
1.14
1.15 [opcode(6)] void getuserfs(in sys_uid_t uid, in sys_gid_t gid,
1.16 in sys_mode_t umask, out cap ref);
1.17 -
1.18 - /* Obtain a file reference. */
1.19 -
1.20 - [opcode(2)] void open(in int flags, in cap ds, in cap irq,
1.21 - out size_t size, out cap file);
1.22 };
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/examples/opener.idl Mon Dec 16 00:56:57 2019 +0100
2.3 @@ -0,0 +1,11 @@
2.4 +#include <sys/types.h> /* size_t */
2.5 +
2.6 +/* An interface providing a way of opening filesystem objects. */
2.7 +
2.8 +interface Opener
2.9 +{
2.10 + /* Obtain a file reference. */
2.11 +
2.12 + [opcode(2)] void open(in int flags, in cap ds, in cap irq,
2.13 + out size_t size, out cap file);
2.14 +};