From 70b1ab5dbb8d7d1cf63ab170e0a96a03c6dd363c Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Tue, 30 Jul 2013 11:59:19 +0200 Subject: 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/diskfs.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libdiskfs/diskfs.h') diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h index 24895172..22262aa8 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 */ -- cgit v1.2.3