From 3aca4663dba9ed2cd390a580dffa63246572181b Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Fri, 8 Feb 2008 04:21:43 -0800 Subject: [PATCH] --- yaml --- r: 84796 b: refs/heads/master c: dd2cc4dff3b08ab54c4c177a080046bcc84ac41d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/hostfs/hostfs_kern.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 225eaa528113..3ae336f4733f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d1875dbaa58e4894f7d9321d1c280fb23ca9f9e5 +refs/heads/master: dd2cc4dff3b08ab54c4c177a080046bcc84ac41d diff --git a/trunk/fs/hostfs/hostfs_kern.c b/trunk/fs/hostfs/hostfs_kern.c index 2b9b35733aac..d0549cb4fb23 100644 --- a/trunk/fs/hostfs/hostfs_kern.c +++ b/trunk/fs/hostfs/hostfs_kern.c @@ -11,6 +11,7 @@ #include #include #include +#include #include "hostfs.h" #include "init.h" #include "kern.h" @@ -322,12 +323,25 @@ static void hostfs_destroy_inode(struct inode *inode) kfree(HOSTFS_I(inode)); } +static int hostfs_show_options(struct seq_file *seq, struct vfsmount *vfs) +{ + struct inode *root = vfs->mnt_sb->s_root->d_inode; + const char *root_path = HOSTFS_I(root)->host_filename; + size_t offset = strlen(root_ino) + 1; + + if (strlen(root_path) > offset) + seq_printf(seq, ",%s", root_path + offset); + + return 0; +} + static const struct super_operations hostfs_sbops = { .alloc_inode = hostfs_alloc_inode, .drop_inode = generic_delete_inode, .delete_inode = hostfs_delete_inode, .destroy_inode = hostfs_destroy_inode, .statfs = hostfs_statfs, + .show_options = hostfs_show_options, }; int hostfs_readdir(struct file *file, void *ent, filldir_t filldir)