diff --git a/hurd/fs.defs b/hurd/fs.defs
index 52d83bd..cb7abe5 100644
--- a/hurd/fs.defs
+++ b/hurd/fs.defs
@@ -352,3 +352,24 @@ routine file_reparent (
RPT
parent: mach_port_t;
out new_file: mach_port_send_t);
+
+/* XXX: update description */
+/* Return any active translators bound to nodes of the receiving
+ filesystem. CHILDREN is an argz vector containing file names
+ relative to the root of the receiving translator. */
+routine file_get_children (
+ file: file_t;
+ RPT
+ out children: data_t);
+
+/* XXX: update description */
+/* Return information about the source of the receiving filesystem.
+ If the concept of a source is applicable, SOURCE should refer to
+ the source of the receiving translator and should be a description
+ considered appropriate in the context of the translator. For
+ example for the case of block device based filesystems, SOURCE
+ should be the file name of the underlying block device. */
+routine file_get_source (
+ file: file_t;
+ RPT
+ out source: string_t);
diff --git a/hurd/fsys.defs b/hurd/fsys.defs
index 7f99f7f..b36b944 100644
--- a/hurd/fsys.defs
+++ b/hurd/fsys.defs
@@ -128,21 +128,5 @@ routine fsys_get_options (
RPT
out options: data_t, dealloc);
-/* Return any active translators bound to nodes of the receiving
- filesystem. CHILDREN is an argz vector containing file names
- relative to the root of the receiving translator. */
-routine fsys_get_children (
- server: fsys_t;
- RPT
- out children: data_t);
-
-/* Return information about the source of the receiving filesystem.
- If the concept of a source is applicable, SOURCE should refer to
- the source of the receiving translator and should be a description
- considered appropriate in the context of the translator. For
- example for the case of block device based filesystems, SOURCE
- should be the file name of the underlying block device. */
-routine fsys_get_source (
- server: fsys_t;
- RPT
- out source: string_t);
+skip; /* Was fsys_get_children */
+skip; /* Was fsys_get_source */
diff --git a/libdiskfs/Makefile b/libdiskfs/Makefile
index 03c2e2b..aeebe4e 100644
--- a/libdiskfs/Makefile
+++ b/libdiskfs/Makefile
@@ -35,7 +35,7 @@ IOSRCS= io-async-icky.c io-async.c io-duplicate.c io-get-conch.c io-revoke.c \
io-select.c io-stat.c io-stubs.c io-write.c io-version.c io-sigio.c
FSYSSRCS=fsys-getroot.c fsys-goaway.c fsys-startup.c fsys-getfile.c \
fsys-options.c fsys-syncfs.c fsys-forward.c \
- fsys-get-children.c fsys-get-source.c
+ file-get-children.c file-get-source.c
IFSOCKSRCS=ifsock.c
OTHERSRCS = conch-fetch.c conch-set.c dir-clear.c dir-init.c dir-renamed.c \
extern-inline.c \
diff --git a/libdiskfs/file-get-children.c b/libdiskfs/file-get-children.c
new file mode 100644
index 0000000..4581e4e
--- /dev/null
+++ b/libdiskfs/file-get-children.c
@@ -0,0 +1,95 @@
+/* file_get_children
+
+ Copyright (C) 2013 Free Software Foundation, Inc.
+
+ Written by Justus Winter <4winter@informatik.uni-hamburg.de>
+
+ This file is part of the GNU Hurd.
+
+ The GNU Hurd is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ The GNU Hurd is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with the GNU Hurd. If not, see . */
+
+#include "priv.h"
+#include "fs_S.h"
+
+#include
+
+/* Return any active translators bound to nodes of the receiving
+ filesystem. CHILDREN is an argz vector containing file names
+ relative to the root of the receiving translator. */
+error_t
+diskfs_S_file_get_children (struct protid *cred,
+ char **children,
+ mach_msg_type_number_t *children_len)
+{
+ error_t err;
+ if (! cred
+ || cred->pi.bucket != diskfs_port_bucket
+ || cred->pi.class != diskfs_protid_class)
+ return EOPNOTSUPP;
+
+ /* check_access performs the same permission check as is normally
+ done, i.e. it checks that all but the last path components are
+ executable by the requesting user and that the last component is
+ readable. */
+ error_t check_access (const char *path)
+ {
+ error_t err;
+ char *elements = NULL;
+ size_t elements_len = 0;
+
+ err = argz_create_sep (path, '/', &elements, &elements_len);
+ if (err)
+ return err;
+
+ struct node *dp = diskfs_root_node;
+
+ for (char *entry = elements;
+ entry;
+ entry = argz_next (elements, elements_len, entry))
+ {
+ struct node *next;
+ err = diskfs_lookup (dp, entry, LOOKUP, &next, NULL, cred);
+
+ if (dp != diskfs_root_node)
+ diskfs_nput (dp);
+
+ if (err)
+ return err;
+
+ dp = next;
+ }
+
+ err = fshelp_access (&dp->dn_stat, S_IRUSR, cred->user);
+ diskfs_nput (dp);
+ return err;
+ }
+
+
+ char *c = NULL;
+ size_t c_len = 0;
+
+ err = fshelp_get_active_translators (&c, &c_len, check_access);
+ if (err)
+ goto errout;
+
+ err = iohelp_return_malloced_buffer (c, c_len, children, children_len);
+ if (err)
+ goto errout;
+
+ c = NULL; /* c was freed by iohelp_return_malloced_buffer. */
+
+ errout:
+ free (c);
+ return err;
+}
diff --git a/libdiskfs/file-get-source.c b/libdiskfs/file-get-source.c
new file mode 100644
index 0000000..4fbb445
--- /dev/null
+++ b/libdiskfs/file-get-source.c
@@ -0,0 +1,37 @@
+/* file_get_source
+
+ Copyright (C) 2013 Free Software Foundation, Inc.
+
+ Written by Justus Winter <4winter@informatik.uni-hamburg.de>
+
+ This file is part of the GNU Hurd.
+
+ The GNU Hurd is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ The GNU Hurd is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with the GNU Hurd. If not, see . */
+
+#include "priv.h"
+#include "fs_S.h"
+
+/* Return information about the source of the receiving
+ filesystem. */
+error_t
+diskfs_S_file_get_source (struct protid *cred,
+ char *source)
+{
+ if (! cred
+ || cred->pi.bucket != diskfs_port_bucket
+ || cred->pi.class != diskfs_protid_class)
+ return EOPNOTSUPP;
+ // XXX use cred
+ return diskfs_get_source (source);
+}
diff --git a/libdiskfs/fsys-get-children.c b/libdiskfs/fsys-get-children.c
deleted file mode 100644
index 69c9963..0000000
--- a/libdiskfs/fsys-get-children.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* fsys_get_children
-
- Copyright (C) 2013 Free Software Foundation, Inc.
-
- Written by Justus Winter <4winter@informatik.uni-hamburg.de>
-
- This file is part of the GNU Hurd.
-
- The GNU Hurd is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- The GNU Hurd is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with the GNU Hurd. If not, see . */
-
-#include "priv.h"
-#include "fsys_S.h"
-
-#include
-
-/* Return any active translators bound to nodes of the receiving
- filesystem. CHILDREN is an argz vector containing file names
- relative to the root of the receiving translator. */
-error_t
-diskfs_S_fsys_get_children (fsys_t server,
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- char **children,
- mach_msg_type_number_t *children_len)
-{
- error_t err;
-
- struct protid *cred = ports_lookup_port (diskfs_port_bucket,
- server,
- diskfs_protid_class);
- if (! cred)
- return EOPNOTSUPP;
-
- /* check_access performs the same permission check as is normally
- done, i.e. it checks that all but the last path components are
- executable by the requesting user and that the last component is
- readable. */
- error_t check_access (const char *path)
- {
- error_t err;
- char *elements = NULL;
- size_t elements_len = 0;
-
- err = argz_create_sep (path, '/', &elements, &elements_len);
- if (err)
- return err;
-
- struct node *dp = diskfs_root_node;
-
- for (char *entry = elements;
- entry;
- entry = argz_next (elements, elements_len, entry))
- {
- struct node *next;
- err = diskfs_lookup (dp, entry, LOOKUP, &next, NULL, cred);
-
- if (dp != diskfs_root_node)
- diskfs_nput (dp);
-
- if (err)
- return err;
-
- dp = next;
- }
-
- err = fshelp_access (&dp->dn_stat, S_IRUSR, cred->user);
- diskfs_nput (dp);
- return err;
- }
-
-
- char *c = NULL;
- size_t c_len = 0;
-
- err = fshelp_get_active_translators (&c, &c_len, check_access);
- if (err)
- goto errout;
-
- err = iohelp_return_malloced_buffer (c, c_len, children, children_len);
- if (err)
- goto errout;
-
- c = NULL; /* c was freed by iohelp_return_malloced_buffer. */
-
- errout:
- free (c);
- return err;
-}
diff --git a/libdiskfs/fsys-get-source.c b/libdiskfs/fsys-get-source.c
deleted file mode 100644
index 08f227c..0000000
--- a/libdiskfs/fsys-get-source.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* fsys_get_source
-
- Copyright (C) 2013 Free Software Foundation, Inc.
-
- Written by Justus Winter <4winter@informatik.uni-hamburg.de>
-
- This file is part of the GNU Hurd.
-
- The GNU Hurd is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- The GNU Hurd is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with the GNU Hurd. If not, see . */
-
-#include "priv.h"
-#include "fsys_S.h"
-
-/* Return information about the source of the receiving
- filesystem. */
-error_t
-diskfs_S_fsys_get_source (fsys_t server,
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- char *source)
-{
- return diskfs_get_source (source);
-}
diff --git a/libnetfs/Makefile b/libnetfs/Makefile
index 1a71b49..c3830c0 100644
--- a/libnetfs/Makefile
+++ b/libnetfs/Makefile
@@ -45,7 +45,7 @@ IOSRCS= io-read.c io-readable.c io-seek.c io-write.c io-stat.c io-async.c \
io-version.c
FSYSSRCS= fsys-syncfs.c fsys-getroot.c fsys-get-options.c fsys-set-options.c \
- fsys-goaway.c fsysstubs.c fsys-get-children.c fsys-get-source.c
+ fsys-goaway.c fsysstubs.c file-get-children.c file-get-source.c
IFSOCKSRCS=
OTHERSRCS= drop-node.c init-init.c make-node.c make-peropen.c make-protid.c \
diff --git a/libnetfs/file-get-children.c b/libnetfs/file-get-children.c
new file mode 100644
index 0000000..80a727f
--- /dev/null
+++ b/libnetfs/file-get-children.c
@@ -0,0 +1,108 @@
+/* file_get_children
+
+ Copyright (C) 2013 Free Software Foundation, Inc.
+
+ Written by Justus Winter <4winter@informatik.uni-hamburg.de>
+
+ This file is part of the GNU Hurd.
+
+ The GNU Hurd is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ The GNU Hurd is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with the GNU Hurd. If not, see . */
+
+#include "priv.h"
+
+#include
+
+/* Return any active translators bound to nodes of the receiving
+ filesystem. CHILDREN is an argz vector containing file names
+ relative to the root of the receiving translator. */
+error_t
+netfs_S_file_get_children (struct protid *cred,
+ char **children,
+ mach_msg_type_number_t *children_len)
+{
+ error_t err;
+ if (! cred
+ || cred->pi.bucket != netfs_port_bucket
+ || cred->pi.class != netfs_protid_class)
+ return EOPNOTSUPP;
+
+ /* check_access performs the same permission check as is normally
+ done, i.e. it checks that all but the last path components are
+ executable by the requesting user and that the last component is
+ readable. */
+ error_t check_access (const char *path)
+ {
+ error_t err;
+ char *elements = NULL;
+ size_t elements_len = 0;
+
+ err = argz_create_sep (path, '/', &elements, &elements_len);
+ if (err)
+ return err;
+
+ struct node *dp = netfs_root_node;
+
+ /* Lock the root node. netfs_attempt_lookup expects the directory to
+ be locked. */
+ pthread_mutex_lock (&dp->lock);
+
+ /* Increase the reference count, it will be decremented in the loop
+ ahead. */
+ netfs_nref (dp);
+
+ for (char *entry = elements;
+ entry;
+ entry = argz_next (elements, elements_len, entry))
+ {
+ struct node *next;
+ err = netfs_attempt_lookup (cred->user, dp, entry, &next);
+ /* netfs_attempt_lookup has unlocked dp and returned next
+ locked, so there is no locking to do here. */
+
+ /* Decrease reference count. */
+ netfs_nrele (dp);
+
+ if (err)
+ goto errout;
+
+ dp = next;
+ }
+
+ err = fshelp_access (&dp->nn_stat, S_IRUSR, cred->user);
+
+ errout:
+ /* Unlock and unreference the last node. */
+ netfs_nput (dp);
+
+ free (elements);
+ return err;
+ }
+
+ char *c = NULL;
+ size_t c_len = 0;
+
+ err = fshelp_get_active_translators (&c, &c_len, check_access);
+ if (err)
+ goto errout;
+
+ err = iohelp_return_malloced_buffer (c, c_len, children, children_len);
+ if (err)
+ goto errout;
+
+ c = NULL; /* c was freed by iohelp_return_malloced_buffer. */
+
+ errout:
+ free (c);
+ return err;
+}
diff --git a/libnetfs/file-get-source.c b/libnetfs/file-get-source.c
new file mode 100644
index 0000000..33db4e4
--- /dev/null
+++ b/libnetfs/file-get-source.c
@@ -0,0 +1,38 @@
+/* file_get_source
+
+ Copyright (C) 2013 Free Software Foundation, Inc.
+
+ Written by Justus Winter <4winter@informatik.uni-hamburg.de>
+
+ This file is part of the GNU Hurd.
+
+ The GNU Hurd is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ The GNU Hurd is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with the GNU Hurd. If not, see . */
+
+#include "priv.h"
+#include "fs_S.h"
+
+/* Return information about the source of the receiving
+ filesystem. */
+error_t
+netfs_S_file_get_source (struct protid *cred,
+ char *source)
+{
+ if (! cred
+ || cred->pi.bucket != netfs_port_bucket
+ || cred->pi.class != netfs_protid_class)
+ return EOPNOTSUPP;
+
+ // use cred
+ return netfs_get_source (source);
+}
diff --git a/libnetfs/fsys-get-children.c b/libnetfs/fsys-get-children.c
deleted file mode 100644
index fb3af91..0000000
--- a/libnetfs/fsys-get-children.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/* fsys_get_children
-
- Copyright (C) 2013 Free Software Foundation, Inc.
-
- Written by Justus Winter <4winter@informatik.uni-hamburg.de>
-
- This file is part of the GNU Hurd.
-
- The GNU Hurd is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- The GNU Hurd is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with the GNU Hurd. If not, see . */
-
-#include "priv.h"
-
-#include
-
-/* Return any active translators bound to nodes of the receiving
- filesystem. CHILDREN is an argz vector containing file names
- relative to the root of the receiving translator. */
-error_t
-netfs_S_fsys_get_children (fsys_t server,
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- char **children,
- mach_msg_type_number_t *children_len)
-{
- error_t err;
-
- struct protid *cred = ports_lookup_port (netfs_port_bucket,
- server,
- netfs_protid_class);
- if (! cred)
- return EOPNOTSUPP;
-
- /* check_access performs the same permission check as is normally
- done, i.e. it checks that all but the last path components are
- executable by the requesting user and that the last component is
- readable. */
- error_t check_access (const char *path)
- {
- error_t err;
- char *elements = NULL;
- size_t elements_len = 0;
-
- err = argz_create_sep (path, '/', &elements, &elements_len);
- if (err)
- return err;
-
- struct node *dp = netfs_root_node;
-
- /* Lock the root node. netfs_attempt_lookup expects the directory to
- be locked. */
- pthread_mutex_lock (&dp->lock);
-
- /* Increase the reference count, it will be decremented in the loop
- ahead. */
- netfs_nref (dp);
-
- for (char *entry = elements;
- entry;
- entry = argz_next (elements, elements_len, entry))
- {
- struct node *next;
- err = netfs_attempt_lookup (cred->user, dp, entry, &next);
- /* netfs_attempt_lookup has unlocked dp and returned next
- locked, so there is no locking to do here. */
-
- /* Decrease reference count. */
- netfs_nrele (dp);
-
- if (err)
- goto errout;
-
- dp = next;
- }
-
- err = fshelp_access (&dp->nn_stat, S_IRUSR, cred->user);
-
- errout:
- /* Unlock and unreference the last node. */
- netfs_nput (dp);
-
- free (elements);
- return err;
- }
-
- char *c = NULL;
- size_t c_len = 0;
-
- err = fshelp_get_active_translators (&c, &c_len, check_access);
- if (err)
- goto errout;
-
- err = iohelp_return_malloced_buffer (c, c_len, children, children_len);
- if (err)
- goto errout;
-
- c = NULL; /* c was freed by iohelp_return_malloced_buffer. */
-
- errout:
- free (c);
- return err;
-}
diff --git a/libnetfs/fsys-get-source.c b/libnetfs/fsys-get-source.c
deleted file mode 100644
index 6143d10..0000000
--- a/libnetfs/fsys-get-source.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* fsys_get_source
-
- Copyright (C) 2013 Free Software Foundation, Inc.
-
- Written by Justus Winter <4winter@informatik.uni-hamburg.de>
-
- This file is part of the GNU Hurd.
-
- The GNU Hurd is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- The GNU Hurd is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with the GNU Hurd. If not, see . */
-
-#include "priv.h"
-#include "fsys_S.h"
-
-/* Return information about the source of the receiving
- filesystem. */
-error_t
-netfs_S_fsys_get_source (fsys_t server,
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- char *source)
-{
- return netfs_get_source (source);
-}
diff --git a/libtrivfs/Makefile b/libtrivfs/Makefile
index 241b76d..3e4c039 100644
--- a/libtrivfs/Makefile
+++ b/libtrivfs/Makefile
@@ -35,7 +35,7 @@ IOSRCS=io-async-icky.c io-async.c io-duplicate.c io-map.c io-modes-get.c \
FSYSSRCS=fsys-getroot.c fsys-goaway.c fsys-stubs.c fsys-syncfs.c \
fsys-forward.c fsys-set-options.c fsys-get-options.c \
- fsys-get-children.c fsys-get-source.c
+ file-get-children.c file-get-source.c
OTHERSRCS=demuxer.c protid-clean.c protid-dup.c cntl-create.c \
cntl-clean.c migsupport.c times.c startup.c open.c \
diff --git a/libtrivfs/file-get-children.c b/libtrivfs/file-get-children.c
new file mode 100644
index 0000000..a3afbba
--- /dev/null
+++ b/libtrivfs/file-get-children.c
@@ -0,0 +1,35 @@
+/* file_get_children
+
+ Copyright (C) 2013 Free Software Foundation, Inc.
+
+ Written by Justus Winter <4winter@informatik.uni-hamburg.de>
+
+ This file is part of the GNU Hurd.
+
+ The GNU Hurd is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ The GNU Hurd is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with the GNU Hurd. If not, see . */
+
+#include "priv.h"
+
+/* Return any active translators bound to nodes of the receiving
+ filesystem. CHILDREN is an argz vector containing file names
+ relative to the root of the receiving translator. */
+error_t
+trivfs_S_file_get_children (struct trivfs_protid *cred,
+ mach_port_t reply,
+ mach_msg_type_name_t replyPoly,
+ char **children,
+ mach_msg_type_number_t *children_len)
+{
+ return EOPNOTSUPP;
+}
diff --git a/libtrivfs/file-get-source.c b/libtrivfs/file-get-source.c
new file mode 100644
index 0000000..dd6d7d7
--- /dev/null
+++ b/libtrivfs/file-get-source.c
@@ -0,0 +1,34 @@
+/* file_get_source
+
+ Copyright (C) 2013 Free Software Foundation, Inc.
+
+ Written by Justus Winter <4winter@informatik.uni-hamburg.de>
+
+ This file is part of the GNU Hurd.
+
+ The GNU Hurd is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ The GNU Hurd is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with the GNU Hurd. If not, see . */
+
+#include "priv.h"
+
+/* Return information about the source of the receiving
+ filesystem. */
+error_t
+trivfs_S_file_get_source (struct trivfs_protid *cred,
+ mach_port_t reply,
+ mach_msg_type_name_t replyPoly,
+ char *source)
+{
+ // xxx use cred
+ return cred ? trivfs_get_source (source) : EOPNOTSUPP;
+}
diff --git a/libtrivfs/fsys-get-children.c b/libtrivfs/fsys-get-children.c
deleted file mode 100644
index 4697cc5..0000000
--- a/libtrivfs/fsys-get-children.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* fsys_get_children
-
- Copyright (C) 2013 Free Software Foundation, Inc.
-
- Written by Justus Winter <4winter@informatik.uni-hamburg.de>
-
- This file is part of the GNU Hurd.
-
- The GNU Hurd is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- The GNU Hurd is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with the GNU Hurd. If not, see . */
-
-#include "priv.h"
-
-/* Return any active translators bound to nodes of the receiving
- filesystem. CHILDREN is an argz vector containing file names
- relative to the root of the receiving translator. */
-error_t
-trivfs_S_fsys_get_children (trivfs_control_t server,
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- char **children,
- mach_msg_type_number_t *children_len)
-{
- return EOPNOTSUPP;
-}
diff --git a/libtrivfs/fsys-get-source.c b/libtrivfs/fsys-get-source.c
deleted file mode 100644
index 64aec2f..0000000
--- a/libtrivfs/fsys-get-source.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* fsys_get_source
-
- Copyright (C) 2013 Free Software Foundation, Inc.
-
- Written by Justus Winter <4winter@informatik.uni-hamburg.de>
-
- This file is part of the GNU Hurd.
-
- The GNU Hurd is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- The GNU Hurd is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with the GNU Hurd. If not, see . */
-
-#include "priv.h"
-
-/* Return information about the source of the receiving
- filesystem. */
-error_t
-trivfs_S_fsys_get_source (trivfs_control_t server,
- mach_port_t reply,
- mach_msg_type_name_t replyPoly,
- char *source)
-{
- return trivfs_get_source (source);
-}
diff --git a/trans/Makefile b/trans/Makefile
index c0386d0..90df479 100644
--- a/trans/Makefile
+++ b/trans/Makefile
@@ -56,7 +56,7 @@ magic: ../libiohelp/libiohelp.a
hello: ../libtrivfs/libtrivfs.a ../libfshelp/libfshelp.a ../libports/libports.a ../libihash/libihash.a
fakeroot: ../libnetfs/libnetfs.a ../libfshelp/libfshelp.a ../libiohelp/libiohelp.a ../libports/libports.a ../libihash/libihash.a
remap: ../libtrivfs/libtrivfs.a ../libfshelp/libfshelp.a ../libports/libports.a ../libihash/libihash.a
-mtab: ../libtrivfs/libtrivfs.a ../libfshelp/libfshelp.a ../libports/libports.a ../libihash/libihash.a fsysUser.o
+mtab: ../libtrivfs/libtrivfs.a ../libfshelp/libfshelp.a ../libports/libports.a ../libihash/libihash.a fsUser.o
$(targets): ../libshouldbeinlibc/libshouldbeinlibc.a
$(targets): %: %.o
diff --git a/trans/mtab.c b/trans/mtab.c
index 75ef1d3..d5fc7a0 100644
--- a/trans/mtab.c
+++ b/trans/mtab.c
@@ -421,7 +421,7 @@ mtab_populate (struct mtab *mtab, const char *path, int insecure)
argz_stringify (options, options_len, ',');
string_t source;
- err = fsys_get_source (node, source);
+ err = file_get_source (node, source);
if (err)
{
if (err == EOPNOTSUPP)
@@ -450,7 +450,7 @@ mtab_populate (struct mtab *mtab, const char *path, int insecure)
goto errout;
/* path has an active translator, query its children. */
- err = fsys_get_children (node, &children, &children_len);
+ err = file_get_children (node, &children, &children_len);
if (err == EOPNOTSUPP)
{
err = 0;
diff --git a/trans/symlink.c b/trans/symlink.c
index 8562662..845a112 100644
--- a/trans/symlink.c
+++ b/trans/symlink.c
@@ -234,18 +234,3 @@ S_fsys_forward (mach_port_t server, mach_port_t requestor,
{
return EOPNOTSUPP;
}
-
-error_t
-S_fsys_get_children (mach_port_t server,
- char **children,
- mach_msg_type_number_t *children_len)
-{
- return EOPNOTSUPP;
-}
-
-error_t
-S_fsys_get_source (mach_port_t server,
- char *source)
-{
- return EOPNOTSUPP;
-}