Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f11f5ee70f48899506514e5e0d10ee2c8ddd359a
Commit:     f11f5ee70f48899506514e5e0d10ee2c8ddd359a
Parent:     9e2fe2ce4e957a79d3dc5d813e0cfb10d79b79b3
Author:     Jeremy Kerr <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 23 21:08:23 2007 +0200
Committer:  Arnd Bergmann <[EMAIL PROTECTED]>
CommitDate: Mon Apr 23 21:18:58 2007 +0200

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Arnd Bergmann <[EMAIL PROTECTED]>
---
 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 6b52dfa..8f6cd87 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -521,13 +521,14 @@ out:
 
 /* 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_err, NULL  },
+       { Opt_uid,  "uid=%d" },
+       { Opt_gid,  "gid=%d" },
+       { Opt_mode, "mode=%o" },
+       { Opt_err,   NULL  },
 };
 
 static int
@@ -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;
                }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to