[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 60/70: libdiskfs: add fsys_get_source
From: |
Samuel Thibault |
Subject: |
[hurd] 60/70: libdiskfs: add fsys_get_source |
Date: |
Mon, 16 Sep 2013 07:41:46 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 70b1ab5dbb8d7d1cf63ab170e0a96a03c6dd363c
Author: Justus Winter <address@hidden>
Date: Tue Jul 30 11:59:19 2013 +0200
libdiskfs: add fsys_get_source
Add a user overridable function diskfs_get_source with a default
implementation returning EOPNOTSUPP. Add a server function for
fsys-get-source.
* libdiskfs/Makefile: Add fsys-get-source.c and get-source.c
* libdiskfs/diskfs.h: Add diskfs_get_source.
* libdiskfs/fsys-get-source.c: New file.
* libdiskfs/get-source.c: Likewise.
---
libdiskfs/Makefile | 4 ++--
libdiskfs/diskfs.h | 8 +++++++-
libdiskfs/fsys-get-source.c | 34 ++++++++++++++++++++++++++++++++++
libdiskfs/get-source.c | 28 ++++++++++++++++++++++++++++
4 files changed, 71 insertions(+), 3 deletions(-)
diff --git a/libdiskfs/Makefile b/libdiskfs/Makefile
index 1a0edd0..03c2e2b 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-children.c fsys-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 \
@@ -52,7 +52,7 @@ OTHERSRCS = conch-fetch.c conch-set.c dir-clear.c dir-init.c
dir-renamed.c \
remount.c console.c disk-pager.c \
name-cache.c direnter.c dirrewrite.c dirremove.c lookup.c dead-name.c \
validate-mode.c validate-group.c validate-author.c validate-flags.c \
- validate-rdev.c validate-owner.c extra-version.c
+ validate-rdev.c validate-owner.c extra-version.c get-source.c
SRCS = $(OTHERSRCS) $(FSSRCS) $(IOSRCS) $(FSYSSRCS) $(IFSOCKSRCS)
installhdrs = diskfs.h diskfs-pager.h
diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h
index 2489517..22262aa 100644
--- a/libdiskfs/diskfs.h
+++ b/libdiskfs/diskfs.h
@@ -1,7 +1,7 @@
/* Definitions for fileserver helper functions
Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2007, 2008,
- 2009 Free Software Foundation, Inc.
+ 2009, 2013 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
@@ -567,6 +567,12 @@ error_t (*diskfs_create_symlink_hook)(struct node *np,
const char *target);
isn't set, then the normal method (reading from the file data) is
used. If it returns any other error, it is returned to the user. */
error_t (*diskfs_read_symlink_hook)(struct node *np, char *target);
+
+/* 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 diskfs_get_source (char *source);
/* The library exports the following functions for general use */
diff --git a/libdiskfs/fsys-get-source.c b/libdiskfs/fsys-get-source.c
new file mode 100644
index 0000000..08f227c
--- /dev/null
+++ b/libdiskfs/fsys-get-source.c
@@ -0,0 +1,34 @@
+/* fsys_get_source
+
+ Copyright (C) 2013 Free Software Foundation, Inc.
+
+ Written by Justus Winter <address@hidden>
+
+ 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 "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/libdiskfs/get-source.c b/libdiskfs/get-source.c
new file mode 100644
index 0000000..d0c143b
--- /dev/null
+++ b/libdiskfs/get-source.c
@@ -0,0 +1,28 @@
+/* Default version of diskfs_get_source
+
+ Copyright (C) 2013 Free Software Foundation, Inc.
+
+ Written by Justus Winter <address@hidden>
+
+ 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
+diskfs_get_source (char *source)
+{
+ return EOPNOTSUPP;
+}
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 34/70: proc: make the function check_owner available, (continued)
- [hurd] 34/70: proc: make the function check_owner available, Samuel Thibault, 2013/09/16
- [hurd] 24/70: exec: Remove #ifdef 0-out code for user specified exec servers., Samuel Thibault, 2013/09/16
- [hurd] 40/70: libtrivfs: register libtrivfs-based translators as important, Samuel Thibault, 2013/09/16
- [hurd] 36/70: hurd: add proc_mark_important, Samuel Thibault, 2013/09/16
- [hurd] 43/70: Fix build, Samuel Thibault, 2013/09/16
- [hurd] 46/70: proc: keep track of {start,end}_code, Samuel Thibault, 2013/09/16
- [hurd] 45/70: Fix variable names, Samuel Thibault, 2013/09/16
- [hurd] 25/70: exec: remove the BFD code, Samuel Thibault, 2013/09/16
- [hurd] 26/70: hurd: add missing routines in process_reply.defs, Samuel Thibault, 2013/09/16
- [hurd] 63/70: trans/symlink.c: add fsys_get_source, Samuel Thibault, 2013/09/16
- [hurd] 60/70: libdiskfs: add fsys_get_source,
Samuel Thibault <=
- [hurd] 56/70: libnetfs: add fsys_get_children, Samuel Thibault, 2013/09/16
- [hurd] 41/70: mach-defpager: register mach-defpager translators as important, Samuel Thibault, 2013/09/16
- [hurd] 62/70: libtrivfs: add fsys_get_source, Samuel Thibault, 2013/09/16
- [hurd] 66/70: exec: remove support for transparently unbzip2ing executables, Samuel Thibault, 2013/09/16
- [hurd] 58/70: trans/symlink.c: add fsys_get_children, Samuel Thibault, 2013/09/16
- [hurd] 67/70: exec: remove support for transparently ungziping executables, Samuel Thibault, 2013/09/16
- [hurd] 54/70: libfshelp: add translator-list.c, Samuel Thibault, 2013/09/16
- [hurd] 70/70: Merge remote-tracking branch 'upstream/master' into upstream, Samuel Thibault, 2013/09/16
- [hurd] 53/70: libnetfs: track file name in struct peropen, Samuel Thibault, 2013/09/16
- [hurd] 48/70: exec: keep track of the range where executable segments are mapped, Samuel Thibault, 2013/09/16