summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-10-20 11:03:47 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2008-10-20 11:03:47 +1100
commit9f7cc60203a86a5e6e9f3fcf5ad47bfdf0f3d325 (patch)
treedd4b2b5a9418cb7125f7a55e482d936cd4983dd4 /fs
parentc7d2a0f75f034faef7e6504f6f8ea3ec87b324c2 (diff)
pty-option-parsing
Extract option parsing to new function From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Move code to parse mount options into a separate function so it can (later) be shared between mount and remount operations. Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Alan Cox <alan@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/devpts/inode.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index 7ded5fbe8540..a85ce44e3e99 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -72,11 +72,9 @@ static inline struct super_block *pts_sb_from_inode(struct inode *inode)
return devpts_mnt->mnt_sb;
}
-static int devpts_remount(struct super_block *sb, int *flags, char *data)
+static int parse_mount_options(char *data, struct pts_mount_opts *opts)
{
char *p;
- struct pts_fs_info *fsi = DEVPTS_SB(sb);
- struct pts_mount_opts *opts = &fsi->mount_opts;
opts->setuid = 0;
opts->setgid = 0;
@@ -120,6 +118,14 @@ static int devpts_remount(struct super_block *sb, int *flags, char *data)
return 0;
}
+static int devpts_remount(struct super_block *sb, int *flags, char *data)
+{
+ struct pts_fs_info *fsi = DEVPTS_SB(sb);
+ struct pts_mount_opts *opts = &fsi->mount_opts;
+
+ return parse_mount_options(data, opts);
+}
+
static int devpts_show_options(struct seq_file *seq, struct vfsmount *vfs)
{
struct pts_fs_info *fsi = DEVPTS_SB(vfs->mnt_sb);