summaryrefslogtreecommitdiff
path: root/libtrivfs
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2013-07-30 11:59:21 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-09-15 23:20:04 +0200
commit054d366c931956e784a4f9da08efa1395f3e5680 (patch)
tree02c0b12c05ff31dbdcdfe6a59de7942f8dc19726 /libtrivfs
parent3a5bcbcc94f01b1ef1ed0571b31434ed57162224 (diff)
libtrivfs: add fsys_get_source
* libtrivfs/Makefile: Add fsys-get-source.c and get-source.c * libtrivfs/trivfs.h: Add trivfs_get_source. * libtrivfs/fsys-get-source.c: New file. * libtrivfs/get-source.c: Likewise.
Diffstat (limited to 'libtrivfs')
-rw-r--r--libtrivfs/Makefile4
-rw-r--r--libtrivfs/fsys-get-source.c33
-rw-r--r--libtrivfs/get-source.c28
-rw-r--r--libtrivfs/trivfs.h8
4 files changed, 70 insertions, 3 deletions
diff --git a/libtrivfs/Makefile b/libtrivfs/Makefile
index 3163777e..241b76df 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
+ file-get-fs-options.c file-reparent.c get-source.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,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-children.c fsys-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/fsys-get-source.c b/libtrivfs/fsys-get-source.c
new file mode 100644
index 00000000..64aec2fb
--- /dev/null
+++ b/libtrivfs/fsys-get-source.c
@@ -0,0 +1,33 @@
+/* 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 <http://www.gnu.org/licenses/>. */
+
+#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/libtrivfs/get-source.c b/libtrivfs/get-source.c
new file mode 100644
index 00000000..9ea56930
--- /dev/null
+++ b/libtrivfs/get-source.c
@@ -0,0 +1,28 @@
+/* Default version of trivfs_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 <http://www.gnu.org/licenses/>. */
+
+#include "priv.h"
+
+error_t
+trivfs_get_source (char *source)
+{
+ return EOPNOTSUPP;
+}
diff --git a/libtrivfs/trivfs.h b/libtrivfs/trivfs.h
index 33b04363..cf817b50 100644
--- a/libtrivfs/trivfs.h
+++ b/libtrivfs/trivfs.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1994,95,96,97,99,2002 Free Software Foundation, Inc.
+ Copyright (C) 1994,95,96,97,99,2002,13 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -233,6 +233,12 @@ error_t trivfs_set_options (struct trivfs_control *fsys,
routine simply calls diskfs_append_std_options. */
error_t trivfs_append_args (struct trivfs_control *fsys,
char **argz, size_t *argz_len);
+
+/* The user may define this function. The function must set source to
+ the source device of the filesystem. The function may return an
+ EOPNOTSUPP to indicate that the concept of a source device is not
+ applicable. The default function always returns EOPNOTSUPP. */
+error_t trivfs_get_source (char *source);
/* Add the port class *CLASS to the list of control port classes recognized
by trivfs; if *CLASS is 0, an attempt is made to allocate a new port