[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/17] libtrivfs: add fsys_get_source
From: |
Justus Winter |
Subject: |
[PATCH 13/17] libtrivfs: add fsys_get_source |
Date: |
Thu, 11 Jul 2013 18:09:16 +0200 |
---
libtrivfs/Makefile | 4 ++--
libtrivfs/fsys-get-source.c | 34 ++++++++++++++++++++++++++++++++++
libtrivfs/get-source.c | 28 ++++++++++++++++++++++++++++
libtrivfs/trivfs.h | 6 ++++++
4 files changed, 70 insertions(+), 2 deletions(-)
create mode 100644 libtrivfs/fsys-get-source.c
create mode 100644 libtrivfs/get-source.c
diff --git a/libtrivfs/Makefile b/libtrivfs/Makefile
index 3163777..241b76d 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 0000000..9b6933e
--- /dev/null
+++ b/libtrivfs/fsys-get-source.c
@@ -0,0 +1,34 @@
+/* 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; see the file COPYING. If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#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 0000000..fd6e027
--- /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 this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
+
+#include "priv.h"
+
+error_t
+trivfs_get_source (char *source)
+{
+ return EOPNOTSUPP;
+}
diff --git a/libtrivfs/trivfs.h b/libtrivfs/trivfs.h
index 33b0436..3034c55 100644
--- a/libtrivfs/trivfs.h
+++ b/libtrivfs/trivfs.h
@@ -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
--
1.7.10.4
- Re: feature-mtab-translator (v3), (continued)
- Re: feature-mtab-translator (v3), Neal H. Walfield, 2013/07/22
- Re: feature-mtab-translator (v3), Samuel Thibault, 2013/07/22
- Re: feature-mtab-translator (v3), Neal H. Walfield, 2013/07/23
- [PATCH 14/17] trans/symlink.c: add fsys_get_source, Justus Winter, 2013/07/11
- [PATCH 11/17] libdiskfs: add fsys_get_source, Justus Winter, 2013/07/11
- [PATCH 12/17] libnetfs: add fsys_get_source, Justus Winter, 2013/07/11
- [PATCH 17/17] add mtab prototype, Justus Winter, 2013/07/11
- [PATCH 13/17] libtrivfs: add fsys_get_source,
Justus Winter <=
- [PATCH 15/17] hurd: add fsys_get_source, Justus Winter, 2013/07/11
- [PATCH 16/17] XXX this looks wrong to me, please have a look, Justus Winter, 2013/07/11
- Re: get_translator_{children,source} (v2), Samuel Thibault, 2013/07/15
- Re: get_translator_{children,source} (v2), Samuel Thibault, 2013/07/15
Re: RFC: get_translator_info, needed for a mtab translator, Justus Winter, 2013/07/04