diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-02-10 15:02:15 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-02-25 11:18:59 +0100 |
commit | 8eb1240c18062bd3614ecba31f4c6a2dc6ea980d (patch) | |
tree | f853704521d71404ba54470a5c48571ee3ecc3ff /nfs | |
parent | 9366d6b2e48ba409366adc0516825c41a86dec9b (diff) |
nfs: implement netfs_get_source
Implement netfs_get_source so that nfs translators show up in
/proc/mounts.
* nfs/main.c (netfs_get_source): New function.
Diffstat (limited to 'nfs')
-rw-r--r-- | nfs/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -269,6 +269,20 @@ netfs_append_args (char **argz, size_t *argz_len) return err; } +/* The user may define this function. The function must set source to + the source of CRED. 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 +netfs_get_source (struct protid *cred, char *source, size_t source_len) +{ + if (! cred) + return EOPNOTSUPP; + + snprintf (source, source_len, "%s:%s", host, remote_fs); + return 0; +} + /* Extract the host and remote filesystem names from SPEC, which should use either HOST:FS or FS@HOST notation. Returns the malloced storage into which both REMOTE_FS and HOST point, or 0 if SPEC is invalid. */ |