diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2007-04-23 15:08:23 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@klappe.arndb.de> | 2007-04-23 15:18:58 -0400 |
commit | f11f5ee70f48899506514e5e0d10ee2c8ddd359a (patch) | |
tree | 7afab396d16bf5e55e71128c1abeda9f62f44861 /arch/powerpc | |
parent | 9e2fe2ce4e957a79d3dc5d813e0cfb10d79b79b3 (diff) |
[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: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/inode.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 6b52dfabaeef..8f6cd8763306 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -521,13 +521,14 @@ out: | |||
521 | 521 | ||
522 | /* File system initialization */ | 522 | /* File system initialization */ |
523 | enum { | 523 | enum { |
524 | Opt_uid, Opt_gid, Opt_err, | 524 | Opt_uid, Opt_gid, Opt_mode, Opt_err, |
525 | }; | 525 | }; |
526 | 526 | ||
527 | static match_table_t spufs_tokens = { | 527 | static match_table_t spufs_tokens = { |
528 | { Opt_uid, "uid=%d" }, | 528 | { Opt_uid, "uid=%d" }, |
529 | { Opt_gid, "gid=%d" }, | 529 | { Opt_gid, "gid=%d" }, |
530 | { Opt_err, NULL }, | 530 | { Opt_mode, "mode=%o" }, |
531 | { Opt_err, NULL }, | ||
531 | }; | 532 | }; |
532 | 533 | ||
533 | static int | 534 | static int |
@@ -554,6 +555,11 @@ spufs_parse_options(char *options, struct inode *root) | |||
554 | return 0; | 555 | return 0; |
555 | root->i_gid = option; | 556 | root->i_gid = option; |
556 | break; | 557 | break; |
558 | case Opt_mode: | ||
559 | if (match_octal(&args[0], &option)) | ||
560 | return 0; | ||
561 | root->i_mode = option | S_IFDIR; | ||
562 | break; | ||
557 | default: | 563 | default: |
558 | return 0; | 564 | return 0; |
559 | } | 565 | } |