diff options
Diffstat (limited to 'libtrivfs')
-rw-r--r-- | libtrivfs/Makefile | 5 | ||||
-rw-r--r-- | libtrivfs/file-get-children.c | 36 | ||||
-rw-r--r-- | libtrivfs/fsys-get-children.c | 41 | ||||
-rw-r--r-- | libtrivfs/fsys-get-source.c (renamed from libtrivfs/file-get-source.c) | 22 |
4 files changed, 56 insertions, 48 deletions
diff --git a/libtrivfs/Makefile b/libtrivfs/Makefile index 4f9c71f7..4fd3150c 100644 --- a/libtrivfs/Makefile +++ b/libtrivfs/Makefile @@ -25,7 +25,7 @@ FSSRCS= dir-link.c dir-mkdir.c dir-mkfile.c dir-lookup.c dir-readdir.c \ file-getlinknode.c file-lock.c file-set-trans.c file-statfs.c \ file-sync.c file-syncfs.c file-set-size.c file-utimes.c file-exec.c \ file-access.c dir-chg.c file-chg.c file-get-storage-info.c \ - file-get-fs-options.c file-reparent.c get-source.c + file-get-fs-options.c file-reparent.c \ IOSRCS=io-async-icky.c io-async.c io-duplicate.c io-map.c io-modes-get.c \ io-modes-off.c io-modes-on.c io-modes-set.c io-owner-get.c \ @@ -35,11 +35,12 @@ 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 \ - file-get-children.c file-get-source.c + fsys-get-children.c fsys-get-source.c \ OTHERSRCS=demuxer.c protid-clean.c protid-dup.c cntl-create.c \ cntl-clean.c times.c startup.c open.c \ runtime-argp.c set-options.c append-args.c dyn-classes.c \ + get-source.c SRCS=$(FSSRCS) $(IOSRCS) $(FSYSSRCS) $(OTHERSRCS) diff --git a/libtrivfs/file-get-children.c b/libtrivfs/file-get-children.c deleted file mode 100644 index 4126119e..00000000 --- a/libtrivfs/file-get-children.c +++ /dev/null @@ -1,36 +0,0 @@ -/* 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 <http://www.gnu.org/licenses/>. */ - -#include "priv.h" -#include "trivfs_fs_S.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/fsys-get-children.c b/libtrivfs/fsys-get-children.c new file mode 100644 index 00000000..f0cd28c2 --- /dev/null +++ b/libtrivfs/fsys-get-children.c @@ -0,0 +1,41 @@ +/* fsys_get_children + + Copyright (C) 2017 Free Software Foundation, Inc. + + 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 <http://www.gnu.org/licenses/>. */ + +#include "priv.h" +#include "trivfs_fsys_S.h" + +/* Return any active child translators. NAMES is an argz vector + containing file names relative to the root of the translator. + CONTROLS is an array containing the corresponding control ports. + Note that translators are bound to nodes, and nodes can have zero + or more links in the file system, therefore there is no guarantee + that a translators name refers to an existing link in the file + system. */ +error_t +trivfs_S_fsys_get_children (struct trivfs_control *fsys, + mach_port_t reply, + mach_msg_type_name_t replyPoly, + char **names, + mach_msg_type_number_t *names_len, + mach_port_t **controls, + mach_msg_type_name_t *controlsPoly, + mach_msg_type_number_t *controlsCnt) +{ + return EOPNOTSUPP; +} diff --git a/libtrivfs/file-get-source.c b/libtrivfs/fsys-get-source.c index c2420fb8..5d063eb8 100644 --- a/libtrivfs/file-get-source.c +++ b/libtrivfs/fsys-get-source.c @@ -1,8 +1,6 @@ -/* file_get_source +/* fsys_get_source - Copyright (C) 2013 Free Software Foundation, Inc. - - Written by Justus Winter <4winter@informatik.uni-hamburg.de> + Copyright (C) 2017 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -20,15 +18,19 @@ along with the GNU Hurd. If not, see <http://www.gnu.org/licenses/>. */ #include "priv.h" -#include "trivfs_fs_S.h" - -/* Return information about the source of the receiving - filesystem. */ +#include "trivfs_fsys_S.h" + +/* Return information about the source of the translator. If the + concept of a source is applicable, SOURCE should refer to the + source of the translator and should be a description considered + appropriate in the context of the translator. For example, if the + translator is a filesystem residing on a block device, then SOURCE + should be the file name of the underlying block device. */ error_t -trivfs_S_file_get_source (struct trivfs_protid *cred, +trivfs_S_fsys_get_source (struct trivfs_control *fsys, mach_port_t reply, mach_msg_type_name_t replyPoly, char *source) { - return cred ? trivfs_get_source (source, 1024 /* XXX */) : EOPNOTSUPP; + return fsys ? trivfs_get_source (source, 1024 /* XXX */) : EOPNOTSUPP; } |