提交 f11f5ee7 编写于 作者: J Jeremy Kerr 提交者: Arnd Bergmann

[POWERPC] spufs: add mode= mount option

Add a 'mode=' option to spufs mount arguments. This allows more
control over access to the top-level spufs directory.

Tested on Cell.
Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
上级 9e2fe2ce
......@@ -521,12 +521,13 @@ long spufs_create(struct nameidata *nd, unsigned int flags, mode_t mode)
/* File system initialization */
enum {
Opt_uid, Opt_gid, Opt_err,
Opt_uid, Opt_gid, Opt_mode, Opt_err,
};
static match_table_t spufs_tokens = {
{ Opt_uid, "uid=%d" },
{ Opt_gid, "gid=%d" },
{ Opt_mode, "mode=%o" },
{ Opt_err, NULL },
};
......@@ -554,6 +555,11 @@ spufs_parse_options(char *options, struct inode *root)
return 0;
root->i_gid = option;
break;
case Opt_mode:
if (match_octal(&args[0], &option))
return 0;
root->i_mode = option | S_IFDIR;
break;
default:
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册